0

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.

flup
  • 26,937
  • 7
  • 52
  • 74
cristian
  • 518
  • 5
  • 20

2 Answers2

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.

Sam Varshavchik
  • 114,536
  • 5
  • 94
  • 148
  • Thank you for answer. I'm trying to find out why this difference in response though. For tomcat8.0: `GET / HTTP/1.1" 404 994` and for tomcat8.5: `GET / HTTP/1.1" 404 992` in tomcat logs. Can this be a clue for what is happening ? – cristian Aug 24 '16 at 11:32
  • When I runt the client I have the same for both versions: `PUT /printing/pc HTTP/1.1" 200 14` – cristian Aug 24 '16 at 11:37
  • 1
    The server is free to return any response that complies with HTTP 1.1. Both responses do. An HTTP client doesn't care. Since the Server: header is meaningless, it does not, and should not care. It is not specified in the protocol. A client that has a problem if the header does or does not exist is broken, and should be fixed to comply with RFC 2616. – Sam Varshavchik Aug 24 '16 at 11:46
0

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>

flup
  • 26,937
  • 7
  • 52
  • 74