Closed Bug 544462 Opened 10 years ago Closed 9 years ago

HTML5 Offline features - Asterisk (*) not supported in network section of manifest file

Categories

(Core :: Networking: Cache, defect)

x86
Windows XP
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla2.0b8
Tracking Status
blocking2.0 --- -
fennec - ---

People

(Reporter: avitte, Assigned: mayhemer)

References

()

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7

As per HTML5 specifications, putting * in the network section of manifest file should allow the browser to access all resources on the internet.

It is not working with Firefox, up to the latest 3.7 build

There is a workaround putting http://* instead of *

To test it go to (please send a valid user agent that the system can understand as being firefox >= 3.5):

http://www.blimpme.com/mobile/indexo.php

the manifest file uses here http://* in network section

Choose a tag, you will see some results appear

Clear the offline data and go to :

http://www.blimpme.com/mobile/indexo.php?f=offline2

the manifest file uses here * in network section

Refresh the page

Choose a tag, as you can see nothing happens, the browser does not send any longer requests outside


Reproducible: Always
Component: General → Networking: Cache
Product: Firefox → Core
QA Contact: general → networking.cache
Confirming, the spec allows this.
Status: UNCONFIRMED → NEW
Ever confirmed: true
-> me
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Duplicate of this bug: 590705
This is important part of the spec, we should ship this in Fx4.
blocking2.0: --- → ?
tracking-fennec: --- → ?
love to have, but not blocking fennec.
tracking-fennec: ? → 2.0-
Not blocking, but I'd approve a safe patch!
blocking2.0: ? → -
Attached patch v1 (obsolete) — Splinter Review
- very very simple patch
- no API modifications
- has a test
Attachment #488695 - Flags: review?(jst)
qref
Attachment #488695 - Attachment is obsolete: true
Attachment #488697 - Flags: review?(jst)
Attachment #488695 - Flags: review?(jst)
Comment on attachment 488697 [details] [diff] [review]
v1 [Check in comment 14]

- In nsOfflineManifestItem::HandleManifestLine():

     case PARSE_BYPASS_ENTRIES: {
+        if (line[0] == '*' && (line.Length() == 1 || line[1] == ' ' || line[1] == '\t'))

This condition looks a bit off, or maybe I'm just not clear on what the format is here. But '*' alone on a line, or followed by ' ' or '\t', followed by *anything*, should be accepted here?
(In reply to comment #9)
> But '*' alone on a line, or followed by ' ' or '\t', followed by
> *anything*, should be accepted here?

The spec parse a line of the manifest by splitting it to tokes separated by 0x20, 0x09.  Before that all trailing spaces are cut.  Tokes then are in an array.  The spec says then:

'If mode is "online whitelist": If the first item in _tokens_ is a U+002A
ASTERISK character (*), then set online whitelist wildcard flag to open and jump back to the step labeled "start of line"'

That means to ignore the rest of the line.  The spec is trying to be forward compatible when parsing the manifest.  Unknown is silently ignored.

Better would be to split the line to tokes as the spec does, but we don't have a good parser for it.
Comment on attachment 488697 [details] [diff] [review]
v1 [Check in comment 14]

Ok, thanks for the explanation!

r=jst assuming jupiter.jpg is licensed such that we can include it here.
Attachment #488697 - Flags: review?(jst) → review+
(In reply to comment #11)
> r=jst assuming jupiter.jpg is licensed...

It is my own astro photography ;)
Comment on attachment 488697 [details] [diff] [review]
v1 [Check in comment 14]

This is a very simple patch, backward compatible, making us more conforming the HTML5 spec.
Attachment #488697 - Flags: approval2.0?
Attachment #488697 - Flags: approval2.0? → approval2.0+
Comment on attachment 488697 [details] [diff] [review]
v1 [Check in comment 14]

http://hg.mozilla.org/mozilla-central/rev/bb5091f2e6a1
Attachment #488697 - Attachment description: v1 → v1 [Check in comment 14]
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
You need to log in before you can comment on or make changes to this bug.