-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Chunked HTTP APIs send (final/empty) chunk in response to HEAD requests #92032
Comments
Pinging @elastic/es-distributed (Team:Distributed) |
This reverts commit 75de8f8 due to #92032 and elastic/kibana#146758
Is this in fact a Netty bug? It looks like the trailing |
@DaveCTurner yea looks suspicious, on it now. |
For the record the only other endpoint I can see that supports |
++ also I hunted this down. Fix incoming, it's Netty indeed but there's an "official" fix for this. |
Response bodies must always be empty for HEAD requests. Since the request encoder does not know that its dealing with a response to a HEAD request we have to indicate this fact to it. Also, needed to adjust the test http client to use the http-codec so it is able to correlate what responses are meant for HEAD requests and will correctly read responses for HEAD requests. Without this change the added test reproduces the extra bytes and fails with an assert about more than one response received. closes elastic#92032
Response bodies must always be empty for HEAD requests. Since the request encoder does not know that its dealing with a response to a HEAD request we have to indicate this fact to it. Also, needed to adjust the test http client to use the http-codec so it is able to correlate what responses are meant for HEAD requests and will correctly read responses for HEAD requests. Without this change the added test reproduces the extra bytes and fails with an assert about more than one response received. closes #92032
…c#92042) Response bodies must always be empty for HEAD requests. Since the request encoder does not know that its dealing with a response to a HEAD request we have to indicate this fact to it. Also, needed to adjust the test http client to use the http-codec so it is able to correlate what responses are meant for HEAD requests and will correctly read responses for HEAD requests. Without this change the added test reproduces the extra bytes and fails with an assert about more than one response received. closes elastic#92032
…92042) (#92049) * Fix Chunked APIs sending incorrect responses to HEAD requests (#92042) Response bodies must always be empty for HEAD requests. Since the request encoder does not know that its dealing with a response to a HEAD request we have to indicate this fact to it. Also, needed to adjust the test http client to use the http-codec so it is able to correlate what responses are meant for HEAD requests and will correctly read responses for HEAD requests. Without this change the added test reproduces the extra bytes and fails with an assert about more than one response received. closes #92032 * fix compile
Responses to
HEAD
requests should contain no body, but we send an empty body instead. That's indistinguishable for one-shot APIs, but with chunked encoding this means we send a single empty chunk as a terminator:This became particularly noticeable with #92016 because
HEAD /<index>
is the recognised way to determine if an index exists, but really this is a general problem with the infrastructure introduced in #88311.The text was updated successfully, but these errors were encountered: