httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18913] New: - Range header broken when used with If-Modified-Since
Date Thu, 10 Apr 2003 17:45:56 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18913>.
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


Mime
View raw message