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 all 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
8 changes: 4 additions & 4 deletions src/client_side.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3921,17 +3921,17 @@ void
ConnStateData::terminateAll(const Error &rawError, const LogTagsErrors &lte)
{
auto error = rawError; // (cheap) copy so that we can detail
// We detail even ERR_NONE: There should be no transactions left, and
// detailed ERR_NONE will be unused. Otherwise, this detail helps in triage.
if (error.details.empty()) {
// There should be a non-empty error if there are some transactions left.
// This detail should help in triage.
if (error && error.details.empty()) {
static const auto d = MakeNamedErrorDetail("WITH_CLIENT");
error.details.push_back(d);
}

debugs(33, 3, pipeline.count() << '/' << pipeline.nrequests << " after " << error);

if (pipeline.empty())
bareError.update(error); // XXX: bareLogTagsErrors
bareError.update(error ? error : ERR_STREAM_FAILURE); // XXX: bareLogTagsErrors

// We terminate the current CONNECT/PUT/etc. context below, logging any
// error details, but that context may leave unparsed bytes behind.
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