nginx 400 bad request

Maxim Dounin mdounin at mdounin.ru
Sat Dec 10 20:21:39 UTC 2022


Hello!

On Sat, Dec 10, 2022 at 12:03:04PM +0530, Vishwas Bm wrote:

> I am using nginx 1.22.1 and for some requests from client, I am seeing
> below 400 bad request errors.
> 
> Below are some error messages:
> 
> "log":{"message":"225#225: *8413018 client sent invalid method while
> reading client pipelined request line, client: 10.178.111.18, server: _,
> request: 'ocality': 'ny','mode': 'proactive','type': 'HSS','service':
> {'type': 'str','kspaces': [],'prtl': 'nds','traffic_type':
> 'rst'}}<92>¹ÏNfGå<8d>¹Âø^FÍ^XÌb<9d>jó<91>¸<81>Ô|]\P0Q^P'^\BÝ<93>ÛT±R'"}}
> 
> {"[ocality\x22: \x22NY\x22,\x22mode\x22: \x22proactive\x22,\x22type\x22:
> \x22TSS\x22,\x22service\x22: {\x22type\x22:
> \x22storage\x22,\x22keyspaces\x22: [],\x22protocol\x22:
> \x22nds\x22,\x22traffic_type\x22:
> \x22rts\x22}}\x92\xB9\xCFNfG\xE5\x8D\xB9\xC2\xF8\x06\xCD\x18\xCCb\x9Dj\xF3\x91\xB8\x81\xD4|]\x5CP0Q\x10\x22\x1CB\xDD\x93\xDBT\xB1R]
> 400 150 [-] [-] 0 10.577 [] - - - - b1d1932b3a43ced62c2ebfa80d435092"}}
> 
> 
> Is there any way to decode this or Is the garbled data itself causing nginx
> to say 400 errors ?
> Can someone help me with this ?

>From the error message it looks like the client incorrectly 
specified Content-Length in the request, so the rest of the 
request body not covered by Content-Length is interpreted as 
another request (and rejected by nginx, because obviously enough 
it is not a valid HTTP request).

-- 
Maxim Dounin
http://mdounin.ru/



More information about the nginx mailing list