Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Plack::Request::headers() in the ParamObject #2127

Closed
bschmalhofer opened this issue Jan 18, 2023 · 1 comment
Closed

Expose Plack::Request::headers() in the ParamObject #2127

bschmalhofer opened this issue Jan 18, 2023 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

bschmalhofer commented Jan 18, 2023

Sometimes OTOBO needs to fiddle with the request headers. E.g. in Kernel/GenericInterface/Transport/HTTP/REST.pm:

        my %RequestHeaders;
        for my $EnvKey ( sort $ParamObject->HTTP() ) {
            my $HeaderKey = substr $EnvKey, 5;    # remove leading HTTP_
            $HeaderKey =~ s{_}{-}xmsg;
            $RequestHeaders{$HeaderKey} = $ParamObject->HTTP($EnvKey);
        }

In these cases it might be nice to have an instance of HTTP::Headers. This could be achieved by adding a wrapper method around Plack::Request::headers().

@bschmalhofer bschmalhofer added the enhancement New feature or request label Jan 18, 2023
@bschmalhofer bschmalhofer added this to the OTOBO 11.0 milestone Jan 18, 2023
@bschmalhofer bschmalhofer changed the title Expose Plack::Request::headers in the ParamObject Kernel::System::Web::Request Expose Plack::Request::headers() in the ParamObject Jan 18, 2023
bschmalhofer added a commit that referenced this issue Mar 7, 2023
This allows to use the standard names for HTTP headers.
bschmalhofer added a commit that referenced this issue Mar 8, 2023
This allows to use the standard names for HTTP headers.
bschmalhofer added a commit that referenced this issue Mar 8, 2023
not just report that extra headers exist
bschmalhofer added a commit that referenced this issue Mar 8, 2023
behaves a bit differently than $ParamObject->HTTP. The content fields
are also part of the headers.
bschmalhofer added a commit that referenced this issue Mar 8, 2023
@bschmalhofer
Copy link
Contributor Author

Replacing the calls to HTTP() in OTOBO core. In the test suite there were more lines printed than usually. This seems to be related to Elasticsearch running out of disk space. Otherwise the test suite looks fine. The PR is merged, closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant