Closed
Bug 897726
Opened 11 years ago
Closed 11 years ago
Can't open url link in Microsoft Outlook due to munged url casing when Outlook is chosen through app chooser's 'browse' feature
Categories
(Firefox :: File Handling, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: gsexton, Unassigned)
References
()
Details
Attachments
(9 files)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 (Beta/Release) Build ID: 20130618035212 Steps to reproduce: From a machine running Microsoft Windows with MS Outlook installed, go to this page: http://www.mhsoftware.com/caldemo/iCal.html?integral=0 Click on one of the WebCal:// links Actual results: The link does not open in Outlook as expected. This appears to be because Firefox is converting the URL to lower case before passing it to Outlook. Expected results: The URL should be passed to Microsoft Outlook, which would then create a subscription to the calendar. In the attached images, image 1 shows the link. Images 2-4 are the sequence when executed with Firefox, and images 5 & 6 are the same link executed from IE. Note that in 3 and 6, the case is different. The word "iCal" is forced to lower case in Firefox, breaking the link.
Reporter | ||
Comment 1•11 years ago
|
||
Reporter | ||
Comment 2•11 years ago
|
||
Reporter | ||
Comment 3•11 years ago
|
||
Reporter | ||
Comment 4•11 years ago
|
||
Reporter | ||
Comment 5•11 years ago
|
||
Updated•11 years ago
|
Component: Untriaged → Networking
Product: Firefox → Core
Updated•11 years ago
|
Summary: URL Improperly Converted To Lower Case for Protocol Handler → cant open outlook link
Updated•11 years ago
|
Component: Networking → File Handling
Product: Core → Firefox
Comment 6•11 years ago
|
||
Boris, I traced the execution flow of nsExternalHelperAppService to LoadURI and nsMIMEInfoWin::LoadURIInternal (http://mxr.mozilla.org/mozilla-central/source/uriloader/exthandler/win/nsMIMEInfoWin.cpp#214), the latter of which doesn't appear to modify the URL at all. Do you know if nsIIOService::NewURI would lowercase the scheme at all? Furthermore, do you know anything about the "default" protocol handler? I can't find any trace of it outside a call to GetService in nsIOService::GetProtocolHandler.
Flags: needinfo?(bzbarsky)
Comment 7•11 years ago
|
||
> Do you know if nsIIOService::NewURI would lowercase the scheme at all? Yes, it definitely would. > do you know anything about the "default" protocol handler? It's in nsExternalProtocolHandler.cpp. NewURI on this creates an nsSimpleURI, and nsSimpleURI::SetSpec does ToLowerCase(mScheme). Note that per URI spec: Although schemes are case-insensitive, the canonical form is lowercase and documents that specify schemes must do so with lowercase letters. An implementation should accept uppercase letters as equivalent to lowercase in scheme names (e.g., allow "HTTP" as well as "http") for the sake of robustness but should only produce lowercase scheme names for consistency. (RFC 3986 section 3.1; in RFC 2396 the scheme was simply required to be all-lowercase syntactically.)
Flags: needinfo?(bzbarsky)
Comment 8•11 years ago
|
||
So this becomes a tech evangelism issue?
Reporter | ||
Comment 9•11 years ago
|
||
But this issue isn't really about the scheme being converted to lower case, but the path component being converted to lower case. My reading of RFC-2396 says that the scheme and host names are insensitive but I don't see anything that says path elements are case insensitive.
Comment 10•11 years ago
|
||
Right, the earlier comments in this bug sounded like they were about the path... the path should _not_ be getting case-folded.
Reporter | ||
Comment 12•11 years ago
|
||
Yes, using Firefox 25.0.1 on Windows 7, the issue is still happening. When Outlook appears and displays the URL for the subscription, it has been converted to lower case as shown in attachment 780568 [details] [diff] [review].
Flags: needinfo?(gsexton)
Comment 13•11 years ago
|
||
I don't have Outlook on my Win 7 64-bit machine. I've tried to install Outlook Express (which is free), but I found out that it isn't supported on Win 7. So I've installed Windows Live Mail (the whole Windows Essentials package actually, from http://windows.microsoft.com/en-us/windows-live/essentials), and after opening http://www.mhsoftware.com/caldemo/iCal.html?integral=0 in Firefox 25.0.1 I get the dialog shown here: https://bug897726.bugzilla.mozilla.org/attachment.cgi?id=780657 The problem is that I don't have an outlook.exe file on my computer, so I can't choose it to open the calendar from your link. George, could you please try with other browsers (besides IE, since it's also a Microsoft product), to see if you still reproduce the issue (Chrome, for example)? It might be an Outlook issue. Also, you could try the following: 1) try this with a clean profile: http://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles 2) running in Safe mode: http://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode
Flags: needinfo?(gsexton)
Reporter | ||
Comment 14•11 years ago
|
||
I tested this with Chrome and it works as expected. I started Firefox 25.0.1 with the profile selection and chose a clean profile. It works as expected. I chose my default profile and disabled all plugins and add-ons. Using my default profile, it is still broken. I understand at this point it's easy to write this off and say "corrupt user profile" HOWEVER, I had a customer report this issue to me so there is some mechanism that's reasonably common that causes the problem to happen. I looked through about:config but didn't see any options that were labelled "mess up links before handing them to other programs…" :)
Comment 15•11 years ago
|
||
Are you willing to check whether copying your prefs.js from the broken profile to the working one causes it to break? If it doesn't, can you try copying other files from the profile to see which of them is responsible?
Reporter | ||
Comment 16•11 years ago
|
||
Reporter | ||
Comment 17•11 years ago
|
||
Reporter | ||
Comment 18•11 years ago
|
||
OK, I did some more testing using your suggestions. The critical file seems to be mimeTypes.rdf. I have attached working and non-working mimeTypes.rdf files to this bug. Here are the steps I followed to determine this: I created a new default profile. The link worked as expected. I copied the mimeTypes.rdf file from the profile that did not work to the new, clean profile. After copying the file, the URL to open Outlook did not work. So, it looks like there's something about the presence of the mimeType handlers in mimeTypes.rdf that affects the URL that's getting passed to Outlook. I tried changing the option to save file and that had no effect.
Reporter | ||
Comment 19•11 years ago
|
||
and just to be totally sure, I copied the minimal mimeTypes.rdf from a new profile to the non-working profile and it now works as expected.
Flags: needinfo?(gsexton)
Comment 20•11 years ago
|
||
Hmm. So I just looked through our code that does external handler dispatch and I see no obvious tolowercase calls on things other than extensions and MIME types. George, what happens if you remove these two lines from the broken mimeTypes.rdf: <NC:possibleApplication RDF:resource="urn:handler:web:http://30boxes.com/external/widget?refer=ff&url=%s"/> <NC:possibleApplication RDF:resource="urn:handler:web:https://30boxes.com/external/widget?refer=ff&url=%s"/> ? Does that make things work?
Reporter | ||
Comment 21•11 years ago
|
||
Removing the 30boxes links does not resolve the issue. Removing ALL webcal entries does.
Comment 22•11 years ago
|
||
OK. Does putting either of: <NC:externalApplication RDF:resource="urn:scheme:externalApplication:webcal"/> and <NC:possibleApplication RDF:resource="urn:handler:local:C:\Program Files (x86)\Microsoft Office\Office12\OUTLOOK.EXE"/> make the issue reappear? That is, is the issue caused by some particular one of those two entries, or does either one cause it?
Reporter | ||
Comment 23•11 years ago
|
||
Removing: <RDF:Description RDF:about="urn:scheme:externalApplication:webcal" NC:prettyName="OUTLOOK.EXE" NC:path="C:\Program Files (x86)\Microsoft Office\Office12\OUTLOOK.EXE" /> From around <RDF:Description RDF:about="urn:scheme:handler:webcal" NC:alwaysAsk="true"> Remove: <NC:possibleApplication RDF:resource="urn:handler:local:C:\Program Files (x86)\Microsoft Office\Office12\OUTLOOK.EXE"/> Fixes the issue.
Comment 24•11 years ago
|
||
Not sure I'm following comment 23. Do you mean you have to remove both of those things to make it work, or something else?
Reporter | ||
Comment 25•11 years ago
|
||
Yes. You have to remove both lines to make it work. I think this is because the external application of outlook is listed multiple times. It's listed as urn:scheme:externalApplication:webcal and as "urn:scheme:externalApplication:text/calendar"
Comment 26•11 years ago
|
||
George, thanks. Jim, are you willing to take a look at this on Windows? It sounds like dispatching a url to a given helper app will somehow lowercase it (how?) but dispatching it to the system-default helper app works fine... If you can't look at this, do you know who owns the Windows file handling bits nowadays by any chance?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jmathies)
Comment 27•11 years ago
|
||
(In reply to George Sexton from comment #1) > Created attachment 780657 [details] > 2_LaunchOutlook.png Where did that extra OUTLOOK.EXE come from? Did you add it by browsing to the app at some point? I get the original outlook listed (without the icon, yuck) which works. But I don't have the all caps outlook listing by default.
Flags: needinfo?(jmathies)
Updated•11 years ago
|
Reporter | ||
Comment 28•11 years ago
|
||
Starting from a fresh, minimal mimeTypes.rdf. 1) If I click on the link and choose "Microsoft Office Outlook" from the Launch Application dialog, things work as expected. 2) If I click on the "Choose" button and navigate to the path for Outlook.exe, then when outlook opens, the path has been converted to lower-case. On subsequent visits, the Launch Application dialog shows "OUTLOOK.EXE" as a choice. -- So, at some point in my years of using Firefox, I had browsed for the application.
Comment 29•11 years ago
|
||
(In reply to George Sexton from comment #28) > Starting from a fresh, minimal mimeTypes.rdf. > > 1) If I click on the link and choose "Microsoft Office Outlook" from the > Launch Application dialog, things work as expected. > > 2) If I click on the "Choose" button and navigate to the path for > Outlook.exe, then when outlook opens, the path has been converted to > lower-case. > > On subsequent visits, the Launch Application dialog shows "OUTLOOK.EXE" as a > choice. > > -- > > So, at some point in my years of using Firefox, I had browsed for the > application. thanks, I'll take a look.
Comment 30•11 years ago
|
||
This looks like a bug in Outlook related to command line processing. You should avoid using the browsed-to entry for the app. I traced this to a ShellExecuteEx call down in our xpcom/threads/process code [1] and confirmed we aren't mucking with the url. I also put together a simple test app to be sure (attached) that you can browse to that prints command line params to a console. There too things look ok. [1] http://mxr.mozilla.org/mozilla-central/source/xpcom/threads/nsProcessCommon.cpp#409
Comment 31•11 years ago
|
||
Updated•11 years ago
|
Summary: cant open outlook link → Can't open url link in Microsoft Outlook due to munged url casing when Outlook is chosen through app chooser's 'browse' feature
Reporter | ||
Comment 32•11 years ago
|
||
Thanks. Just to confirm this I opened a command window and ran the command from a prompt: outlook.exe http://www.mhsoftware.com/caldemo/iCal/calendar_id/2.ics and when the subscribe notice was displayed by Outlook, the case was converted.
Reporter | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•