Closed
Bug 673296
Opened 13 years ago
Closed 13 years ago
Origin handling in EventSource is bogus
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: wfernandom2004, Assigned: wfernandom2004)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
sicking
:
review+
|
Details | Diff | Splinter Review |
Similar to bug 670687. See https://bugzilla.mozilla.org/show_bug.cgi?id=664179#c61
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → wfernandom2004
Assignee | ||
Updated•13 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #547568 -
Flags: review?(jonas)
Attachment #547568 -
Flags: review?(Olli.Pettay)
Comment 2•13 years ago
|
||
Why is that getting the origin from the URI and not from the principal?
Comment 3•13 years ago
|
||
Comment on attachment 547568 [details] [diff] [review]
v1
r=me if you address bz' comment.
Attachment #547568 -
Flags: review?(Olli.Pettay) → review+
Comment on attachment 547568 [details] [diff] [review]
v1
Hmm.. mUTF16Origin is a somewhat misleading name. GetASCIIOrigin returns the puny-code encoded origin. I would have expected mUTF16Origin to contain a unicode encoded origin based on the explicit 'utf16' in the name.
I'd also have guessed that the event should contain the unicode variant.
Is there a reason you explicitly ask for the punycode coded variant?
Comment 6•13 years ago
|
||
Comment on attachment 547568 [details] [diff] [review]
v1
Actually, no, this is not right
Message events don't need ascii representation of the origin.
Attachment #547568 -
Flags: review+ → review-
Comment 7•13 years ago
|
||
"the origin attribute must be set to the Unicode serialization of the origin of the event stream's URL"
Comment 8•13 years ago
|
||
But we may need to do something to the origin,
see https://bugzilla.mozilla.org/show_bug.cgi?id=670687#c5
Comment 9•13 years ago
|
||
nsContentUtils::GetUTFOrigin should do the right thing.
(GetXXXOrigin really should not be in nsContentUtils)
Assignee | ||
Comment 10•13 years ago
|
||
> Why is that getting the origin from the URI and not from the principal?
Because "the origin attribute must be set to the Unicode serialization of the origin of the event stream's URL".
I don't know if I have misunderstood that, but I think per spec it is correct. WebSockets uses the origin from the principal, which is get from the entry script. It seems strange to me, but the specs define these behaviors...
> nsContentUtils::GetUTFOrigin should do the right thing.
ok
Assignee | ||
Comment 11•13 years ago
|
||
> mUTF16Origin is a somewhat misleading name.
So I will let mOrigin
Assignee | ||
Comment 12•13 years ago
|
||
Attachment #547568 -
Attachment is obsolete: true
Attachment #547568 -
Flags: review?(jonas)
Attachment #549658 -
Flags: review?(jonas)
Attachment #549658 -
Flags: review?(Olli.Pettay)
Comment 13•13 years ago
|
||
Comment on attachment 549658 [details] [diff] [review]
v2
Could we get some tests for this.
Attachment #549658 -
Flags: review?(Olli.Pettay) → review+
Assignee | ||
Comment 14•13 years ago
|
||
> Could we get some tests for this.
In bug 664179 we have already some tests.
Attachment #549658 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 15•13 years ago
|
||
updated for bug 664179
Attachment #549658 -
Attachment is obsolete: true
Attachment #570446 -
Flags: review?(jonas)
Comment on attachment 570446 [details] [diff] [review]
v3
You don't actually need to re-request review when just updating to tip.
Attachment #570446 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 17•13 years ago
|
||
> You don't actually need to re-request review when just updating to tip.
Ok, sorry. I didn't know that.
Checked in to inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3ab7b95bfcb5
Thanks for the quick turnaround and for the patch in general!! Please do poke someone if you see bugs lingering like this, that should never happen.
Comment 19•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
Comment 20•13 years ago
|
||
Backed out in https://hg.mozilla.org/mozilla-central/rev/abdbf0646a21 - see bug 664179 comment 85
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 21•13 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•