Gateway transmits a response using HTTP/1.1 even though client uses HTTP/1.0

Document ID : KB000057579
Last Modified Date : 14/02/2018
Show Technical Document Details

Solution

Background

There are two specific RFCs that specify the appropriate HTTP version to be used by an Web server:

The application section of RFC 2626 states the following: "Applications that are at least conditionally compliant with this specification SHOULD use an HTTP-Version of "HTTP/1.1" in their messages, and MUST do so for any message that is not compatible with HTTP/1.0. For more details on when to send specific HTTP-Version values, see RFC 2145."

This passage indicates that HTTP 1.1 is acceptable as a response to an HTTP 1.0 request as long as the response message does not contain any components that are not compliant with HTTP 1.0. If the response message is 1.0 compliant than a web server--in this case, the Gateway--can and should response using HTTP 1.1 as an indicator to the client application that it also accepts HTTP 1.1.?

This is subsequently corroborated by RFC 2145: "An HTTP server SHOULD send a response version equal to the highest version for which the server is at least conditionally compliant, and whose major version is less than or equal to the one received in the request. An HTTP server MUST NOT send a version for which it is not at least conditionally compliant. A server MAY send a 505 (HTTP Version Not Supported) response if cannot send a response using the major version used in the client's request. ?An HTTP server MAY send a lower response version, if it is known or suspected that the client incorrectly implements the HTTP specification, but this should not be the default, and this SHOULD NOT be done if the request version is HTTP/1.1 or greater."

It is a valid and compliant process to use HTTP/1.1 when responding to HTTP/1.0 as long as the response message is compliant with HTTP/1.0

Presentation

A full HTTP request and response flow (as illustrated by curl) that shows this behavior might appear as follows:

> GET /echo HTTP/1.0
> User-Agent: curl/7.35.0
> Host: gateway.domain.com:8080
> Accept: */*
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Content-Type: text/xml;charset=UTF-8
< Content-Length: 12
< Date: Mon, 08 Sep 2014 11:51:32 GMT
< Connection: close
<a>Test response</a>

As illustrated, an HTTP request is send with HTTP/1.0 but a Gateway responds with HTTP/1.1.

Workaround

There is no workaround for this behavior as it is fully compliant with the relevant RFCs. If an administrator or operator believes that this behavior is negatively impacting an environment then please open up a new support case with Layer 7 Support at CA Technologies. Please ensure that a full description of the experienced behavior and the negative impact to the current deployment is documented. In addition, please refer to this article when opening up the issue.