Welcome! Log In Create A New Profile

Advanced

Re: nginx 400 bad request

Maxim Dounin
December 14, 2022 06:52PM
Hello!

On Wed, Dec 14, 2022 at 03:32:00PM +0530, Vishwas Bm wrote:

> Thanks for the response.
> What happens when content-length provided in request is greater than the
> post body size?
> How does nginx handle this case ?
> Does it fail with 400 ?
>
> Also how is the truncation/padding done in case of lesser or higher content
> length ?

In HTTP/1.x, Content-Length specifies the exact size of the
request body. Anything after it sent on the same persistent
connection is expected to be the next request, and it is
interpreted as an HTTP request. As long as it is not a valid HTTP
request, like in the case you are seeing in your logs, the 400
(Bad request) error is generated by nginx.

For further information about the HTTP protocol consider reading
relevant RFCs, notably RFC 9112
(https://www.rfc-editor.org/rfc/rfc9112).

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx 400 bad request

Vishwas Bm December 10, 2022 01:36AM

Re: nginx 400 bad request

Maxim Dounin December 10, 2022 03:24PM

Re: nginx 400 bad request

Vishwas Bm December 14, 2022 05:04AM

Re: nginx 400 bad request

Maxim Dounin December 14, 2022 06:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 246
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready