--------------------- PatchSet 1628 Date: 2001/02/21 18:46:33 Author: adri Branch: modio Tag: (none) Log: Remove the current range request implementation. This deletes the range request code which exists outside of the HttpHdr*Range*.c routines (which we can probably reuse chunks of later on.) I don't know if I managed to snatch all of the code here. Initial tests work, but i Haven't managed to coax a range request out of it yet. Members: src/HttpRequest.c:1.2.2.3->1.2.2.4 src/client_side.c:1.2.2.21->1.2.2.22 src/ftp.c:1.2.2.6->1.2.2.7 src/http.c:1.2.2.6->1.2.2.7 src/structs.h:1.2.2.18->1.2.2.19 Index: squid/src/HttpRequest.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/HttpRequest.c,v retrieving revision 1.2.2.3 retrieving revision 1.2.2.4 diff -u -r1.2.2.3 -r1.2.2.4 --- squid/src/HttpRequest.c 6 Feb 2001 10:08:03 -0000 1.2.2.3 +++ squid/src/HttpRequest.c 21 Feb 2001 18:46:33 -0000 1.2.2.4 @@ -1,6 +1,6 @@ /* - * $Id: HttpRequest.c,v 1.2.2.3 2001/02/06 10:08:03 adri Exp $ + * $Id: HttpRequest.c,v 1.2.2.4 2001/02/21 18:46:33 adri Exp $ * * DEBUG: section 73 HTTP Request * AUTHOR: Duane Wessels @@ -79,8 +79,6 @@ httpHeaderClean(&req->header); if (req->cache_control) httpHdrCcDestroy(req->cache_control); - if (req->range) - httpHdrRangeDestroy(req->range); cbdataFree(req); } Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.2.2.21 retrieving revision 1.2.2.22 diff -u -r1.2.2.21 -r1.2.2.22 --- squid/src/client_side.c 20 Feb 2001 16:15:25 -0000 1.2.2.21 +++ squid/src/client_side.c 21 Feb 2001 18:46:34 -0000 1.2.2.22 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.2.2.21 2001/02/20 16:15:25 adri Exp $ + * $Id: client_side.c,v 1.2.2.22 2001/02/21 18:46:34 adri Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -78,7 +78,6 @@ /* Local functions */ static CWCB clientWriteComplete; -static CWCB clientWriteBodyComplete; static PF clientReadRequest; static PF connStateFree; static PF requestTimeout; @@ -103,8 +102,6 @@ static STCB clientSendMoreData; static STCB clientCacheHit; static void clientSetKeepaliveFlag(clientHttpRequest *); -static void clientPackRangeHdr(const HttpReply * rep, const HttpHdrRangeSpec * spec, String boundary, MemBuf * mb); -static void clientPackTermBound(String boundary, MemBuf * mb); static void clientInterpretRequestHeaders(clientHttpRequest *); static void clientProcessRequest(clientHttpRequest *); static void clientProcessExpired(void *data); @@ -798,7 +795,6 @@ safe_free(http->al.headers.request); safe_free(http->al.headers.reply); safe_free(http->redirect.location); - stringClean(&http->range_iter.boundary); if ((e = http->entry)) { http->entry = NULL; storeClientUnregister(e, http); @@ -911,12 +907,15 @@ #endif request->flags.nocache = 1; } + /* ignore range header in non-GETs */ if (request->method == METHOD_GET) { - request->range = httpHeaderGetRange(req_hdr); - if (request->range) - request->flags.range = 1; + if (httpHeaderHas(req_hdr, HDR_RANGE)) + request->flags.range = 1; + if (httpHeaderHas(req_hdr, HDR_REQUEST_RANGE)) + request->flags.range = 1; } + if (httpHeaderHas(req_hdr, HDR_AUTHORIZATION)) request->flags.auth = 1; if (request->login[0] != '\0') @@ -1092,149 +1091,6 @@ return 0; } -/* - * returns true if If-Range specs match reply, false otherwise - */ -static int -clientIfRangeMatch(clientHttpRequest * http, HttpReply * rep) -{ - const TimeOrTag spec = httpHeaderGetTimeOrTag(&http->request->header, HDR_IF_RANGE); - /* check for parsing falure */ - if (!spec.valid) - return 0; - /* got an ETag? */ - if (spec.tag.str) { - ETag rep_tag = httpHeaderGetETag(&rep->header, HDR_ETAG); - debug(33, 3) ("clientIfRangeMatch: ETags: %s and %s\n", - spec.tag.str, rep_tag.str ? rep_tag.str : ""); - if (!rep_tag.str) - return 0; /* entity has no etag to compare with! */ - if (spec.tag.weak || rep_tag.weak) { - debug(33, 1) ("clientIfRangeMatch: Weak ETags are not allowed in If-Range: %s ? %s\n", - spec.tag.str, rep_tag.str); - return 0; /* must use strong validator for sub-range requests */ - } - return etagIsEqual(&rep_tag, &spec.tag); - } - /* got modification time? */ - if (spec.time >= 0) { - return http->entry->lastmod <= spec.time; - } - assert(0); /* should not happen */ - return 0; -} - -/* returns expected content length for multi-range replies - * note: assumes that httpHdrRangeCanonize has already been called - * warning: assumes that HTTP headers for individual ranges at the - * time of the actuall assembly will be exactly the same as - * the headers when clientMRangeCLen() is called */ -static int -clientMRangeCLen(clientHttpRequest * http) -{ - int clen = 0; - HttpHdrRangePos pos = HttpHdrRangeInitPos; - const HttpHdrRangeSpec *spec; - MemBuf mb; - - assert(http->entry->mem_obj); - - memBufDefInit(&mb); - while ((spec = httpHdrRangeGetSpec(http->request->range, &pos))) { - - /* account for headers for this range */ - memBufReset(&mb); - clientPackRangeHdr(http->entry->mem_obj->reply, - spec, http->range_iter.boundary, &mb); - clen += mb.size; - - /* account for range content */ - clen += spec->length; - - debug(33, 6) ("clientMRangeCLen: (clen += %d + %d) == %d\n", - mb.size, spec->length, clen); - } - /* account for the terminating boundary */ - memBufReset(&mb); - clientPackTermBound(http->range_iter.boundary, &mb); - clen += mb.size; - - memBufClean(&mb); - return clen; -} - -/* adds appropriate Range headers if needed */ -static void -clientBuildRangeHeader(clientHttpRequest * http, HttpReply * rep) -{ - HttpHeader *hdr = rep ? &rep->header : 0; - const char *range_err = NULL; - request_t *request = http->request; - assert(request->range); - /* check if we still want to do ranges */ - if (!rep) - range_err = "no [parse-able] reply"; - else if (rep->sline.status != HTTP_OK) - range_err = "wrong status code"; - else if (httpHeaderHas(hdr, HDR_CONTENT_RANGE)) - range_err = "origin server does ranges"; - else if (rep->content_length < 0) - range_err = "unknown length"; - else if (rep->content_length != http->entry->mem_obj->reply->content_length) - range_err = "INCONSISTENT length"; /* a bug? */ - else if (httpHeaderHas(&http->request->header, HDR_IF_RANGE) && !clientIfRangeMatch(http, rep)) - range_err = "If-Range match failed"; - else if (!httpHdrRangeCanonize(http->request->range, rep->content_length)) - range_err = "canonization failed"; - else if (httpHdrRangeIsComplex(http->request->range)) - range_err = "too complex range header"; - else if (!request->flags.cachable) /* from we_do_ranges in http.c */ - range_err = "non-cachable request"; - /* get rid of our range specs on error */ - if (range_err) { - debug(33, 3) ("clientBuildRangeHeader: will not do ranges: %s.\n", range_err); - httpHdrRangeDestroy(http->request->range); - http->request->range = NULL; - } else { - const int spec_count = http->request->range->specs.count; - int actual_clen = -1; - - debug(33, 3) ("clientBuildRangeHeader: range spec count: %d virgin clen: %d\n", - spec_count, rep->content_length); - assert(spec_count > 0); - /* ETags should not be returned with Partial Content replies? */ - httpHeaderDelById(hdr, HDR_ETAG); - /* append appropriate header(s) */ - if (spec_count == 1) { - HttpHdrRangePos pos = HttpHdrRangeInitPos; - const HttpHdrRangeSpec *spec = httpHdrRangeGetSpec(http->request->range, &pos); - assert(spec); - /* append Content-Range */ - httpHeaderAddContRange(hdr, *spec, rep->content_length); - /* set new Content-Length to the actual number of bytes - * transmitted in the message-body */ - actual_clen = spec->length; - } else { - /* multipart! */ - /* generate boundary string */ - http->range_iter.boundary = httpHdrRangeBoundaryStr(http); - /* delete old Content-Type, add ours */ - httpHeaderDelById(hdr, HDR_CONTENT_TYPE); - httpHeaderPutStrf(hdr, HDR_CONTENT_TYPE, - "multipart/byteranges; boundary=\"%s\"", - strBuf(http->range_iter.boundary)); - /* Content-Length is not required in multipart responses - * but it is always nice to have one */ - actual_clen = clientMRangeCLen(http); - } - - /* replace Content-Length header */ - assert(actual_clen >= 0); - httpHeaderDelById(hdr, HDR_CONTENT_LENGTH); - httpHeaderPutInt(hdr, HDR_CONTENT_LENGTH, actual_clen); - debug(33, 3) ("clientBuildRangeHeader: actual content length: %d\n", actual_clen); - } -} /* * filters out unwanted entries from original reply header @@ -1279,9 +1135,6 @@ httpHeaderDelById(hdr, HDR_CONNECTION); stringClean(&strConnection); } - /* Handle Ranges */ - if (request->range) - clientBuildRangeHeader(http, rep); /* * Add a estimated Age header on cache hits. */ @@ -1351,19 +1204,15 @@ httpBuildVersion(&rep->sline.version, 1, 0); /* do header conversions */ clientBuildReplyHeader(http, rep); + /* if we do ranges, change status to "Partial Content" */ - if (http->request->range) + if (http->request->flags.range) httpStatusLineSet(&rep->sline, rep->sline.version, HTTP_PARTIAL_CONTENT, NULL); } else { /* parsing failure, get rid of the invalid reply */ httpReplyDestroy(rep); rep = NULL; - /* if we were going to do ranges, backoff */ - if (http->request->range) { - /* this will fail and destroy request->range */ - clientBuildRangeHeader(http, rep); - } } return rep; } @@ -1526,168 +1375,6 @@ } } -/* put terminating boundary for multiparts */ -static void -clientPackTermBound(String boundary, MemBuf * mb) -{ - memBufPrintf(mb, "\r\n--%s--\r\n", strBuf(boundary)); - debug(33, 6) ("clientPackTermBound: buf offset: %d\n", mb->size); -} - -/* appends a "part" HTTP header (as in a multi-part/range reply) to the buffer */ -static void -clientPackRangeHdr(const HttpReply * rep, const HttpHdrRangeSpec * spec, String boundary, MemBuf * mb) -{ - HttpHeader hdr; - Packer p; - assert(rep); - assert(spec); - - /* put boundary */ - debug(33, 5) ("clientPackRangeHdr: appending boundary: %s\n", strBuf(boundary)); - /* rfc2046 requires to _prepend_ boundary with ! */ - memBufPrintf(mb, "\r\n--%s\r\n", strBuf(boundary)); - - /* stuff the header with required entries and pack it */ - httpHeaderInit(&hdr, hoReply); - if (httpHeaderHas(&rep->header, HDR_CONTENT_TYPE)) - httpHeaderPutStr(&hdr, HDR_CONTENT_TYPE, httpHeaderGetStr(&rep->header, HDR_CONTENT_TYPE)); - httpHeaderAddContRange(&hdr, *spec, rep->content_length); - packerToMemInit(&p, mb); - httpHeaderPackInto(&hdr, &p); - packerClean(&p); - httpHeaderClean(&hdr); - - /* append (we packed a header, not a reply) */ - memBufPrintf(mb, crlf); -} - -/* - * extracts a "range" from *buf and appends them to mb, updating - * all offsets and such. - */ -static void -clientPackRange(clientHttpRequest * http, - HttpHdrRangeIter * i, - const char **buf, - ssize_t * size, - MemBuf * mb) -{ - const ssize_t copy_sz = i->debt_size <= *size ? i->debt_size : *size; - off_t body_off = http->out.offset - i->prefix_size; - assert(*size > 0); - assert(i->spec); - /* - * intersection of "have" and "need" ranges must not be empty - */ - assert(body_off < i->spec->offset + i->spec->length); - assert(body_off + *size > i->spec->offset); - /* - * put boundary and headers at the beginning of a range in a - * multi-range - */ - if (http->request->range->specs.count > 1 && i->debt_size == i->spec->length) { - assert(http->entry->mem_obj); - clientPackRangeHdr( - http->entry->mem_obj->reply, /* original reply */ - i->spec, /* current range */ - i->boundary, /* boundary, the same for all */ - mb - ); - } - /* - * append content - */ - debug(33, 3) ("clientPackRange: appending %d bytes\n", copy_sz); - memBufAppend(mb, *buf, copy_sz); - /* - * update offsets - */ - *size -= copy_sz; - i->debt_size -= copy_sz; - body_off += copy_sz; - *buf += copy_sz; - http->out.offset = body_off + i->prefix_size; /* sync */ - /* - * paranoid check - */ - assert(*size >= 0 && i->debt_size >= 0); -} - -/* returns true if there is still data available to pack more ranges - * increments iterator "i" - * used by clientPackMoreRanges */ -static int -clientCanPackMoreRanges(const clientHttpRequest * http, HttpHdrRangeIter * i, ssize_t size) -{ - /* first update "i" if needed */ - if (!i->debt_size) { - if ((i->spec = httpHdrRangeGetSpec(http->request->range, &i->pos))) - i->debt_size = i->spec->length; - } - assert(!i->debt_size == !i->spec); /* paranoid sync condition */ - /* continue condition: need_more_data && have_more_data */ - return i->spec && size > 0; -} - -/* extracts "ranges" from buf and appends them to mb, updating all offsets and such */ -/* returns true if we need more data */ -static int -clientPackMoreRanges(clientHttpRequest * http, const char *buf, ssize_t size, MemBuf * mb) -{ - HttpHdrRangeIter *i = &http->range_iter; - /* offset in range specs does not count the prefix of an http msg */ - off_t body_off = http->out.offset - i->prefix_size; - assert(size >= 0); - /* check: reply was parsed and range iterator was initialized */ - assert(i->prefix_size > 0); - /* filter out data according to range specs */ - while (clientCanPackMoreRanges(http, i, size)) { - off_t start; /* offset of still missing data */ - assert(i->spec); - start = i->spec->offset + i->spec->length - i->debt_size; - debug(33, 3) ("clientPackMoreRanges: in: offset: %d size: %d\n", - (int) body_off, size); - debug(33, 3) ("clientPackMoreRanges: out: start: %d spec[%d]: [%d, %d), len: %d debt: %d\n", - (int) start, (int) i->pos, i->spec->offset, (int) (i->spec->offset + i->spec->length), i->spec->length, i->debt_size); - assert(body_off <= start); /* we did not miss it */ - /* skip up to start */ - if (body_off + size > start) { - const size_t skip_size = start - body_off; - body_off = start; - size -= skip_size; - buf += skip_size; - } else { - /* has not reached start yet */ - body_off += size; - size = 0; - buf = NULL; - } - /* put next chunk if any */ - if (size) { - http->out.offset = body_off + i->prefix_size; /* sync */ - clientPackRange(http, i, &buf, &size, mb); - body_off = http->out.offset - i->prefix_size; /* sync */ - } - } - assert(!i->debt_size == !i->spec); /* paranoid sync condition */ - debug(33, 3) ("clientPackMoreRanges: buf exhausted: in: offset: %d size: %d need_more: %d\n", - (int) body_off, size, i->debt_size); - if (i->debt_size) { - debug(33, 3) ("clientPackMoreRanges: need more: spec[%d]: [%d, %d), len: %d\n", - (int) i->pos, i->spec->offset, (int) (i->spec->offset + i->spec->length), i->spec->length); - /* skip the data we do not need if possible */ - if (i->debt_size == i->spec->length) /* at the start of the cur. spec */ - body_off = i->spec->offset; - else - assert(body_off == i->spec->offset + i->spec->length - i->debt_size); - } else if (http->request->range->specs.count > 1) { - /* put terminating boundary for multiparts */ - clientPackTermBound(i->boundary, mb); - } - http->out.offset = body_off + i->prefix_size; /* sync */ - return i->debt_size > 0; -} static int clientReplyBodyTooLarge(int clen) @@ -1848,15 +1535,6 @@ http); return; } - /* reset range iterator */ - http->range_iter.pos = HttpHdrRangeInitPos; - } else if (!http->request->range) { - /* Avoid copying to MemBuf for non-range requests */ - /* Note, if we're here, then 'rep' is known to be NULL */ - http->out.offset += body_size; - comm_write(fd, buf, size, clientWriteBodyComplete, http, NULL); - /* NULL because clientWriteBodyComplete frees it */ - return; } if (http->request->method == METHOD_HEAD) { if (rep) { @@ -1891,40 +1569,18 @@ memBufDefInit(&mb); } /* append body if any */ - if (http->request->range) { - /* Only GET requests should have ranges */ - assert(http->request->method == METHOD_GET); - /* clientPackMoreRanges() updates http->out.offset */ - /* force the end of the transfer if we are done */ - if (!clientPackMoreRanges(http, body_buf, body_size, &mb)) - http->flags.done_copying = 1; - } else if (body_buf && body_size) { + if (body_buf && body_size) { http->out.offset += body_size; check_size += body_size; memBufAppend(&mb, body_buf, body_size); } - if (!http->request->range && http->request->method == METHOD_GET) + if (http->request->method == METHOD_GET) assert(check_size == size); /* write */ comm_write_mbuf(fd, mb, clientWriteComplete, http); /* if we don't do it, who will? */ } -/* - * clientWriteBodyComplete is called for MEM_CLIENT_SOCK_BUF's - * written directly to the client socket, versus copying to a MemBuf - * and going through comm_write_mbuf. Most non-range responses after - * the headers probably go through here. - */ -static void -clientWriteBodyComplete(int fd, char *buf, size_t size, int errflag, void *data) -{ - /* - * NOTE: clientWriteComplete doesn't currently use its "buf" - * (second) argument, so we pass in NULL. - */ - clientWriteComplete(fd, NULL, size, errflag, data); -} static void clientKeepaliveNextRequest(clientHttpRequest * http) @@ -2066,42 +1722,6 @@ errorAppendEntry(http->entry, err); } -/* - * Return true if we should force a cache miss on this range request. - * entry must be non-NULL. - */ -static int -clientCheckRangeForceMiss(StoreEntry * entry, HttpHdrRange * range) -{ - /* - * If the range_offset_limit is NOT in effect, there - * is no reason to force a miss. - */ - if (0 == httpHdrRangeOffsetLimit(range)) - return 0; - /* - * Here, we know it's possibly a hit. If we already have the - * whole object cached, we won't force a miss. - */ - if (STORE_OK == entry->store_status) - return 0; /* we have the whole object */ - /* - * Now we have a hit on a PENDING object. We need to see - * if the part we want is already cached. If so, we don't - * force a miss. - */ - assert(NULL != entry->mem_obj); - if (httpHdrRangeFirstOffset(range) <= storeMemHiOffset(entry)) - return 0; - /* - * Even though we have a PENDING copy of the object, we - * don't want to wait to reach the first range offset, - * so we force a miss for a new range request to the - * origin. - */ - return 1; -} - /* * clientLookupDone - handle the result of the first lookup @@ -2207,21 +1827,14 @@ http->entry = NULL; ipcacheInvalidate(r->host); return LOG_TCP_CLIENT_REFRESH_MISS; - } - if (NULL == r->range) { - (void) 0; - } else if (httpHdrRangeWillBeComplex(r->range)) { + } else if (r->flags.range) { /* * Some clients break if we return "200 OK" for a Range * request. We would have to return "200 OK" for a _complex_ * Range request that is also a HIT. Thus, let's prevent HITs * on complex Range requests */ - debug(33, 3) ("clientProcessRequest2: complex range MISS\n"); - http->entry = NULL; - return LOG_TCP_MISS; - } else if (clientCheckRangeForceMiss(e, r->range)) { - debug(33, 3) ("clientProcessRequest2: forcing miss due to range_offset_limit\n"); + debug(33, 3) ("clientProcessRequest2: range MISS\n"); http->entry = NULL; return LOG_TCP_MISS; } Index: squid/src/ftp.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/ftp.c,v retrieving revision 1.2.2.6 retrieving revision 1.2.2.7 diff -u -r1.2.2.6 -r1.2.2.7 --- squid/src/ftp.c 12 Jan 2001 08:46:07 -0000 1.2.2.6 +++ squid/src/ftp.c 21 Feb 2001 18:46:34 -0000 1.2.2.7 @@ -1,6 +1,6 @@ /* - * $Id: ftp.c,v 1.2.2.6 2001/01/12 08:46:07 adri Exp $ + * $Id: ftp.c,v 1.2.2.7 2001/02/21 18:46:34 adri Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -2001,6 +2001,11 @@ static int ftpRestartable(FtpStateData * ftpState) { + + /* With the advent of the range header in the request_range going away.. */ + return 0; + +#if 0 if (ftpState->restart_offset > 0) return 1; if (!ftpState->request->range) @@ -2014,6 +2019,7 @@ if (ftpState->restart_offset <= 0) return 0; return 1; +#endif } static void Index: squid/src/http.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/http.c,v retrieving revision 1.2.2.6 retrieving revision 1.2.2.7 diff -u -r1.2.2.6 -r1.2.2.7 --- squid/src/http.c 12 Jan 2001 08:46:07 -0000 1.2.2.6 +++ squid/src/http.c 21 Feb 2001 18:46:34 -0000 1.2.2.7 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.2.2.6 2001/01/12 08:46:07 adri Exp $ + * $Id: http.c,v 1.2.2.7 2001/02/21 18:46:34 adri Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -229,6 +229,13 @@ */ if (httpHeaderHas(hdr, HDR_VARY)) return 0; + + /* We also don't deal with range requests */ + if (httpHeaderHas(hdr, HDR_RANGE)) + return 0; + if (httpHeaderHas(hdr, HDR_REQUEST_RANGE)) + return 0; + /* Pragma: no-cache in _replies_ is not documented in HTTP, * but servers like "Active Imaging Webcast/2.0" sure do use it */ if (httpHeaderHas(hdr, HDR_PRAGMA)) { @@ -647,7 +654,6 @@ LOCAL_ARRAY(char, bbuf, BBUF_SZ); String strConnection = StringNull; const HttpHeader *hdr_in = &orig_request->header; - int we_do_ranges; const HttpHeaderEntry *e; String strVia; String strFwd; @@ -657,26 +663,8 @@ if (request->lastmod > -1 && request->method == METHOD_GET) httpHeaderPutTime(hdr_out, HDR_IF_MODIFIED_SINCE, request->lastmod); - /* decide if we want to do Ranges ourselves - * (and fetch the whole object now) - * We want to handle Ranges ourselves iff - * - we can actually parse client Range specs - * - the specs are expected to be simple enough (e.g. no out-of-order ranges) - * - reply will be cachable - * (If the reply will be uncachable we have to throw it away after - * serving this request, so it is better to forward ranges to - * the server and fetch only the requested content) - */ - if (NULL == orig_request->range) - we_do_ranges = 0; - else if (!orig_request->flags.cachable) - we_do_ranges = 0; - else if (httpHdrRangeOffsetLimit(orig_request->range)) - we_do_ranges = 0; - else - we_do_ranges = 1; - debug(11, 8) ("httpBuildRequestHeader: range specs: %p, cachable: %d; we_do_ranges: %d\n", - orig_request->range, orig_request->flags.cachable, we_do_ranges); + /* We are not doing ranges at all now - we're just passing them through */ + debug(11, 8) ("httpBuildRequestHeader: cachable: %d\n", orig_request->flags.cachable); strConnection = httpHeaderGetList(hdr_in, HDR_CONNECTION); while ((e = httpHeaderGetEntry(hdr_in, &pos))) { @@ -737,12 +725,6 @@ httpHeaderPutInt(hdr_out, HDR_MAX_FORWARDS, hops - 1); } break; - case HDR_RANGE: - case HDR_IF_RANGE: - case HDR_REQUEST_RANGE: - if (!we_do_ranges) - httpHeaderAddEntry(hdr_out, httpHeaderEntryClone(e)); - break; case HDR_PROXY_CONNECTION: case HDR_CONNECTION: case HDR_VIA: Index: squid/src/structs.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/structs.h,v retrieving revision 1.2.2.18 retrieving revision 1.2.2.19 diff -u -r1.2.2.18 -r1.2.2.19 --- squid/src/structs.h 20 Feb 2001 15:39:42 -0000 1.2.2.18 +++ squid/src/structs.h 21 Feb 2001 18:46:34 -0000 1.2.2.19 @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.2.2.18 2001/02/20 15:39:42 adri Exp $ + * $Id: structs.h,v 1.2.2.19 2001/02/21 18:46:34 adri Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -1574,7 +1574,6 @@ int link_count; /* free when zero */ request_flags flags; HttpHdrCc *cache_control; - HttpHdrRange *range; http_version_t http_ver; time_t ims; int imslen;