Closed Bug 14326 Opened 25 years ago Closed 25 years ago

nsStdURL.cpp does not parse foo://bar@cheese correctly

Categories

(Core :: Networking, defect, P3)

x86
All
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: sspitzer, Assigned: gagan)

Details

I have code that does this: url->SetSpec("foo://bar@cheese"); url->GetPreHost(getter_Copies(host)); printf("host = %s\n", (const char *) host); host will be "ar" instead of "bar". the following patch will fix the problem. can I check it in? *** nsStdURL.cpp 1999/09/19 23:46:24 1.23 --- nsStdURL.cpp 1999/09/20 07:31:45 *************** nsStdURL::Parse(void) *** 316,323 **** if (!brk) // its just http://user@host { ExtractString(mSpec, &mHost, ! (lastbrk+1 - mSpec), ! len - (lastbrk+1 - mSpec)); return NS_OK; } ExtractString(mSpec, &mHost, --- 316,323 ---- if (!brk) // its just http://user@host { ExtractString(mSpec, &mHost, ! (lastbrk - mSpec), ! len - (lastbrk - mSpec)); return NS_OK; } ExtractString(mSpec, &mHost,
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
fixed. gagan reviewed it.
Bulk move of all Necko (to be deleted component) bugs to new Networking component.
verified per engineers comments
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.