Closed
Bug 108575
Opened 23 years ago
Closed 23 years ago
rethink contents of escape matrix
Categories
(Core :: Networking, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla0.9.8
People
(Reporter: andreas.otte, Assigned: andreas.otte)
Details
Attachments
(2 files, 1 obsolete file)
3.91 KB,
patch
|
Details | Diff | Splinter Review | |
1.66 KB,
patch
|
dougt
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
I'm rereading rfc2396 to verify or change the contents of the escape matrix in nsStdEscape.
Assignee | ||
Comment 1•23 years ago
|
||
Assignee | ||
Comment 2•23 years ago
|
||
changes: @ now also allowed in directory ' now allowed everywhere ~ now allowed everywhere ; now also allowed in scheme, username, password and host this needs some more testing of course ...
Status: NEW → ASSIGNED
Assignee | ||
Updated•23 years ago
|
Priority: -- → P3
Target Milestone: --- → mozilla0.9.7
Assignee | ||
Comment 3•23 years ago
|
||
Some more explanations: ' and ~ Both characters belong into the unreserverd charset (section 2.3). No restrictions, so no escaping should be necessary at all. @ and ; Both characters belong to the reserved charset. According to section 3.2 ";" is reserved in the authority component for registry-based authoritys and can be used in server-based authoritys. "@" is not reserved in the directory component according to section 3.3, but it is also explicitly allowed, so we can remove the current escaping there.
Comment 4•23 years ago
|
||
maybe the best way to go about getting this in the builds is to conditionally use this new matrix based on a preference or env var. andreas, are you up for adding the code which will allow QA to flip a switch and use this new matrix?
Assignee | ||
Comment 5•23 years ago
|
||
Sure, I will try that. Having two matrixes is a little bloat, but okay I think. I would like to use a pref to switch between the two matrixes, how much would that hurt performance?
Comment 6•23 years ago
|
||
just check the pref once at startup and cache the result, or if you want to get fancy, add a pref change callback :)
Assignee | ||
Comment 7•23 years ago
|
||
Hmmm ... for now I have it working with a pref check at each nsStdEscape call and it works fine, but makes xpcom requires pref. Looking into the caching stuff ...
Comment 8•23 years ago
|
||
actually, an environment variable would be better. no ones going to approve making xpcom depend on libpref BTW.
Assignee | ||
Comment 9•23 years ago
|
||
That's what I thought :(
Assignee | ||
Comment 10•23 years ago
|
||
switch between the matrixes based on env variable ALT_ESC_MATRIX. No caching yet, can't find a suitable place to store the global variable.
Attachment #56592 -
Attachment is obsolete: true
Comment 11•23 years ago
|
||
andreas: i think you only check the env variable once... calling getenv everytime is unnecessary.
Assignee | ||
Comment 12•23 years ago
|
||
Yes I know, but I can't find a suitable place to cache the env variable. On the other hand I don't think it is necessary to do this env-stuff at all. ' and ~ are not used in the urlparser anywhere, changing it's escaping value is without any danger. We look at @ in ParseURL and ParseAuthority, in ParseURL we first look for /, so there is no danger mistaking a @ as part of the path with the @ inside the authority. No danger here too. ; in scheme, username, password and host is a bit more complicated. There could be a problem with the urlparser. I have to dig deeper there. So what about dropping the changes for ; and put the other changes in (unconditionally) after the tree opens for 0.9.8?
Comment 13•23 years ago
|
||
sounds reasonable to me.
Assignee | ||
Comment 14•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Assignee | ||
Comment 15•23 years ago
|
||
Doug, I moved the ; part (which could have caused problems) out of the patch, the other changes are trivial without any impact I can think of to url parsing. So, I think we can put this directly into the matrix without any pref or env variable.
Keywords: review
Updated•23 years ago
|
Attachment #60223 -
Flags: superreview+
Comment 16•23 years ago
|
||
Comment on attachment 60223 [details] [diff] [review] new patch, direct change to escape matrix, but only for @'~ sr=darin
Updated•23 years ago
|
Attachment #60223 -
Flags: review+
Assignee | ||
Comment 17•23 years ago
|
||
fix checked in, dropped the ; stuff
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•