问题
Using tomcat8.5 ...I'm not getting the complete response as using tomcat8.0.
There is a difference between this 2 versions about the HTTP request or response?
PUT tomcat8.0 response:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
Date: Tue, 23 Aug 2016 08:59:48 GMT
PUT tomcat8.5 response:
HTTP/1.1 200
Transfer-Encoding: chunked
Date: Tue, 23 Aug 2016 09:05:20 GMT
I'm using C++ soket methods to send the request.
回答1:
Well, obviously there's a difference in the content of the actual response. However, the Server:
header means nothing as far as HTTP 1.1
is concerned, and it carries no special meaning in the protocol.
Technically, the two responses are identical, and carry identical information about the response: this is a chunked-encoded response. End of story.
If you're writing a client that uses HTTP, you should be familiar with RFC 2616, which explains this.
回答2:
Tomcat 8.5 dropped support for the reason phrase. See the migration guide:
HTTP connector changes
HTTP reason phrases have been removed by default, but can be re-enabled using the sendReasonPhrase configuration attribute.
You can reenable it in your Connector configuration, but it'll be gone in Tomcat 9.
<Connector ... sendReasonPhrase="true">
...
</Connector>
来源:https://stackoverflow.com/questions/39120756/tomcat-8-5-header-missing-in-the-http-response