If link prefetching returns 404, PUT to the same URL returns cached 404
Reported by
d.huig...@gmail.com,
Aug 7 2016
|
|||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/51.0.2704.79 Chrome/51.0.2704.79 Safari/537.36
Example URL:
Steps to reproduce the problem:
You can reproduce on any website, although it is of course only a problem if GET /test returns 404 while PUT /test wouldn't necessarily also return a 404. Open the Network tab and run the following code. Observe that the second request says (from cache). It's not lying, the PUT request isn't made.
var url = '/test'; // Nonexistent location. If it exists it works fine
var link = document.createElement('link');
link.rel = 'prefetch';
link.href = url;
document.body.appendChild(link);
setTimeout(function() {
var req = new XMLHttpRequest();
req.open('PUT', url); // POST works fine
req.send('test'); // Without a body it works fine
}, 500);
What is the expected behavior?
What went wrong?
I'm not sure, but I believe a cached 404 from GET /test shouldn't be returned for PUT /test.
Did this work before? N/A
Chrome version: 51.0.2704.79 Channel: n/a
OS Version:
Flash Version: Shockwave Flash 11.2 r999
,
Aug 8 2016
,
Aug 8 2016
I can repro on 52 stable, but looks like it's been fixed in 53 beta. Can confirm it looks to be an issue at net's cache layer, and not blink's in-memory cache.
,
Sep 9 2016
Should this be marked fixed due to #3? |
|||
►
Sign in to add a comment |
|||
Comment 1 by ranjitkan@chromium.org
, Aug 8 2016Labels: M-54 OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
117 KB
117 KB View Download