Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upReload goes back in time (http cache issue?) #24385
Comments
|
Nevermind, I can still reproduce it. |
|
This looks like it happens because http_network_or_cache_fetch calls HttpCache::store after a revalidation request that returns a non-306 response. That means there are two cached responses, and then reloading calls HttpCache::refresh when the new revalidation request returns a 304. HttpCache::refresh just returns the first cached response, which is the older one in this case. |
|
I think we should make HttpCache store overwrite any existing complete response so that we only ever have one complete response and an arbitrary number of incomplete responses for a particular cache entry. |
Fix HTTP cache revalidation bugs This fixes two cache related issues: * old cached content could be viewed as a result of revalidating a newer cached response * the expiry of a cached response refreshed through a revalidation could be calculated without any of the original response's headers --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #24385 - [ ] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24388) <!-- Reviewable:end -->
|
It's weird, on my Mac with python 3, it seems the server doesn't understand the see some printed logs.
So I can't seem to hit the refresh case. Also note that this occurs because the python server by default sends a response containing a I think a more appropriate fix could be to find the "right" stored resource to use in the refresh operation, by comparing the stored |
|
Also note that the "need to revalidate" is calculated based on the Just FYI in case someone starts to wonder why the test cannot be reproduced anymore... |
Make reload button clear the network cache. The developer workflow in FxR is frustrating right now because of bugs like #24385. To allow us to put out a new release soon that addresses this papercut, these changes make the reload button clear the network cache in FxR. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix (kind of) #26411. - [x] These changes do not require tests because can't test FxR.
Make reload button clear the network cache. The developer workflow in FxR is frustrating right now because of bugs like #24385. To allow us to put out a new release soon that addresses this papercut, these changes make the reload button clear the network cache in FxR. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix (kind of) #26411. - [x] These changes do not require tests because can't test FxR.
Make reload button clear the network cache. The developer workflow in FxR is frustrating right now because of bugs like #24385. To allow us to put out a new release soon that addresses this papercut, these changes make the reload button clear the network cache in FxR. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix (kind of) #26411. - [x] These changes do not require tests because can't test FxR.
Make reload button clear the network cache. The developer workflow in FxR is frustrating right now because of bugs like #24385. To allow us to put out a new release soon that addresses this papercut, these changes make the reload button clear the network cache in FxR. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix (kind of) #26411. - [x] These changes do not require tests because can't test FxR.
Make reload button clear the network cache. The developer workflow in FxR is frustrating right now because of bugs like #24385. To allow us to put out a new release soon that addresses this papercut, these changes make the reload button clear the network cache in FxR. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix (kind of) #26411. - [x] These changes do not require tests because can't test FxR.
Make reload button clear the network cache. The developer workflow in FxR is frustrating right now because of bugs like #24385. To allow us to put out a new release soon that addresses this papercut, these changes make the reload button clear the network cache in FxR. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix (kind of) #26411. - [x] These changes do not require tests because can't test FxR.
STR:
test.htmlwhich contains just the letterapython3 -m http.server 8080)test.html:atobbaCan't reproduce using a
file:///url