return false;
} else
/* must have a '-' somewhere in _this_ field */
- if (!((p = strchr(field, '-')) || (p - field >= flen))) {
+ if (!((p = strchr(field, '-')) && (p - field < flen))) {
debugs(64, 2, "invalid (missing '-') range-spec near: '" << field << "'");
return false;
} else {
debugs(20, DBG_IMPORTANT, "MemObject->nclients: " << nclients);
debugs(20, DBG_IMPORTANT, "MemObject->reply: " << _reply);
debugs(20, DBG_IMPORTANT, "MemObject->request: " << request);
- debugs(20, DBG_IMPORTANT, "MemObject->log_url: " << log_url << " " << checkNullString(log_url));
+ debugs(20, DBG_IMPORTANT, "MemObject->log_url: " << checkNullString(log_url));
}
HttpReply const *
if (request)
al->adapted_request = HTTPMSGLOCK(request);
accessLogLog(al, checklist);
- updateCounters();
+ if (request)
+ updateCounters();
if (getConn() != NULL && getConn()->clientConnection != NULL)
clientdbUpdate(getConn()->clientConnection->remote, logType, AnyP::PROTO_HTTP, out.size);
ConnStateData * conn = http->getConn();
- if (conn == NULL || !conn->isOpen()) {
- // too late, our conn is closing
- // TODO: should we also quit?
- debugs(33,3, HERE << "not sending more data to a closing " << conn->clientConnection);
+ // too late, our conn is closing
+ // TODO: should we also quit?
+ if (conn == NULL) {
+ debugs(33,3, "not sending more data to a closed connection" );
+ return;
+ }
+ if (!conn->isOpen()) {
+ debugs(33,3, "not sending more data to closing connection " << conn->clientConnection);
return;
}
clientStreamNode *node = (clientStreamNode *)client_stream.tail->prev->data;
clientReplyContext *repContext = dynamic_cast<clientReplyContext *>(node->data.getRaw());
+ assert(repContext);
repContext->createStoreEntry(request->method, request->flags);
EBIT_CLR(storeEntry()->flags, ENTRY_FWD_HDR_WAIT);
debugs (86,3, "esiChooseAdd: Added a new element, elements = " << elements.size());
- if (chosenelement == -1)
- if ((dynamic_cast<esiWhen *>(element.getRaw()))->
- testsTrue()) {
+ if (chosenelement == -1) {
+ const esiWhen * topElement=dynamic_cast<esiWhen *>(element.getRaw());
+ if (topElement && topElement->testsTrue()) {
chosenelement = elements.size() - 1;
debugs (86,3, "esiChooseAdd: Chose element " << elements.size());
}
+ }
}
return true;
/* TODO: factor out these 4 lines */
ConfigOption *ioOptions = IO->io->getOptionTree();
- if (ioOptions)
+ if (currentIOOptions && ioOptions)
currentIOOptions->options.push_back(ioOptions);
}