bruno icon indicating copy to clipboard operation
bruno copied to clipboard

Large header in response causes request to fail

Open smchristensen opened this issue 1 year ago • 1 comments

I have checked the following:

  • [X] I use the newest version of bruno.
  • [X] I've searched existing issues and found nothing related to my issue.

Describe the bug

I have a request that returns a header with a large amount of data in it. When I run the request I get the following error:

Error invoking remote method 'send-http-request': Error: Parse Error: Header overflow

The error is actually in the parsing of the response as the data is being sent back in a cookie header. Is there a way to specify or increase the size of the header?

.bru file to reproduce the bug

No response

Screenshots/Live demo link

image

smchristensen avatar Apr 29 '24 18:04 smchristensen

It might be a node.js limitation; by default, the header size is limited to 16384 bytes.

This was reduced due to various CVEs and security concerns, but you have the power to override it using the max-header-size node flag. However, this would need to be done during the build process.

As a workaround, you can try to build the project and run it with NODE_OPTIONS=--max-http-header-size=YOUR-LIMIT prefix, e.g. NODE_OPTIONS=--max-http-header-size=80000 npm run dev:electron.

Make sure your limit is expressed in bytes e.g. 80000 would mean 80,000 bytes (80 kb)


Update: 30/04/2024 07:53 UTC

I just managed to replicate the issue with 20kb header.

image

The proposed solution fixes the issue and allows larger payloads in headers. image

igor-topolski avatar Apr 30 '24 07:04 igor-topolski