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

Incorrect header size is shown in the error message when its size is above 65kB #2425

Closed
AndreyBelym opened this issue Sep 1, 2020 · 2 comments
Labels
AREA: server STATE: Stale Outdated issues automatically closed by the Stale bot SYSTEM: pipeline TYPE: bug

Comments

@AndreyBelym
Copy link
Contributor

What is your Scenario?

Test a website that sends huge headers.

What is the Current behavior?

Given the following webserver:

http
    .createServer((req, res) => {
        res._headers={'invalid': 'x'.repeat(85000) };
        res.end();
    })
    .listen(1337);

proxied requests generate an error message that says about the header size as being much less than 85000:

Failed to perform a request to the resource at "http://localhost:1337/" because of an error.
      The request header's size is 65519 bytes which exceeds the set limit.
      It causes an internal Node.js error on parsing this header.

For headers lesser that 65kB size is calculated correctly.

Obviously, if a header is really huge, it can be splitted to several raw HTTP packets. Unfortunately, the original error.rawPacket message generated by Node.js includes only the last packet in the series.

What is the Expected behavior?

A correct header size should be embedded in the message

What is your public web site URL?

Your website URL (or attach your complete example):

Your complete app code (or attach your test files):
 
Screenshots:

Steps to Reproduce:

  1. Go to: ...
  2. Execute this command: ...
  3. See the error: ...

Your Environment details:

  • node.js version: 14.10
  • browser name and version: Chrome 84
  • platform and version: Windows 10
  • other:
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had any activity for a long period. It will be closed and archived if no further activity occurs. However, we may return to this issue in the future. If it still affects you or you have any additional information regarding it, please leave a comment and we will keep it open.

@github-actions github-actions bot added the STATE: Stale Outdated issues automatically closed by the Stale bot label Oct 12, 2021
@github-actions
Copy link

We're closing this issue after a prolonged period of inactivity. If it still affects you, please add a comment to this issue with up-to-date information. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AREA: server STATE: Stale Outdated issues automatically closed by the Stale bot SYSTEM: pipeline TYPE: bug
Projects
None yet
Development

No branches or pull requests

1 participant