Open
Bug 460891
Opened 16 years ago
Updated 3 months ago
Wrong file name passed to helper app
Categories
(Firefox :: File Handling, defect)
Tracking
()
UNCONFIRMED
People
(Reporter: rees, Unassigned)
References
()
Details
Attachments
(1 file)
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092510 Ubuntu/8.04 (hardy) Firefox/3.0.3 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092510 Ubuntu/8.04 (hardy) Firefox/3.0.3 pdf helper app fails because firefox is passing it the wrong file name. I have not checked to see whether other apps have the same problem. Possibly related to bug #444440. Reproducible: Always Steps to Reproduce: 1. Add a handler for pdf in ~/.mailcap. I use xpdf but I don't think this is critical. application/pdf; xpdf %s 2. Go to Preferences -> Applications and set pdf to "always ask." This is to work around bug #444440. 3. Visit a pdf url with a blank in its name. Other escapable characters work too. I use http://pergatory.mit.edu/2.007/resources/FUNdaMENTALs%20Book%20pdf/FUNdaMENTALs%20Topic%207.PDF . Actual Results: The helper will fail because firefox passes the wrong name to it. The file is actually stored as "/tmp/FUNdaMENTALs Topic 7-1.PDF" but the name passed to the helper app is "/tmp/FUNdaMENTALs%20Topic%207-1.PDF" In this example, xpdf prints "Error: Couldn't open file '/tmp/FUNdaMENTALs%20Topic%207-1.PDF'" and exits. Expected Results: Helper app should be passed the correct file name "/tmp/FUNdaMENTALs Topic 7-1.PDF" and run normally.
Comment 1•16 years ago
|
||
Hmm. With mozilla.org nightlies from both now and early June (so before the Firefox 3 release) that URL works fine as far as I can tell (FC 9, but that shouldn't affect things). Jim, would you be willing to test with a mozilla.org build on your system? I'm not seeing anything obvious in the ubuntu diffs I can find that would cause this, but it's a first step, at least...
I'd be happy to, if you can give me a gentle nudge in the right direction to find an appropriate nightly build. I wish I could tell you when this started happening. For some time I've noticed some pdfs wouldn't load and I've been using wget on them, but only recently discovered why.
Comment 3•16 years ago
|
||
A good thing to test first is probably http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.3/linux-i686/en-US/firefox-3.0.3.tar.bz2 Grab that, put it in /tmp, untar, run /tmp/firefox/firefox -profile /tmp/test_profile so as not to interfere with your normal profile. That's the mozilla.org version of what you're running.
Comment 5•16 years ago
|
||
That's not a nightly. That's a release... Did you quit Firefox before running it, by any chance?
I got it to run by using my own profile, and it has the same problem. Could there be something in my profile or settings that is causing this?
Comment 7•16 years ago
|
||
Possibly... Can you possibly do the equivalent of: env NSPR_LOG_FILE=/tmp/log.txt NSPR_LOG_MODULES=HelperAppService:5 firefox and then point Firefox to the url in question (reproducing the bug), quit, and attach the resulting log file to this bug report?
It's not my profile. The problem persists if I start with an empty profile. I have attached the log.
Comment 9•16 years ago
|
||
That log looks about right (too bad the GNOME stuff doesn't log so much). I wonder... what happens if your comment out or remove that line in your .mailcap?
Reporter | ||
Comment 10•16 years ago
|
||
No change. Also no change if I remove ~/gconf* . I'm not running gnome, except for the gtk built in to firefox. Could that make a difference?
Comment 11•16 years ago
|
||
I'm not running gnome either. But it sounds like you're getting a helper app from _somewhere_ here... and that whatever method launches that app screws up. I bet dmose and sdwilsh would love to join in right about now! And Mike, but he's already cced.
Comment 12•16 years ago
|
||
So, no gnome - does that mean we aren't using gnome vfs stuff? If we are, the code in question is here: http://mxr.mozilla.org/mozilla-central/source/toolkit/system/gnome/nsGnomeVFSService.cpp#107 Assuming we are going through LaunchDefaultWithFile It might be interesting to also know what your mimetypes.rdf looks like.
Comment 13•16 years ago
|
||
Er... why are we doing the format_uri_from_input thing on the filepath there? If gnome_vfs_mime_application_launch doesn't undo the escaping that presumably does (and I see nothing to indicate that it would), then that would cause this exact bug.
Comment 14•16 years ago
|
||
That was added by Mike in bug 421879, with biesi reviewing. Perhaps they know.
Comment 15•16 years ago
|
||
It was not really added per se, merely ported. nsGnomeVFSMimeApp::Launch replaces nsGnomeVFSService::ShowURIForInput in nsMIMEInfoUnix::LaunchDefaultWithFile. nsGnomeVFSService::Launch was already doing the format_uri_from_input before calling gnome_url_show. gnome_url_show ends up calling gnome_vfs_mime_application_launch_with_env without doing anything to the uri, so the end result is the same with nsGnomeVFSMimeApp::Launch
Reporter | ||
Comment 16•16 years ago
|
||
I've got a workaround and apparently no one else is seeing this, so I suggest this bug be closed.
Comment 17•16 years ago
|
||
Well... the thing is, if you see it then presumably other people with your setup also see it. They just don't know enough to go file a bug.
Updated•16 years ago
|
QA Contact: file.handling → file-handling
Updated•8 years ago
|
Product: Core → Firefox
Version: 1.9.0 Branch → unspecified
Comment hidden (spam) |
Updated•2 years ago
|
Severity: normal → S3
Reporter | ||
Comment 19•3 months ago
|
||
This bug can be closed. It seems to have fixed itself some time in the last couple of decades.
You need to log in
before you can comment on or make changes to this bug.
Description
•