Large XHR response objects can exceed the maximum header size.
See original GitHub issueIf I respond to route
with a very large object, tests waiting for that response will fail with ERR_EMPTY_RESPONSE
cy
.server()
.route("POST", /route/, reallyLargeObject).as("willFail")
.get(".submit").click()
.wait("@willFail")
Issue Analytics
- State:
- Created 8 years ago
- Reactions:6
- Comments:18 (5 by maintainers)
Top Results From Across the Web
Maximum on HTTP header values? - Stack Overflow
No, HTTP does not define any limit. However most web servers do limit size of headers they accept. For example in Apache default...
Read more >431 Request Header Fields Too Large - HTTP - MDN Web Docs
431 can be used when the total size of request headers is too large, or when a single header field is too large....
Read more >HTTP Response Header Size Limits | Max Chadwick
Their docs state a limit of 8192 bytes for response cookies, for example, citing CDN restrictions… Cookies are explicitly restricted to 8192 ...
Read more >Request and response behavior for Amazon S3 origins
The maximum length of a request, including the path, the query string (if any), and headers, is 20,480 bytes. CloudFront constructs a URL...
Read more >XMLHttpRequest - The Modern JavaScript Tutorial
URL – the URL to request, a string, can be URL object. ... got ${xhr.response.length} bytes`); // response is the server response }...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hah just found a super simple solution: before I had
now:
Cleaner and it works 😃
Thank you for your suggestions.
For guys coming from google. Here is our workaround:
put this in e.g.
integration/utils/loadLargeFixture.js
Import the json and the
loadLargeFixture
function in your test: