Return-Path: Delivered-To: apmail-httpd-bugs-archive@httpd.apache.org Received: (qmail 33825 invoked by uid 500); 10 Apr 2003 17:44:01 -0000 Mailing-List: contact bugs-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: "Apache HTTPD Bugs Notification List" Delivered-To: mailing list bugs@httpd.apache.org Received: (qmail 33814 invoked from network); 10 Apr 2003 17:44:01 -0000 Date: 10 Apr 2003 17:45:56 -0000 Message-ID: <20030410174556.8953.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: bugs@httpd.apache.org Cc: Subject: DO NOT REPLY [Bug 18913] New: - Range header broken when used with If-Modified-Since X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18913 Range header broken when used with If-Modified-Since Summary: Range header broken when used with If-Modified-Since Product: Apache httpd-2.0 Version: 2.0.40 Platform: PC OS/Version: Linux Status: NEW Severity: Normal Priority: Other Component: Other Modules AssignedTo: bugs@httpd.apache.org ReportedBy: scottb@bxwa.com When my client app sends this request against a 60KB file GET /test/ad1s_0001.fbs?u=none&0.6456 HTTP/1.1 Accept: */* Range: bytes=0-6455 If-Modified-Since: Mon, 10 Mar 2003 19:54:40 GMT The response is: HTTP/1.1 416 Requested Range Not Satisfiable Expecting HTTP/1.1 304 Not Changed or HTTP/1.1 206 Partial Content depending on the timestamp Without the If-Modified-Since header I get 206. Without the Range header I get 304 or 200. But not together. It appears that it's trying to process the range header after it has already determined that the response is 304 and there is no response body. Works fine in 1.3. I've come up with this patch which works for me but I'm not intimate with the system so I'm not positive that it's the proper approach to solve the problem. (Also not sure of the diff options.) I've tried reproducing the problem with 2.0.45 but I don't have the libs, mods, perl, etc. to run it. The source looks the same and I couldn't find any bug report related to it. Not a major problem but a "Must Patch" for our operation. Thanks Scott Becker --- http-2.0.40/modules/http_protocol.c.orig 2002-08-04 11:24:10.000000000 -0700 +++ http-2.0.40/modules/http_protocol.c 2003-04-08 15:28:09.000000000 -0700 @@ -2794,6 +2794,15 @@ apr_status_t rv; int found = 0; + + if (r->status == HTTP_NOT_MODIFIED) { + /* we can't process byte ranges when we are not returning a body at all */ + ap_remove_output_filter(f); + return ap_pass_brigade(f->next, bb); + } + + + if (!ctx) { int num_ranges = ap_set_byterange(r); --------------------------------------------------------------------- To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org For additional commands, e-mail: bugs-help@httpd.apache.org