ims = -1;
imslen = 0;
lastmod = -1;
- max_forwards = -1;
client_addr.SetEmpty();
my_addr.SetEmpty();
body_pipe = NULL;
// range handled in hdrCacheInit()
copy->ims = ims;
copy->imslen = imslen;
- copy->max_forwards = max_forwards;
copy->hier = hier; // Is it safe to copy? Should we?
copy->errType = errType;
int imslen;
- int64_t max_forwards;
-
IpAddress client_addr;
#if FOLLOW_X_FORWARDED_FOR
} else
conn->cleanDechunkingRequest();
- if (method == METHOD_TRACE || method == METHOD_OPTIONS)
- request->max_forwards = request->header.getInt64(HDR_MAX_FORWARDS);
-
- mustReplyToOptions = (method == METHOD_OPTIONS) && (request->max_forwards == 0);
+ mustReplyToOptions = (method == METHOD_OPTIONS) &&
+ (request->header.getInt64(HDR_MAX_FORWARDS) == 0);
unsupportedTe = tePresent && !deChunked;
if (!urlCheckRequest(request) || mustReplyToOptions || unsupportedTe) {
clientStreamNode *node = context->getClientReplyContext();
{
clientStreamNode *nextNode = (clientStreamNode *)node->node.next->data;
StoreIOBuffer localTempBuffer;
- assert(http->request->max_forwards == 0);
createStoreEntry(http->request->method, request_flags());
localTempBuffer.offset = nextNode->readBuffer.offset + headers_sz;
localTempBuffer.length = nextNode->readBuffer.length;
// OPTIONS with Max-Forwards:0 handled in clientProcessRequest()
if (context->http->request->method == METHOD_TRACE) {
- if (context->http->request->max_forwards == 0) {
+ if (context->http->request->header.getInt64(HDR_MAX_FORWARDS) == 0) {
context->traceReply(aNode);
return;
}
// we support OPTIONS and TRACE directed at us (with a 501 reply, for now)
// we also support forwarding OPTIONS and TRACE, except for the *-URI ones
if (r->method == METHOD_OPTIONS || r->method == METHOD_TRACE)
- return (r->max_forwards == 0 || r->urlpath != "*");
+ return (r->header.getInt64(HDR_MAX_FORWARDS) == 0 || r->urlpath != "*");
if (r->method == METHOD_PURGE)
return 1;