Closed
Bug 127292
Opened 24 years ago
Closed 24 years ago
ftp TYPE I command (binary) is always sent (even for text/html files)
Categories
(Core Graveyard :: Networking: FTP, defect)
Core Graveyard
Networking: FTP
Tracking
(Not tracked)
VERIFIED
INVALID
People
(Reporter: Brade, Assigned: bbaetz)
Details
FTP currently always sends data as binary.
This means when text/html files are uploaded, the server is unable to do the
correct line ending fixup because it thinks the file is binary instead of text.
Can we turn on binary only when we are uploading files which aren't text/html or
similar?
| Assignee | ||
Comment 1•24 years ago
|
||
[on the right bug this time]
The problem is that sending a binary file as ascii is ok, but the other way
arround will fail. I could add an attribute on nsIFTPChannel, but you'd have to
avoid sending it for pictures. Relying on the os mimetype mappings for this is
probably not a good idea, I think. bz?
Comment 2•24 years ago
|
||
So we need to be able to tell whether a file is "binary" or "ascii" for purposes
of ftp transfer? MIME types can't possibly tell you that... consider a UTF-16
or UCS-2 encoded text/html file?
The only sane thing to do here is to look for a text/* type with a charset of
us-ascii (or maybe some other 1-byte encodings) on the channel.
| Assignee | ||
Comment 3•24 years ago
|
||
From the other bug I comented on incorrectly:
"------- Additional Comment #2 From Boris Zbarsky 2002-02-22 13:02 -------
So we need to be able to tell whether a file is "binary" or "ascii" for purposes
of ftp transfer? MIME types can't possibly tell you that... consider a UTF-16
or UCS-2 encoded text/html file?
------- Additional Comment #4 From brade@netscape.com 2002-02-22 13:04 -------
nsIChannel contains contentType; why can't you use that?
"
contentType is what the server told us. As bz mentiones, it also has nothing to
do with whether a file is binary or not (well, it could have a charset header,
and you could examine that, but...)
Is there a problem with incorrect file endings? Does anyone care?
| Assignee | ||
Comment 4•24 years ago
|
||
So, is this even possible? I'll future this unless someone has an idea on how to
make this work.
Comment 5•24 years ago
|
||
Can't we do this right at least for ".html" and ".htm"?
Comment 6•24 years ago
|
||
What is "correct"? If I have a .html file in UTF-16 and upload it via FTP in
ASCII mode, will I still have a valid UTF-16 file?
| Assignee | ||
Comment 7•24 years ago
|
||
I don't think we can do this.
INVALID unless someone can prove me wrong.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
VERIFIED:
absent a clear design direction, I think we should look at 4xp. If someone has
behavior in 4xp that we don't have here, please open a new bug on it.
Status: RESOLVED → VERIFIED
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•