Closed
Bug 1063431
Opened 10 years ago
Closed 10 years ago
Caching broken when authorization header in request
Categories
(Core :: Networking: Cache, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1000338
People
(Reporter: henrie.cuijpers, Assigned: mayhemer)
Details
Attachments
(1 file)
313 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36
Steps to reproduce:
A web page with several images, javascripts and stylesheets in it will cache nicely.
Open "Developer tools - Network"
Go to url: https://www.mozard.nl/mozard/!suite05.scherm1081
Push Ctrl-R
You will see a lot of JS CSS images etc etc. Focus on dojo.js.
Now Click once in the address bar of the browser and push Enter. As you can see the dojo.js will not be requested. This is the expected behaviour.
Now active addon "Modify headers" and inject an "Authorization" header with contents "Basic aaaaaaa". Don't forget to push "Start" button in addon popup!
Perform the actions again and you will see there will be an extra request for "dojo.js" (there are more requests, but focus on dojo.js to keep it simple.
Why is are the css and js from cache not used???
This is 100% reproducable on 32. I checked it with the old version (31) and with the exact same actions it works both (with and without the header) the "expected way".
Actual results:
The browser not using the cache: result -> flooding the webserver with requests.....
Expected results:
Use the cache independent off the authorization header.
I feel this maybe be an bug in the addon, you have any reason for a bug in Firefox?
Contact the addon developer / support. like the https://www.mozdev.org/bugs/show_bug.cgi?id=12601, or others bug in http://modifyheaders.mozdev.org/bugs.html. However, this add-on are no updated for a long time.
To invalid?
Reporter | ||
Comment 3•10 years ago
|
||
Off course this is not a bug in the addon. I used the addon to demonstrate te bug. I discoverd this on a closed website of which i cannot give anyone access. I then used the addon to mimmic the same behaviour on an "open" site.
It's reproducible with browser.cache.use_new_backend=1 since http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=8f8a683dfc42&tochange=a2c31dc69ab3 due to bug 913807 when patches about cache v2 have been introduced.
Comment 7•10 years ago
|
||
I'm having the same problem. A simple test case is inserting the following into the devtools console on this page.
var r = new XMLHttpRequest();
r.open("GET", "https://bugzilla.mozilla.org/js/bug.js");
r.send()
Run that a couple of times and you will see that only request is made, subsequent requests are satisfied using the cache.
Next set the 'Authorization' header and make a couple of requests. A new request is used every time.
var r = new XMLHttpRequest();
r.open("GET", "https://bugzilla.mozilla.org/js/bug.js");
r.setRequestHeader("Authorization", "1");
r.send()
Comment 8•10 years ago
|
||
Can the priority of this be raised. This is a HUGE performance problem and it would nice to fix this issue before people decide to work around it by creating their own caches in JS.
Flags: needinfo?(honzab.moz)
Assignee | ||
Comment 9•10 years ago
|
||
This is probably a duplicate of bug 1000338.
Flags: needinfo?(honzab.moz)
Comment 10•10 years ago
|
||
Bug 1000338 is fixed in FF33+.
Henrie and Kevin, can you download Beta (or Aurora or Nightly) and confirm it's fixed on your side (and then a dupe of Bug 1000338), please.
https://www.mozilla.org/en-US/firefox/channel/
Flags: needinfo?(henrie.cuijpers)
Reporter | ||
Comment 11•10 years ago
|
||
Loic, i tested it in both Firefox_33_0b7 and Aurora_34_0a2. I can confirm both versions as solved. I can't find the "nightly".
What do you mean with: .....(and then a dupe of Bug 1000338)...... ?
Flags: needinfo?(henrie.cuijpers)
Comment 12•10 years ago
|
||
Nightly is on a different page: https://nightly.mozilla.org/ :)
I tested, I confirm it's fixed too.
Working range: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=3b7921328fc1&tochange=8252eae8278c
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Flags: needinfo?(kevincox)
Resolution: --- → DUPLICATE
Comment 13•10 years ago
|
||
Works with nightly as well :D
Reporter | ||
Comment 14•10 years ago
|
||
Guy's, what did you do! I updated today my firefox to version 33. It's even worse now! Besides the not cached javascripts and stylesheets now all images referenced in the css are also not cached anymore! I can confirm caching is working fine when there is no Authentication header present...... :(
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Reporter | ||
Comment 15•10 years ago
|
||
Sorry, i apologize for the confusion. I think there was some setting which broke things. I did a full reset ( https://support.mozilla.org/en-US/kb/reset-firefox-easily-fix-most-problems ) and now everything is working fine.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•