Skip to content
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 #264

Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/client_side.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3953,9 +3953,15 @@ ConnStateData::terminateAll(const Error &rawError, const LogTagsErrors &lte)
// may be set during the pipeline cleanup above
connLeftovers_ = false;

if (intputToConsume && !inBuf.isEmpty()) {
debugs(83, 5, "forgetting client " << intputToConsume << " bytes: " << inBuf.length());
inBuf.clear();
if (!inBuf.isEmpty()) {
if (intputToConsume) {
debugs(83, 5, "forgetting client " << intputToConsume << " bytes: " << inBuf.length());
inBuf.clear();
} else {
bareError.update(ERR_STREAM_FAILURE);
rousskov marked this conversation as resolved.
Show resolved Hide resolved
static const auto d = MakeNamedErrorDetail("PENDING_REQUEST");
bareError.details.push_back(d);
rousskov marked this conversation as resolved.
Show resolved Hide resolved
}
}

clientConnection->close();
Expand Down
1 change: 1 addition & 0 deletions src/error/forward.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ typedef enum {
ERR_REQUEST_START_TIMEOUT, // Aborts the connection instead of error page
ERR_REQUEST_PARSE_TIMEOUT, // Aborts the connection instead of error page
ERR_RELAY_REMOTE, // Sends server reply instead of error page
ERR_STREAM_FAILURE, // No client to send the error page to

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a distinct description (currently it duplicates ERR_CLIENT_GONE).


/* Cache Manager GUI can install a manager index/home page */
MGR_INDEX,
Expand Down