Closed Bug 381442 Opened 17 years ago Closed 3 years ago

Firefox won't read text files delivered by ftp.

Categories

(Firefox :: File Handling, defect)

defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: L.Wood, Unassigned)

References

()

Details

I open up ftp://blah.com/blah.txt.

A dialog pops up asking:

"You have chosen to open

blah.txt

which is a: Text Document
from: ftp://ftp-eng.cisco.com/com

What should Firefox do with this file?

Open with [  ]

Save to Disc."

I just want to read the textfile in Firefox, but that's not an option. If I navigate the Other... executable selector in the 'Open with' popup, I can select Firefox -- which then spawns another copy of Firefox, which promptly pops up the same 'I can't handle this' dialog.

It's a text document. Firefox knows it's a text document. Firefox can display text documents. There should be an option to display it in Firefox - or that should be the user-friendly default, given that you can always save afterwards from Firefox's File menu.

(this applies to all other data types that firefox handles and recognises. An swf file downloaded by ftp can be shown in firefox directly... only if firefox doesn't handle it or doesn't know what it is should the save dialog be the default.)
Can you give an actual example of a site where this happens? ftp://releases.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7/MD5SUMS , for example, seems to work for me. I suspect this depends on the server configuration.
ftp://ftp-eng.cisco.com/test.txt

since Firefox recognises it as text, which is all that is required, I think it's a  Firefox side thing. (The site requires passive ftp - that's the only oddity I know of.)

I see the file you give is accessible via http from the same place.

http://releases.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7/MD5SUMS

are you SURE Firefox is accessing it by ftp? How would it know it's a textfile, without extension, as ftp has no mimetype? Isn't that site using Apache, whose ftp server kind of blurs the boundaries between ftp and http?

I think you need to give a non-mozilla example...
I can't connect to that server. I'm sure that Firefox is using FTP to access that site, because the URI's scheme is "ftp". I don't think the FTP server running at that domain has anything to do with Apache (it appears to be running vsFTPd).
I can reproduce the issue with ftp://ftp.microsoft.com/developr/readme.txt. I'm not sure how we determine whether something is "displayable" over FTP.
Hmmm. And I can't reach the Microsoft site....

ftp://ftp-eng.cisco.com/test.txt
(it's an empty file)

is on a public server, though passive ftp is needed to talk to the ftp server. A common access problem for this ftp site is that IE users don't have passive ftp and folder listings turned on (in IE, Tools/Options... Advanced tab) - but that shouldn't affect Firefox, even if you're using some sort of Microsoft html renderer?

Puzzling.
ftp://ftp.rfc-editor.org/ietf/0mtg-agenda.txt
is another server showing the same behaviour. Updating url field - everyone should be able to reach this one.
for those who are seeing this bug, does your mimeTypes.rdf contain a line with "txt"? If so, what's NC:value line before it?

(I suspect you do have such an entry, and if you do, firefox interprets txt files on FTP servers (and local files) as that mime type)
I have both:
  <RDF:Description RDF:about="urn:mimetype:application/x-download"
                   NC:value="application/x-download"
                   NC:editable="true"
                   NC:fileExtensions="txt"
                   NC:description="Text Document">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:application/x-download"/>
  </RDF:Description>
and:
  <RDF:Description RDF:about="urn:mimetype:text/plain"
                   NC:fileExtensions="txt"
                   NC:description="Text Document"
                   NC:value="text/plain"
                   NC:editable="true">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:text/plain"/>
  </RDF:Description>
in my mimeTypes.rdf. The "application/x-download" one is second, I guess it wins?
I have

<RDF:Description RDF:about="urn:mimetype:unknown/exe"
                   NC:fileExtensions="txt"
                   NC:description="Text Document"
                   NC:value="unknown/exe"
                   NC:editable="true">

I don't even have a "text/plain" mimetype mentioned. The above presumably trumps what's in Mozilla Firefox/defaults/profile/mimeTypes.rdf:

  <RDF:Description RDF:about="urn:mimetype:handler:unknown/exe"
                   NC:useSystemDefault="false"
                   NC:handleInternal="false"
                   NC:alwaysAsk="true"
                   NC:saveToDisk="true">

which doesn't have anything for text/plain either.
Component: Download Manager → File Handling
Product: Firefox → Core
QA Contact: download.manager → file-handling
Product: Core → Firefox
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INACTIVE
See Also: → kill-ftp
You need to log in before you can comment on or make changes to this bug.