<sect1>Changes to existing options<label id="modifiedoptions">
<p>
<descrip>
- <p>There have been no options changed.
+ <tag>logformat</tag>
+ <p>More logged <em>Ss</em> code values may contain an <em>_ABORTED</em>
+ suffix because Squid now adds that suffix in more cases where a TCP
+ Squid-to-server connection was closed prematurely (e.g., an EOF in the
+ middle of a chunked HTTP response body transfer). In general, tools
+ processing <em>Ss</em> code values should treat each value as an
+ underscore-delimited list of tags rather than an enumeration of a few
+ hard-coded values.
+
+ <p>This change affects all <em>Ss</em> code uses, not just those specific to
+ the <em>logformat</em> directive.
</descrip>
</p>
return;
LogTagsErrors lte;
- lte.timedout = (err->xerrno == ETIMEDOUT || err->type == ERR_READ_TIMEOUT);
+ if (err->xerrno == ETIMEDOUT || err->type == ERR_READ_TIMEOUT)
+ lte.timedout = true;
+ else if (err->type != ERR_NONE)
+ lte.aborted = true;
al->cache.code.err.update(lte);
if (!err->detail) {
static const auto d = MakeNamedErrorDetail("WITH_SERVER");
}
}
+/// called on a premature EOF discovered when reading response body
+void
+HttpStateData::markPrematureReplyBodyEofFailure()
+{
+ const auto err = new ErrorState(ERR_READ_ERROR, Http::scBadGateway, fwd->request, fwd->al);
+ static const auto d = MakeNamedErrorDetail("SRV_PREMATURE_EOF");
+ err->detailError(d);
+ fwd->fail(err);
+}
+
/**
* Call this when there is data from the origin server
* which should be sent to either StoreEntry, or to ICAP...
parsedWhole = "http parsed Content-Length body bytes";
else if (clen < 0 && eof)
parsedWhole = "http parsed body ending with expected/required EOF";
+
if (parsedWhole)
markParsedVirginReplyAsWhole(parsedWhole);
+ else if (eof)
+ markPrematureReplyBodyEofFailure();
}
bool
lastChunk = 1;
flags.do_next_read = false;
markParsedVirginReplyAsWhole("http parsed last-chunk");
+ } else if (eof) {
+ markPrematureReplyBodyEofFailure();
}
return true;
}
void sendComplete();
void httpStateConnClosed(const CommCloseCbParams ¶ms);
void httpTimeout(const CommTimeoutCbParams ¶ms);
+ void markPrematureReplyBodyEofFailure();
mb_size_t buildRequestPrefix(MemBuf * mb);
void forwardUpgrade(HttpHeader&);
if (dataWritten) // treat zero-length responses as incomplete
fwd->markStoredReplyAsWhole("whois received/stored the entire response");
+ else
+ fwd->fail(new ErrorState(ERR_ZERO_SIZE_OBJECT, Http::scBadGateway, fwd->request, fwd->al));
fwd->complete();
debugs(75, 3, "whoisReadReply: Done: " << entry->url());