Closed Bug 525468 Opened 10 years ago Closed 8 years ago
IPrincipal .origin attribute should be based on ascii Host
At the moment this char* attribute is based on nsIURI.hostPort or nsIURI.spec attribute, that is not true ascii representation of URI. This attribute seems not used in the application at all (what should be ones more checked, as it seems to be a bit weird) we should change it to be based on nsIURI.asciiHost (+port) or nsIURI.asciiSpec. This change is needed for sessionStorage hashtable mapping, see bug 495337 comment 11 "So why is the change from asciiHost to host ok here?" and bug 495337 comment 13 for bz's suggestion.
We should also discuss if/how to include a certificate in the origin string attribute. Something like "https://example.com:80:A FINGER PRINT OF THE CERTIFICATE" for example? According html5 spec the origin must reflect (include) the certificate.
This is the first implementation. nsMozIconURI and nsJARURI however return Host (non-ascii) and not AsciiHost when their GetAsciiHost implementation gets called. Maybe that should be fixed as part of this bug or is not an issue at all?
Comment on attachment 568712 [details] [diff] [review] v1 Followup is fine for the broken URI impls.
Attachment #568712 - Flags: review?(bzbarsky) → review+
Version: 1.9.2 Branch → Trunk
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.