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

Not all response headers are returned #568

Open
BruceWilcox opened this issue Aug 29, 2023 · 0 comments
Open

Not all response headers are returned #568

BruceWilcox opened this issue Aug 29, 2023 · 0 comments

Comments

@BruceWilcox
Copy link

Why is this code in place?

I don't really understand it but it is stripping out some response headers I need to inspect in the

output.file.responseHeaders object

See the screen shot below. The x-document-id header etc. is dropped.

  parseResponseHeaders( httpHeaders ) {
        
       if ( !httpHeaders ) {
            return;
        }
       
       return httpHeaders.split('\n')
            .map((x) => x.split(/: */, 2))
            .filter((x) => x[0])
            .reduce(
                  (acc, x) => {
                     acc[x[0]] = x[1];
                     return acc;
                 }
               , {}
          );
 }

resp-headers

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

No branches or pull requests

1 participant