-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traffic Router inconsistent behavior on HTTP HEAD requests #3965
Comments
Alternatively, chunked responses with zero chunks would be fine, I think. Not sure why we'd want to do that, but it just seems like something on the TR end is expecting to write data but doesn't get it. |
The wait itself is wontfix cURL-specific behavior. From a curl-users mailing list thread:
That said, setting a content length does get rid of the timeout. As a proof-of-concept, I have added the Would we also want to ensure a content length for the TR API? |
Per RFC 7231:
TR sends |
Sorry... actually, I think the bigger problem is the |
Most of the API's mappings return a ResponseEntity The documentation will need to be updated to reflect the change in response headers. |
I haven't verified hits PR, but what would be the Content-Length on a Steering delivery services with |
This seems to be a big deal.. More than half our requests are HEAD requests... That should change the TCP stats for our Traffic Routers considerably. |
I don't object to the change itself, but I have concerns about what's driving it. The HTTP Spec says servers MUST NOT send Therefore, any Clients which require
Right. So, the server isn't in violation of the spec here, it's permitted to include Tranfer-Encoding. But I agree, it probably shouldn't. But moreover, Transfer-Encoding is a payload field, and HEAD payloads have no defined semantics. So, if it's confusing any clients, those clients are violating the HTTP spec. So again, it doesn't seem wrong to change the server (maybe even following the Robustness Principle). But we should fix the broken clients driving this. |
But why do we bother to send |
Is GET not chunked? |
Nope. See my examples of the current GET/HEAD responses in the issue description.
while HEAD responds with:
IMHO, they should both just be sending Content-Length. |
I'm submitting a ...
Traffic Control components affected ...
Current behavior:
The TR response to a HEAD request should resemble the same as a GET response. However, the behavior I'm seeing seems problematic. Following examples of each (from curl output) with timing info included:
Proper GET response:
Improper HEAD response:
Note that the HEAD response is including
Transfer-Encoding: chunked
, which is causing the client to wait for body data which never arrives. After ~10 seconds, Traffic Router times out the connection and resets the TCP connection (verified TR sends FIN at this point with a packet capture).Expected / new behavior:
TR should be responding to a HEAD request with
Content-Length: 0
, and NOTTransfer-Encoding: chunked
.Minimal reproduction of the problem with instructions:
Traffic Router version: 3.0.0-9930.f225e63b.el7
Problem can easily be replicated by sending a HEAD request with curl:
Anything else:
The text was updated successfully, but these errors were encountered: