java - Tomcat take request body of previous request as request header in keep alive connection when servlet hasn't read it -


tomcat read request headers fully, post body need read servlet.

my question happens request body if servlet send response without reading it? discarded or taken request header of next request when connection keep alive case of http/1.1.

i think it's bug nginx process scenario correctly. did't found bug-report in bz.apache.org.

what's supposed behavior in case web-server?

tomcat version:7.0.55,request body send content-length not chunked.

background:

i have 2 post request both have request body(json string) send using 1 connection(http/1.1 keep alive on default), servlet first request doesn't read request body, tomcat take request body next request header, , client got http/1.1 505 http version not supported. in access log of tomcat, request url request body, json string.

10.128.8.6 - - [29/jan/2016:09:47:30 +0800] "post /action1.do http/1.1" 200 57 10.128.8.6 - - [29/jan/2016:09:47:30 +0800] "[123]post /action2.do http/1.1" 505 - 

the body discarded if not read processing of request.

this nothing tomcat or servlets, such, http protocol. http protocol stateless, , behaviour asking require server remember body of first request: hold information state. make no sense so: body of post request unlikely contain bytes interpreted request header.

tomcat unlikely have such fundamental , damaging bug. if think seeing such bug, misinterpreting something.


Comments