-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix %err_code/%err_detail for some error:transaction-end-before-headers #270
base: master
Are you sure you want to change the base?
Fix %err_code/%err_detail for some error:transaction-end-before-headers #270
Conversation
These format codes were empty in some situations for the second (and subsequent) pipeline transactions if something went wrong with the previous transaction (e.g., client connection was aborted, server send an incomplete response body, etc.). Now a new ERR_STREAM_FAILURE error code marks all these cases.
Also simplified the leftovers logging code, removing checkLogging().
src/client_side.cc
Outdated
if (intputToConsume && !inBuf.isEmpty()) { | ||
debugs(83, 5, "forgetting client " << intputToConsume << " bytes: " << inBuf.length()); | ||
inBuf.clear(); | ||
if (!terminatedAll) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This flag prevents from logging twice a transaction with zero bytes (!pipeline.nrequests is true). The second terminateAll() call is from swanSong(). We could also reset inBuf below (so that leftovers would be false upon the second call).
http.req_sz = inBuf.length(); | ||
// XXX: Or we died while waiting for the pinned connection to become idle. | ||
http.setErrorUri("error:transaction-end-before-headers"); | ||
http.updateError(bareError); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like bareError became used after removing checkLogging() - we can probably remove it too.
This method is not responsible for inBuf cleanup. Added some other checks upon the 'terminatedAll' state.
These format codes were empty in some situations for the second (and
subsequent) pipeline transactions if something went wrong with the
previous transaction (e.g., client connection was aborted, server
send an incomplete response body, etc.). Now a new ERR_STREAM_FAILURE
error code (together with 'WITH_CLIENT' error detail) marks all these
cases.