Assertion Error: Headers already sent
See original GitHub issueCode: https://gist.github.com/haxxorsid/348169a3a6c93ee241dfdb8170709651 Run:
git clone https://gist.github.com/haxxorsid/348169a3a6c93ee241dfdb8170709651.git
cd 348169a3a6c93ee241dfdb8170709651
npm install
npm start
In browser: http://localhost:3000/my-scale/resize/100/123?url=image.jpg
It resizes image.jpg(without overwriting the file) to 100width & 123height and displays that in browser.
Error:
AssertionError [ERR_ASSERTION]: headers have already been sent
Can someone solve this issue for me. Maybe this issue is not at all related to koajs.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
How to fix 'headers already sent' error in node - Stack Overflow
searchEntry event is called once for each found item which means you are calling res.json multiple times. Try this: app.get('/api/ldapUsers' ...
Read more >Cannot modify header information - headers already sent by
Sending header(s) in the test will cause an error: Cannot modify header information - headers already sent by (output started at ...
Read more >What is the "headers already sent" PHP error? - KnownHost
When PHP receives the first output ( print , echo , <html> ) it will “flush” the collected headers. Afterward, it can send...
Read more >How to Fix the "Cannot Modify Header Information - Kinsta
The first thing you need to do when you run into the “Cannot modify header information – headers already sent by” error is...
Read more >HTTP Tests - Laravel - The PHP Framework For Web Artisans
Customizing Request Headers. You may use the withHeaders method to customize the request's headers before it is sent to the application. This method...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
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
Actually, instead of
result.pipe(transformer).pipe(ctx.res)
, tryctx.body = result.pipe(transformer)