Missing `Content-Length` in headers may cause nginx 411 Length Required Error.
See original GitHub issueI’m not sure this is a bug, but content-length
should be prepared in headers so that server knows when the chunk datas end.
I fixed this in my own project about uploading a file by calling getLength()
in headers, but this cause a lot time when sending a big file.
As I know, chrome added content-length
before sending the whole post content.
Issue Analytics
- State:
- Created 10 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How To Fix the “411 Length Required” Error (4 Methods) - Kinsta
Fortunately, you can easily fix the “411 Length Required” error. This HTTP status code happens when the server requires a content-length header, ...
Read more >Is there a way to avoid nginx 411 Content-Length required ...
Obviously you can't assume that the content continues until the connection is closed (which is what an absent content-length header implies), because the ......
Read more >411 Length Required - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 411 Length Required client error response code indicates that the server refuses to accept the request ...
Read more >nginx proxy_pass of PUT with no Content-Length header ...
I am having trouble with nginx proxy_pass and PUT without a Content-Length header returning a 411 error. What I run to test this:...
Read more >411 Length Required error - NGINX - Ruby-Forum
My mistake on that last message. I read the wrong headers info. It seems ngninx reports no Content-Length header was sent but according...
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
Nothing special, this is my solution:
Here goes
getLengthSync()
version(wrong length)@yyfrankyy I updated Readme.