[Webkit-unassigned] [Bug 82672] [Mac] XHR range requests are broken; affects pdf.js (Test failure: http/tests/xmlhttprequest/range-test.html)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 26 15:36:10 PST 2014
https://bugs.webkit.org/show_bug.cgi?id=82672
Paolo Martini <mrtnpaolo at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mrtnpaolo at gmail.com
--- Comment #7 from Paolo Martini <mrtnpaolo at gmail.com> 2014-02-26 15:33:15 PST ---
I've just finished a long debugging session on a product that uses XHR range requests to fetch particular files from zip archives hosted on the server. I found a new work-around for the Safari bug. It has been tested and verified working on:
- OS X Mountain Lion - Safari Version 6.0.5 (8536.30.1)
- OS X Mavericks - Safari Version 7.0.1 (9537.73.11)
- iOS 7.0.6 (11B651)
The problem: the second request to the same file for a different range returns the same contents as the first one. Safari wrongly reports "Cached: no" in the relevant line of the network tab of the developer tools. It also ignores "pragma=no-cache" headers, if added.
The solution: I succeeded in making it throw away the old request by making each request unique. I accomplished this by generating a random string and adding the following header: If-None-Match: "<random string>".
After this change Safari began returning the right contents from the new specified range of the file.
This should let the web developers deploy a new and better work-around for their products instead of resorting to disabling range requests altogether. I also hope it can help the webkit developers in pin-pointing where this problem stems from.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list