Closed
Bug 939729
Opened 12 years ago
Closed 12 years ago
With httpd.js we sometimes don't get the most recent version of the file
Categories
(Firefox OS Graveyard :: Gaia, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: julienw, Assigned: julienw)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
|
2.13 KB,
patch
|
vingtetun
:
review+
|
Details | Diff | Splinter Review |
STR:
* open http://sms.gaiamobile.org:8080 in a DEBUG=1 DESKTOP=0 profile
* change things in apps/sms/js/desktop-only/contacts.js
* reload the page in Firefox
Expected:
* the changes are loaded
Actual:
* no changes are visible
These files are lazy loaded and even when shift-reloading Firefox don't try to get an updated version.
| Assignee | ||
Comment 1•12 years ago
|
||
see also PR at https://github.com/mozilla-b2g/gaia/pull/13793
(we want a green Travis obviously)
This patch:
* makes all files expire immediately, forcing a revalidation by Firefox
* implements conditional requests with Last-Modified-Since
---
tools/extensions/httpd/content/httpd.js | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
Attachment #8333769 -
Flags: review?(21)
| Assignee | ||
Comment 2•12 years ago
|
||
This patch will probably also make it possible to remove the horrible workaround in the test-agent, where all requests go with a "?time=" parameter to force getting a new file.
| Assignee | ||
Comment 3•12 years ago
|
||
Sorry, I left a bad comment in my previous patch. Here's a new patch with a more interesting comment.
PR is updated at https://github.com/mozilla-b2g/gaia/pull/13793
Attachment #8333769 -
Attachment is obsolete: true
Attachment #8333769 -
Flags: review?(21)
Attachment #8333771 -
Flags: review?(21)
Comment 4•12 years ago
|
||
Comment on attachment 8333771 [details] [diff] [review]
patch v2
Review of attachment 8333771 [details] [diff] [review]:
-----------------------------------------------------------------
::: tools/extensions/httpd/content/httpd.js
@@ +2813,5 @@
> +
> + if (lastModified && ifModifiedSince && lastModified === ifModifiedSince) {
> + dumpn(">>> file was not modified, returning a 304 code");
> + response.setStatusLine("1.1", 304);
> + return;
Those sounds good to me but maybe you also want to upstream those changes? http://mxr.mozilla.org/mozilla-central/find?text=&string=httpd.js
Attachment #8333771 -
Flags: review?(21) → review+
| Assignee | ||
Comment 5•12 years ago
|
||
master: 2b0662ecb0e52e7b53ba80566cc1cacf442f8e57
Bug 939755 was opened to upstream this.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•