Closed Bug 97983 Opened 24 years ago Closed 24 years ago

ExtractUrlPart allows no access to the directory part of the url

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla0.9.5

People

(Reporter: andreas.otte, Assigned: andreas.otte)

References

Details

Attachments

(1 file, 1 obsolete file)

ExtractUrlPart does not allow access to the directory part of an url. Also the Start and Endpositions are sometimes calulated from the filebasename-string although another part of the url is requested.
Fixing the calculation of start and endpositions from filebasename to the correct string is an easy fix. On the other hand: do we really need these start and endpositions? It's easy to find some examples where it will fail to calculate the right positions, as also indicated by Doug's comment in the source. The url_directory mask is missused to return the whole path. On the other hand there is no way to access the directory component alone. This should be be fixed with an additional mask url_Path. Before that can happen the url_-masks have to be freed from their escape/unescape duties, dependency on bug 94796.
Blocks: 47437
Status: NEW → ASSIGNED
Depends on: 94796
Priority: -- → P3
Target Milestone: --- → mozilla0.9.5
Attached patch complete patchSplinter Review
Now that 94796 is in the patch is complete. It introduces a new bitmask url_Path which goes for the whole urlpath. The directory component can now be accessed by it's normal bitmask. Also fixed start/endpositions as much as possible. Need r=/sr=
Attachment #47999 - Attachment is obsolete: true
Attachment #48692 - Flags: review+
Comment on attachment 48692 [details] [diff] [review] complete patch glad to see this flag added :-) and thanks for cleaning up some of this code. sr=darin
Attachment #48692 - Flags: superreview+
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
I think this change broke something in mailnews. see bug #99657
this also busted my recent fix to Composer bug 72583!
Charlie, just replace all url_Directory masks with url_Path which is the correct one if you want to get the whole path.
Yep! I figured that out, of course.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: