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 49786] New: Range header incorrectly handled when entitiy is not cached
Date Thu, 19 Aug 2010 19:57:09 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49786

           Summary: Range header incorrectly handled when entitiy is not
                    cached
           Product: Apache httpd-2
           Version: 2.2-HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_cache
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: rhope@fiberlink.com


If client sends an HTTP requests with a Range header to a caching proxy using
mod_cache where the source content is on separate origin server, and the
entitiy is not cached, the content-range request is cached as if it were the
full document.  Subsequent requests for that cached content are then pulling
content from the "partial" response that was cached.

Steps to reproduce
1. Find a file that is not cached on the caching proxy.
2. Request a range of that file using the Range header (for example with BITS)
3. Request another request of the file where the range is different (or not
specified.)

Actual Results
The 206 response from the second request is the same as the first request.

Expected Results
The 206 resposne should include just the range that was requested.

Build Date & Platform
2.2.16 on a CentOS box

Additional Information:
If the first request (e.g. when the cache is populated) is a full file request,
then subsequent Range requests are handled properly.  

Also, if the origin server adds a "Vary: content-range" header to the response,
the client is returned the appropriate content.  The big downside to this is
practically every range request is stored in a separate file in the cache
(using file cache).  And if there are multiple request for different
overalapping Ranges, the cache could contain a lot of redundant information.

This looks very similar to bug ID 44579
(https://issues.apache.org/bugzilla/show_bug.cgi?id=44579).  That bug was
specific to expired cache content, and making Range request.  However, from
looking at the fix, it does not address when the first request for a piece of
non-cached content contains a Range header.  It looks to me like there needs to
be call at the end of cache_storage.c -> cache_select() in the non-matched case
to remove the Range header from the request:

    }
    apr_table_unset(r->headers_in, "Range");
    return DECLINED;
}

Either that, or unset the Range header in the function that calls
cache_select()

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message