сб, 1 дек. 2018 г. в 01:30, Kohei Nozaki <ko...@nozaki.me>:
>
> Hello Christopher, thank you for your help.
>
> * Our downstream Nginx instance (The client of our Tomcat instance) recorded 
> the error "upstream sent no valid HTTP/1.0 header while reading response 
> header from upstream" at that time and the error makes perfect sense 
> concerning the response which has neither HTTP status line nor HTTP headers.
>
> Speaking of a possibility of a bug, a person commented on the Stackoverflow 
> question and said that there might be something in the request that possibly 
> downgrades the connection to HTTP/0.9. Do you think it's possible? The 
> comments can be seen from the URL below:
>
> https://stackoverflow.com/questions/53496598/tomcat-occasionally-returns-a-response-without-http-headers#comment93976313_53552752

1. See the official FAQ / Troubleshoting page:
https://wiki.apache.org/tomcat/FAQ/Troubleshooting_and_Diagnostics

Especially pay attention to
1) configuring an access log
2) setting system property
org.apache.catalina.connector.RECYCLE_FACADES=true

(and Java ImageIO stream handling bug)

2. HTTP 0.9 is a valid response format (a feature, not a bug) that
does not contain status line nor headers, sends just the requested
document and closes the connection afterwards. The "Specifications"
page in the wiki has a link to the original specification, if you are
interested.

But HTTP 0.9 should never mix itself with chunked encoding. (The "5d +
CRLF" chunk size that you are seeing).

3. If somebody calls "out.flush()" (or response.flushBuffer()) before
writing a response body, the headers and the body will be sent as
separate packets and may appear separately in wireshark.  It is a
valid behaviour.

(But your client should see the headers. It shouldn't report that
headers are missing).

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to