Closed
Bug 21686
Opened 25 years ago
Closed 24 years ago
StdURL parsing code doesn't lower case scheme name
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
RESOLVED
FIXED
M15
People
(Reporter: rkeyes, Assigned: andreas.otte)
References
()
Details
(Keywords: testcase, Whiteboard: [TESTCASE])
Attachments
(1 file)
718 bytes,
text/html
|
Details |
with the lastest win32 mozilla (13 dec 1999) the javascript based menus on www.rice.edu work fine, but not under linux. The menu display correctly upon mouse over, but nothing happens with a click.
Comment 1•25 years ago
|
||
Sorry, I've sat on this bug for a little while... Does this problem still occur with m12? If not, could you close the bug? If so, could you please attach a specific, simple, small testcase (just pointing at a website make it hard for us to identify the problem) and reassign this bug to the DOM component? Thanks - Mike
Updated•25 years ago
|
Assignee: mccabe → vidur
Component: Javascript Engine → DOM Level 0
Comment 2•25 years ago
|
||
I've reproduced this bug with a recent build. Clicking on the menus does indeed have no effect. It's not clear where exactly the problem occurs: does the sendmap function associated with the menu entries get called? If it does, does the assignment to document.location work? rkeyes: it's a little difficult to debug javascript hosted on a remote site (and I was unable to reproduce the page by saving the top 'index.html' file to my local disk.) The best way to help us get this bug fixed is to produce the simplest possible testcase that demonstrates the problem. Ideally, this would be an .html file with just a few lines, demonstrating (for instance) that javascript: urls don't see the right scope, or that document.location doesn't work. Reassigning to the DOM component, as this doesn't seem to be a problem with the core JavaScript language.
Comment 3•25 years ago
|
||
The problem seems to be the use of "Javascript:" rather than "javascript:" for the AREA href's in the client side image maps. Using Linux x86 build 2000011308, I get a "Javascript is not a registered protocol" alert when clicking on the menus at www.rice.edu. Attaching a simple testcase.
Whiteboard: [TESTCASE]
Comment 4•25 years ago
|
||
Comment 5•25 years ago
|
||
Bulk moving [testcase] code to new testcase keyword. Sorry for the spam!
Keywords: testcase
Comment 7•25 years ago
|
||
Warren, here's bug that I mentioned earlier. The StdURL parsing code doesn't lower case the scheme name. If the fix works for you, go ahead and check it in. Changing the bug summary to reflect the real problem. Index: nsStdURL.cpp =================================================================== RCS file: /cvsroot/mozilla/netwerk/base/src/nsStdURL.cpp,v retrieving revision 1.38 diff -u -r1.38 nsStdURL.cpp --- nsStdURL.cpp 2000/01/24 23:18:44 1.38 +++ nsStdURL.cpp 2000/01/27 02:56:28 @@ -308,6 +308,7 @@ if (*(brk+1) == '/') { ExtractString(mSpec, &mScheme, (brk - mSpec)); + ToLowerString(mScheme); if (*(brk+2) == '/') // e.g. http:// // If the first colon is followed by // then its definitely a spec @@ -549,6 +550,7 @@ else // scheme:host... { ExtractString(mSpec, &mScheme, (brk - mSpec)); + ToLowerString(mScheme); brk = PL_strpbrk(lastbrk, delimiters); if (!brk) // its just scheme:host { @@ -758,6 +760,17 @@ { *o_Dest = nsnull; return NS_OK; + } +} + +void +nsStdURL::ToLowerString(char* i_Src) +{ + if (i_Src) { + while (*i_Src) { + *i_Src = nsCRT::ToLower(*i_Src); + i_Src++; + } } } Index: nsStdURL.h =================================================================== RCS file: /cvsroot/mozilla/netwerk/base/src/nsStdURL.h,v retrieving revision 1.15 diff -u -r1.15 nsStdURL.h --- nsStdURL.h 2000/01/24 21:27:41 1.15 +++ nsStdURL.h 2000/01/27 02:56:28 @@ -70,6 +70,7 @@ // Some handy functions nsresult DupString(char* *o_Dest, const char* i_Src); nsresult ExtractString(char* i_Src, char* *o_Dest, PRUint32 length); + void ToLowerString(char* i_Src); protected: char* mScheme;
Assignee: vidur → warren
URL: www.rice.edu → http://www.rice.edu
Summary: site specific javascript problem → StdURL parsing code doesn't lower case scheme name
Comment 8•25 years ago
|
||
I thought you said it was a problem finding the protocol dll if the scheme name wasn't lower cased. I would have suspected that the fix for that was in nsIOService::ExtractScheme (in conjunction with nsIOService::GetProtocolHandler).
Updated•25 years ago
|
Target Milestone: M14
Comment 10•25 years ago
|
||
Here's my fix: Index: nsIOService.cpp =================================================================== RCS file: /cvsroot/mozilla/netwerk/base/src/nsIOService.cpp,v retrieving revision 1.59 diff -c -r1.59 nsIOService.cpp *** nsIOService.cpp 2000/01/27 08:57:12 1.59 --- nsIOService.cpp 2000/01/28 06:20:30 *************** *** 154,159 **** --- 154,160 ---- char buf[MAX_NET_PROGID_LENGTH]; nsCAutoString progID(NS_NETWORK_PROTOCOL_PROGID_PREFIX); progID += scheme; + progID.ToLowerCase(); progID.ToCString(buf, MAX_NET_PROGID_LENGTH); rv = nsServiceManager::GetService(buf, NS_GET_IID(nsIProtocolHandler), (nsISupports **)result); This fixes finding the protocol DLLs, but I'm not sure if other things will break because all URL schemes are not lowercased by default. I'll check this in, and let Andreas decide whether to add Vidur's fix to his new URL parsing code.
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 12•25 years ago
|
||
asdf
Comment 13•25 years ago
|
||
This bug fix broke mail today because we have url schemes that contain capital letters!!! We may need to back this out so we can open the tree.
Comment 14•25 years ago
|
||
We had to back this fix out in order to get the tree open this morning. so I'm going to re-open this now. mailnews has protocols like mailboxMessage which have uppercase letters in them. This current patch breaks those cases. I wonder if the right fix is to make the service manager do case insenstivie comparisons when looking up a progid?
Status: RESOLVED → REOPENED
Assignee | ||
Comment 15•25 years ago
|
||
I think it's best to move mailboxMessage to mailboxmessage. I remember a discussion about the registry being case sensitive, so we need a simple way to ensure that caseing doesn't count, and that's all lower case. Only nsMailboxService and nsMsgLocalCID have to be changed (at least that's what I did on the ANDREAS_URL_BRANCH).
Assignee | ||
Comment 17•25 years ago
|
||
This one lokks fixed to me. The site works as well as the testcase
Assignee | ||
Comment 18•25 years ago
|
||
the javascript menus work fine
Status: REOPENED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Comment 19•25 years ago
|
||
*** Bug 25859 has been marked as a duplicate of this bug. ***
Comment 20•25 years ago
|
||
*** Bug 27025 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 21•25 years ago
|
||
It seems this bug has recently reappeared. Linux build 2000021808 has it. Try the test case on the bug's homepage (21686). Roy
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 22•25 years ago
|
||
It still works for me, but I also have the fixes for bug 22859 in my tree. This used to work without that fixes, but that may have changed. Bug 22859 is related to the security manager which might have increased security recently. I suggest fixing 22859 and again have a look.
Updated•25 years ago
|
Target Milestone: M14 → M15
Assignee | ||
Comment 23•25 years ago
|
||
I think this one is fixed on linux, no need to move to M15.
Comment 24•24 years ago
|
||
What's the status of this now? Bug 22859 is now fixed.
Assignee: warren → andreas.otte
Status: REOPENED → NEW
Assignee | ||
Comment 25•24 years ago
|
||
Marking this one fixed, haven't seen this for ages, please reopen rkeyes@rice.edu if it still does not work for you.
Status: NEW → RESOLVED
Closed: 25 years ago → 24 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 26•24 years ago
|
||
Everything seems to work on this end now. I think that my report of the bug resurfacing earlier was just because the fix was taken out of the code and I was unaware of that at the time. Good job everybody! roy
Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•