for (const char *p = startExt; p < endExt;) {
while (*p == ' ' || *p == '\t') ++p; // skip spaces before ';'
-
+
if (*p++ != ';') // each ext name=value pair is preceded with ';'
return;
-
+
while (*p == ' ' || *p == '\t') ++p; // skip spaces before name
-
+
if (p >= endExt)
return; // malformed extension: ';' without ext name=value pair
// check that use-original-body=N does not point beyond buffered data
const uint64_t virginDataEnd = virginConsumed +
- virgin.body_pipe->buf().contentSize();
+ virgin.body_pipe->buf().contentSize();
Must(pos <= virginDataEnd);
virginBodySending.progress(static_cast<size_t>(pos));
const bool allow206out = state.allowedPostview206 = shouldAllow206out();
debugs(93,9, HERE << "Allows: " << allow204in << allow204out <<
- allow206in << allow206out);
+ allow206in << allow206out);
const bool allow204 = allow204in || allow204out;
const bool allow206 = allow206in || allow206out;
allowHeader = "Allow: 204\r\n";
else if (allow206)
allowHeader = "Allow: 206\r\n";
-
+
if (allowHeader) { // may be nil if only allow204in is true
buf.append(allowHeader, strlen(allowHeader));
debugs(93,5, HERE << "Will write " << allowHeader);
bool Adaptation::Icap::ModXact::shouldAllow206any()
{
return TheConfig.allow206_enable && service().allows206() &&
- virginBody.expected(); // no need for 206 without a body
+ virginBody.expected(); // no need for 206 without a body
}
// decides whether to allow 206 responses in preview mode
// will not use virgin.body_pipe
bool doneConsumingVirgin() const {
return writing >= writingAlmostDone
- && ((sending == sendingAdapted && !readyForUob) ||
- sending == sendingDone);
+ && ((sending == sendingAdapted && !readyForUob) ||
+ sending == sendingDone);
}
// parsed entire ICAP response from the ICAP server