firefox ftp client don't understand links in cyrillic letters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mozilla Firefox |
Fix Released
|
Medium
|
|||
firefox (Ubuntu) |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
Binary package hint: firefox-3.0
Ubuntu 8.04
3.0~b5+
When ftp session is open and I want to follow a link that contains cyrillic letters in, Firefox getting an error
ProblemType: Bug
Architecture: i386
Date: Sat Apr 26 19:59:05 2008
DistroRelease: Ubuntu 8.04
NonfreeKernelMo
Package: firefox-3.0 3.0~b5+
PackageArchitec
ProcEnviron:
PATH=/
LANG=ru_RU.UTF-8
SHELL=/bin/bash
SourcePackage: firefox-3.0
Uname: Linux 2.6.24-16-generic i686
In Mozilla Bugzilla #26767, Warrensomebody (warrensomebody) wrote : | #1 |
In Mozilla Bugzilla #26767, Doug-turner (doug-turner) wrote : | #3 |
*** Bug 64700 has been marked as a duplicate of this bug. ***
In Mozilla Bugzilla #26767, Doug-turner (doug-turner) wrote : | #4 |
unsetting milestone
In Mozilla Bugzilla #26767, Doug-turner (doug-turner) wrote : | #5 |
*** Bug 20292 has been marked as a duplicate of this bug. ***
In Mozilla Bugzilla #26767, Benc-meer (benc-meer) wrote : | #6 |
mass move, v2.
qa to me.
In Mozilla Bugzilla #26767, Benc-frame (benc-frame) wrote : | #7 |
->ftp
In Mozilla Bugzilla #26767, Doug-turner (doug-turner) wrote : | #8 |
reassigning to <email address hidden>.
In Mozilla Bugzilla #26767, Bradley Baetz (bbaetz) wrote : | #9 |
Are you aware of any servers which implement this?
In Mozilla Bugzilla #26767, Benc-meer (benc-meer) wrote : | #10 |
will test against:
ftp://kaze/
In Mozilla Bugzilla #26767, Momoi (momoi) wrote : | #11 |
What are we exactly testing? Maybe I can help better. kaze is my server
and I set up the original test case for some other bug. I am not
sure if it is a proper test case for this bug.
In Mozilla Bugzilla #26767, Bradley Baetz (bbaetz) wrote : | #12 |
This definately won't work. (jbetak tested it as part of my directory viewer
changes, and it was broken to start with). This really can't be done until file
urls display with the proper character set, though. I cna't fix this unless I
get access to a server which implements this extention. Can someone please
telnet into kaze on the ftp port (21), and give me the results of typing, in order:
FEAT
USER anonymous
PASS <email address hidden>
FEAT
SYST
This will at least let me confirm what server it is, and whether it is, in fact,
following this RFC.
In Mozilla Bugzilla #26767, Momoi (momoi) wrote : | #13 |
kaze is running AIX 4.2.1 and its FTP cannot be compliant
with RFC 2640.
But here is the output you requested:
500 'FEAT': command not understood.
SYST
215 UNIX Type: L8 Version: BSD-44
In Mozilla Bugzilla #26767, Bradley Baetz (bbaetz) wrote : | #14 |
Does kaze use UTF8? Can you create a new directory with a file called fooé
(thats f-o-o-(e-actute)), and attach a packet trace of us trying to download
this file?
I tried just assuming all ftp data was UTF8 by default, but wuftpd uses
iso-8859-1, and so that broke. Can you try using the html ftp view, and changing
the charset using the view menu? does that help? Can you load files with non
ascii names - ie is this just a display problem? Do you know of clients which
support this server? If so, can you get a packet trace of one of them connecting
and downloading a file with non-iso-8859-1 chars, and another one of us doing
the same? On today's trunk build theres a bug which I would like you to exploit
- can you load the html directory listing, and then use file->send-page to mail
me the raw output of what we think we get? I won't fix that bug til the weekend..
benc: Can I get you to help momoi to do this? I assume that momoi doesn't have a
packet trace tool installed.
In Mozilla Bugzilla #26767, Benc-meer (benc-meer) wrote : | #15 |
momoi: lets find some time to look at this problem....
In Mozilla Bugzilla #26767, Momoi (momoi) wrote : | #16 |
Yes, benc, let's do that next week. It should not be that
hard to come up with what we need.
In Mozilla Bugzilla #26767, R-contact2009-awhlink-com (r-contact2009-awhlink-com) wrote : | #17 |
Adding intl keyword.
In Mozilla Bugzilla #26767, Bradley Baetz (bbaetz) wrote : | #18 |
*** Bug 144717 has been marked as a duplicate of this bug. ***
In Mozilla Bugzilla #26767, Richard W.M. Jones (rich-annexia) wrote : | #19 |
I'm the author of bug 144717 which is a dup of this one. I have put up a test
FTP site where you can all test this out.
Machine: annexia.org
Username: mozilla
Password: mozilla
Or use the following URL: ftp://mozilla:<email address hidden>/
(Sorry my machine is quite slow).
There are three files in this directory. All file names are in UTF-8 format. The
first is Greek, the second is Chinese and the third is Japanese. Go to the
UTF-8 sampler page (http://
the original strings *should* look like.
NCFTP gets this right. Mozilla and IE get it wrong. NCFTP correctly sends the
FEAT command which this FTP server understands. The response from FEAT is:
211-Extensions supported:
HOST
LANG EN*
MDTM
MLST TYPE*;SIZE*
REST STREAM
SIZE
TVFS
UTF8
211 END
(Note the "UTF8").
See also:
In Mozilla Bugzilla #26767, Bradley Baetz (bbaetz) wrote : | #20 |
What server is this running? SYST just says: "UNIX Type: L8", which doesn't
help. I'm curious, mainly because none of the 'big' ftp servers, (ie wuftpd,
iis, proftpd, and a few others I tested) support this.
Its probably not too difficult to do, I guess, once the patch bug 118179 lands.
We don't send FEAT at all, so we'd have to send that, and then parse the
response, though.
In Mozilla Bugzilla #26767, Richard W.M. Jones (rich-annexia) wrote : | #21 |
This particular server is Net::FTPServer/
(http://
NcFTPD also supports FEAT and UTF-8.
Our website and FTP service uses UTF-8 extensively because we need to support
a world-wide market with a mix of languages on the same pages.
Yes, you would need to issue the FEAT command and parse the output to see
if it contains the string "UTF8". If so, display the page in UTF-8 encoding.
If not, you're on your own (it's pretty much undefined: probably best to just
assume ISO-8859-1 as now).
In Mozilla Bugzilla #26767, Momoi (momoi) wrote : | #22 |
> If not, you're on your own (it's pretty much undefined:
> probably best to just assume ISO-8859-1 as now).
I don't think we can make such an assumption for this
type of situation. It would have to be the same encoding as
the system default or the browser window endcoding to be
safe.
If we pay attention to both LANG and encoding (=UTF-8),
I think we need to use the proper font for the LANG
value to display the result. Hope this is automatically
done the the layout and rendering components of Mozilla.
In Mozilla Bugzilla #26767, Richard W.M. Jones (rich-annexia) wrote : | #23 |
If FEAT is not supported by the server, or does not return the UTF8 feature,
then you'd need to guess the encoding on the server. Ouch :-) But assuming the
browser's default encoding might be better than just guessing ISO-8859-1.
I'm only really interested in the case where FEAT *is* supported and it
returns the UTF8 feature.
Note that RFC 2640 *requires* that clients now support and send the FEAT command
and recognise UTF8 encoding, so Mozilla is in non-compliance (from my reading
of the RFC anyway).
In Mozilla Bugzilla #26767, Momoi (momoi) wrote : | #24 |
My point is that UTF-8 encoding itself does not give
sufficient info on what font to use for Unifiied Ideograph
range for CJK. LANG info is important for proper display of
characters in such a case.
In Mozilla Bugzilla #26767, Tetsuroy (tetsuroy) wrote : | #25 |
>If FEAT is not supported by the server, or does not return the UTF8 feature,
>then you'd need to guess the encoding on the server. Ouch :-) But assuming the
>browser's default encoding might be better than just guessing ISO-8859-1.
Doesn't this bug get fixed by 118179?
I have a patch to use the Default char coding in the Pref.
In Mozilla Bugzilla #26767, Bradley Baetz (bbaetz) wrote : | #26 |
I have no time to work on mozilla at the moment, so dougt is taking over FTP
open ftp bugs -> him
In Mozilla Bugzilla #26767, Christian Biesinger (cbiesinger) wrote : | #27 |
*** Bug 335099 has been marked as a duplicate of this bug. ***
In Mozilla Bugzilla #26767, Doug-turner (doug-turner) wrote : | #28 |
mass reassigning to nobody.
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #29 |
Created attachment 311568
a patch for RFC2640 support. test w/ pure-ftped
sky (wsky) wrote : | #30 |
Binary package hint: firefox-3.0
Ubuntu 8.04
3.0~b5+
When ftp session is open and I want to follow a link that contains cyrillic letters in, Firefox getting an error
ProblemType: Bug
Architecture: i386
Date: Sat Apr 26 19:59:05 2008
DistroRelease: Ubuntu 8.04
NonfreeKernelMo
Package: firefox-3.0 3.0~b5+
PackageArchitec
ProcEnviron:
PATH=/
LANG=ru_RU.UTF-8
SHELL=/bin/bash
SourcePackage: firefox-3.0
Uname: Linux 2.6.24-16-generic i686
sky (wsky) wrote : | #31 |
- Screenshot-2.png Edit (82.0 KiB, image/png)
- Dependencies.txt Edit (2.7 KiB, text/plain; charset="utf-8")
- pluginreg.dat.txt Edit (5.6 KiB, text/plain; charset="utf-8")
- profiles.ini.txt Edit (94 bytes, text/plain; charset="utf-8")
In Mozilla Bugzilla #26767, Jan Darmochwal (jdarmochwal) wrote : | #32 |
*** Bug 325318 has been marked as a duplicate of this bug. ***
In Mozilla Bugzilla #26767, Egor-pelevin (egor-pelevin) wrote : | #33 |
(In reply to comment #29)
> Created an attachment (id=311568) [details]
> a patch for RFC2640 support. test w/ pure-ftped
>
Why don't you ask for review?
People on Mozilla Russia's forum keep asking about proper Cyrillic folder names support. At the moment they are stuck with the need to change 'network.
UTF-8 in FTP would be a good addition to Fx 3.1
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #34 |
(In reply to comment #31)
> (In reply to comment #29)
> > Created an attachment (id=311568) [details] [details]
> > a patch for RFC2640 support. test w/ pure-ftped
> >
>
> Why don't you ask for review?
Because mozilla-central tree (for 3.x and 4.0) isn't opened yet. After opened, I will send r/sr.
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #35 |
Created attachment 323826
a patch for RFC2640 support
RFC2640 (I18N FTP support). I tested using pure-ftpd (it is supported FEAT/OPTS)
In Mozilla Bugzilla #26767, Bzbarsky (bzbarsky) wrote : | #36 |
I don't think I'm qualified to review this patch. Dougt, would you be willing to take a look?
In Mozilla Bugzilla #26767, Doug-turner (doug-turner) wrote : | #37 |
Comment on attachment 323826
a patch for RFC2640 support
cool! m_kato, thanks for looking into this (a 5 digit bug, no less!)
got any test cases -- or a public server that I can test this against?
Does the ftp feature UTF8 imply that the paths that we send to the ftp server? (/me needs to refresh himself with rfc 2640!)
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #38 |
Although pure-ftpd (http://
- Spec
FTP serer must support FEAT command, client sends FEAT command, server must send UTF8 as result if supporting RFC2640. Next, client sends OPTS UTF8 ON commands to enable UTF8.
It supports Windows shell (aka FTP folder). And Filezilla supports it too.
In Mozilla Bugzilla #26767, Tim Kosse (tim-kosse) wrote : | #39 |
Not quite. RFC 2640 does not specify OPTS UTF8 ON. As long as UTF8 is in the FEAT response, everything already is using UTF-8.
OPTS UTF-8 ON is from a long-expired IETF draft (http://
An RFC2640 compliant server uses UTF-8 regardless of whether OPTS UTF-8 ON gets sent or not, and a compliant client assumes the server uses UTF-8 even if a OPTS UTF-8 ON command fails.
Note that using any encoding other than ASCII (RFC 959) or UTF-8 (RFC 2640) without prior explicit negotiation is not covered by the specs.
I've summarized this in my wiki: http://
In Mozilla Bugzilla #26767, Tim Kosse (tim-kosse) wrote : | #40 |
A quick glance at the proposed patch reveals that it is not RFC2640 compliant as it depends on the unspecified OPTS UTF-8 ON command.
In Mozilla Bugzilla #26767, Doug-turner (doug-turner) wrote : | #41 |
Makoto, can you fix this before I review?
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #42 |
I know that "OPTS UTF8 ON" is Microsoft's FTP folder spec. Since Microsoft implements foolish spec (not RFC2640), many servers do it to support FTP folder of Explorer.
Doug,
OK. After I change a code, then I will send review to you.
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #43 |
Created attachment 326913
a patch v2 for RFC2640 support
In Mozilla Bugzilla #26767, Doug-turner (doug-turner) wrote : | #44 |
Comment on attachment 326913
a patch v2 for RFC2640 support
instead of ftpcharset, lets change it to useUTF8. Lets not imply that there are multiple charsets available to ftp.
I am concerned that just setting the control channel's content charset isn't enough. There is code in ftp that deals with filepaths, conversion from filepaths to VMS paths, and other suspect code. Did you review this to see if anything needs to change?
I think I would be happier if there were public servers we could test against. Do any of these servers work:
http://
In Mozilla Bugzilla #26767, Richard W.M. Jones (rich-annexia) wrote : | #45 |
Here's a public server to test against:
by HTTP: http://
by FTP: ftp://mozilla:<email address hidden>/
Or:
Hostname: annexia.org
Username: mozilla
Password: mozilla
You should see three files in the directory. The two interesting
ones are the letter "ka" in two different languages:
http://
http://
Mozilla currently renders this wrong. NCFTP gets it right:
$ ncftp -u mozilla -p mozilla annexia.org
NcFTP 3.2.1 (Jul 29, 2007) by Mike Gleason (http://
Connecting to 80.68.91.176...
furbychan.cocan.org FTP server (Net::FTPServer
Logging in...
Welcome mozilla.
Logged in to annexia.org.
ncftp / > ls
か .htaccess क
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #46 |
Created attachment 326924
a patch v3
previous patch is a lack of streamconv code
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #47 |
(In reply to comment #42)
> I am concerned that just setting the control channel's content charset isn't
> enough. There is code in ftp that deals with filepaths, conversion from
> filepaths to VMS paths, and other suspect code. Did you review this to see if
> anything needs to change?
Current code uses ISO-8859-1 for all FTP channel. So even if current is VMS style, it is no problem to convert from ISO-8859-1 to UTF-8. (7bit character map is same. So "[", "]", "/" and "." is same mapping. And, if problem occurs with FEAT - UTF8 enable, it is broken characters as UTF8.)
And, I don't think that VMS style server supports new feature such as RFC2640.
Also, I will create new patch for changing metadata.
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #48 |
Created attachment 327207
a patch v4 for RFC2640 support
change metadata name of utf8 support into cache
In Mozilla Bugzilla #26767, Honzab-moz (honzab-moz) wrote : | #49 |
I applied the patch 327207 and was testing my patch for bug 296528 if it helps handling files with diacritics in name when dropped to firefox from windows explorer. I encountered assertion failure in:
msvcr80d.
msvcr80d.
msvcr80d.
msvcr80d.
> necko.dll!
necko.
necko.
necko.
necko.
necko.
necko.
docshell.
docshell.
docshell.
docshell.
docshell.
docshell.
xpcom_
In Mozilla Bugzilla #26767, Honzab-moz (honzab-moz) wrote : | #50 |
This happens when I want to access a file with diacritics with name a second time. (The first time I get "file could not be found" and the name of that file seems to be pure UTF-8 or native encoding of its name, like there would be instead of AUTF8String used ACString in some interface method declaration or decoding would be applied two times)
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #51 |
(In reply to comment #48)
> This happens when I want to access a file with diacritics with name a second
> time. (The first time I get "file could not be found" and the name of that file
> seems to be pure UTF-8 or native encoding of its name, like there would be
> instead of AUTF8String used ACString in some interface method declaration or
> decoding would be applied two times)
>
I will add simply null check. Then, I will submit new patch this week.
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #52 |
Created attachment 331315
patch v5
In Mozilla Bugzilla #26767, Honzab-moz (honzab-moz) wrote : | #53 |
IMHO better and cleaner would be to test result of mCacheEntry-
Further, maybe I misunderstood what this bug had to fix but I was testing international file names while fixing bug 296528 with patch (v4) of this bug applied. It didn't help to open files with diacritics in names when written directly to the address bar nor dropped from the windows explorer (attachment 330841 applied) and nor when click on the file name in FF FTP directory browser. I was testing on winxpsp2-en and with files with czech diacritics in name.
And one more nit, when building on windows I got: d:/mozilla/
nsIndexedToHTML
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #54 |
Created attachment 334663
patch v6
In Mozilla Bugzilla #26767, Doug-turner (doug-turner) wrote : | #55 |
michal, could you take a first look at this patch?
In Mozilla Bugzilla #26767, Michal-novotny (michal-novotny) wrote : | #56 |
Comment on attachment 334663
patch v6
This patch reintroduces partially bug 427089. For example try to follow link "Ñûñîâ" on page ftp://ftp.
I think that we should implement LANG command too. At the end of 4.1 section in RFC 2640 is:
"If user-PI issues a HOST command, and the server's default language is acceptable, it need not issue a LANG command. However, if the implementation does not support the HOST command, a LANG command MUST be issued. Until server-PI is presented with either a HOST or LANG command it SHOULD assume that the user-PI does not comply with this specification."
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #57 |
Michal,
"ftp.asu.ru" doesn't seem to support LANG command. So your idea isn't good.
This Russian server doesn't support FEAT and UTF-8, so URI by necko uses original charset (it will become old behavior. If URI is non-UTF8 and platform is non-UTF8, it uses platform charset with standard-uri setting).
There is same issue with Japanese IIS FTP Server. Until IIS 5.0 FTP server, although this can use Shift-JIS charset as directory and filename, it doesn't support FEAT and UTF-8.
Also, this patch cannot apply current tree because of bug 427089. I will make
new patch with considering bug 427089.
In Mozilla Bugzilla #26767, Michal-novotny (michal-novotny) wrote : | #58 |
(In reply to comment #55)
> "ftp.asu.ru" doesn't seem to support LANG command. So your idea isn't good.
There are 2 independent comments in my reply #54. I didn't say that LANG command would fix the problem with ftp.asu.ru. I'm just saying that this patch breaks what was fixed in bug 427089.
And it is good idea to implement LANG command just because RFC2640 demands it.
In Mozilla Bugzilla #26767, Michal-novotny (michal-novotny) wrote : | #59 |
Following check doesn't detect UTF8 in reply from proftpd:
+ if (mResponseMsg.
The most correct check would be (CRLF " UTF8" CRLF), but proftpd is buggy and sends LF only instead of CRLF. So we should use some more relaxed check like:
(mResponseMsg.
mResponseMsg.
The reason why there are problems with server ftp.asu.ru after applying your patch is that mPath is converted to originCharset when response to FEAT is received. But this happens only for the first request on the connection. Other requests that reuses the connection don't send FEAT command...
And I've found another problem. When server says that it supports UTF-8 but some filenames aren't valid UTF-8 strings, then conversion fails at http://
Alexander Sack (asac) wrote : | #60 |
is this still a problem with the latest ffox 3? If so, this is best dealt upstream as its not a ubuntu specific issue. first, verify that this is not caused by some extensions (disable all in tools -> addons and restart). Then please search in http://
Changed in firefox-3.0: | |
importance: | Undecided → Medium |
status: | New → Incomplete |
Alexander Sack (asac) wrote : | #61 |
this is https:/
Changed in firefox-3.0: | |
status: | Incomplete → Triaged |
importance: | Medium → Wishlist |
Changed in firefox: | |
importance: | Undecided → Unknown |
status: | New → Unknown |
Changed in firefox: | |
status: | Unknown → In Progress |
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #62 |
Michal,
> And I've found another problem. When server says that it supports UTF-8 but
> some filenames aren't valid UTF-8 strings, then conversion fails at
> http://
> and such files aren't in the listing at all.
Why? If server return UTF8 as FEAT result, server should return "UTF8 filename".
If server doesn't return it, I should not consider error. Why does client consider it?
If server doesn't return UTF8 as FEAT, I can make sense it.
In Mozilla Bugzilla #26767, Michal-novotny (michal-novotny) wrote : | #63 |
Server that supports FEAT UTF8 can return non-UTF8 filename and according to "RFC2640 Annex A.1 paragraph 4" I think that it happens quite often:
- A server that copies pathnames transparently from a local
filesystem may continue to do so. It is then up to the local file
creators to use UTF-8 pathnames.
And according to "RFC2640 3.1 last paragraph" client SHOULD handle these cases:
- There may be cases when the code set / encoding presented to the
server or client cannot be determined. In such cases the raw bytes
SHOULD be used.
In Mozilla Bugzilla #26767, Doug-turner (doug-turner) wrote : | #64 |
Comment on attachment 334663
patch v6
makoto, where we on this? Can you resolve michal's issues with your patch? Specifically, what are we going to do about invalid utf-8 strings being return by the server?
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #65 |
Created attachment 391260
patch v7
work in progress...
In Mozilla Bugzilla #26767, Juan Simón (simonbcn) wrote : | #66 |
*** Bug 536861 has been marked as a duplicate of this bug. ***
Changed in firefox: | |
importance: | Unknown → Wishlist |
In Mozilla Bugzilla #26767, Jo-hermans (jo-hermans) wrote : | #67 |
*** Bug 686440 has been marked as a duplicate of this bug. ***
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #68 |
Created attachment 568615
Part 1. client detects UTF-8 if FTP server returns UTF8 on FEAT
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #69 |
Created attachment 568616
Part 2. 301: <encoding> works on nsIndexedToHTML correctly
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #70 |
Created attachment 568617
Part 3. FTP directory list sets the encoding when current FTP server supports UTF-8
In Mozilla Bugzilla #26767, Honzab-moz (honzab-moz) wrote : | #71 |
Comment on attachment 568615
Part 1. client detects UTF-8 if FTP server returns UTF8 on FEAT
Redirecting to Michal, he knows this area much better then me.
In Mozilla Bugzilla #26767, Michal-novotny (michal-novotny) wrote : | #72 |
Makoto, I've tested your patch and before going any further with the review I'd like to get back to comment #54. With this patch applied I can't browse directories in ftp://ftp.
The situation is now different in that ftp.asu.ru already supports FEAT command and returns UTF8. Those problematic files are in cp1251 encoding which is IMO allowed (see comment #59) and probably quite common.
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #73 |
Created attachment 570960
Part 3. FTP directory list sets the encoding when current FTP server supports UTF-8 v2
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #74 |
Also, I will add part 4 patch to work CWD or MDTM by non-UTF8 path on UTF8 server.
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #75 |
Created attachment 571265
Part 2. "301: <encoding>" works on nsIndexedToHTML correctly v2
work on non UTF-8 path on UTF-8 FTP server.
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #76 |
(In reply to Michal Novotny (:michal) from comment #68)
> Makoto, I've tested your patch and before going any further with the review
> I'd like to get back to comment #54. With this patch applied I can't browse
> directories in ftp://ftp.
>
> The situation is now different in that ftp.asu.ru already supports FEAT
> command and returns UTF8. Those problematic files are in cp1251 encoding
> which is IMO allowed (see comment #59) and probably quite common.
New patch series will work on this ftp server.
In Mozilla Bugzilla #26767, Michal-novotny (michal-novotny) wrote : | #77 |
Comment on attachment 571265
Part 2. "301: <encoding>" works on nsIndexedToHTML correctly v2
> +nsresult
> +nsIndexedToHTM
> + nsString& aBuffer)
I think the name of the method is confusing. A name like WriteHeader would be IMO more appropriate. You could also move the check of mWroteHeader inside the method.
> + bool mWroteHeader;
This member isn't initialized in the constructor.
> + bool failbackCharset = encoding.
s/failback/
> if (mExpectAbsLoc &&
> - NS_SUCCEEDED(
> + NS_SUCCEEDED(
> // escape as absolute.
> - escFlags = esc_Forced | esc_OnlyASCII | esc_AlwaysCopy | esc_Minimal;
> + escFlags |= esc_Forced | esc_AlwaysCopy | esc_Minimal;
> }
As far as I can see, this can be removed completely. mExpectAbsLoc was set to true only in case of gopher and support for this protocol was removed.
In Mozilla Bugzilla #26767, Michal-novotny (michal-novotny) wrote : | #78 |
Comment on attachment 570960
Part 3. FTP directory list sets the encoding when current FTP server supports UTF-8 v2
> + channel-
> + if (mCharset.
> + // For RFC 2640 support, charset is into HTML, not channel.
> + // So we need clear charset on channel.
> + channel-
> + }
Could you please make the comment more verbose? Why it is needed to clear the charset and why only in case of UTF8?
> + if (mCharset.
> + // RFC 2640 section 3.3 says the following.
> + //
> + // If a client detects that a server is non UTF-8,
> + // it SHOULD change its display appropriately.
> + //
> + // So we need failback encoding.
> + mCharset.
> + }
There is still a problem when the directory is empty and its name isn't a valid UTF8 string. In this case call to mTextToSubURI-
In Mozilla Bugzilla #26767, Matti-mversen (matti-mversen) wrote : | #79 |
*** Bug 716189 has been marked as a duplicate of this bug. ***
affects: | firefox-3.0 (Ubuntu) → firefox (Ubuntu) |
In Mozilla Bugzilla #26767, M-kato (m-kato) wrote : | #80 |
*** Bug 942495 has been marked as a duplicate of this bug. ***
In Mozilla Bugzilla #26767, Vyv03354 (vyv03354) wrote : | #82 |
Created attachment 8398921
Part1. FTP client detects UTF-8 if server returns UTF8 on FEAT
- Rebased to tip.
- Although RFC 2640 does not define "OPTS UTF8 ON", Some ftp servers violates the RFC. ftp.asu.ru is one of such servers. I restored the OPTS support from the older patch. Sending "OPTS UTF8 ON" to compliant servers should be harmless.
In Mozilla Bugzilla #26767, Vyv03354 (vyv03354) wrote : | #83 |
Created attachment 8398922
Part 2: Read charset from the channel
- Bug 948901 made the ftp directry view byte-transparent, so this former part 2 & 3 could be greatly simplified.
In Mozilla Bugzilla #26767, Vyv03354 (vyv03354) wrote : | #84 |
Created attachment 8398925
Part 2: Read charset from the channel
Escape (percent-encode) URLs in case some totally broken servers return non-UTF-8 URLs.
In Mozilla Bugzilla #26767, Vyv03354 (vyv03354) wrote : | #85 |
Created attachment 8398993
Part1. FTP client detects UTF-8 if server returns UTF8 on FEAT
Fixed a build failure on gcc.
In Mozilla Bugzilla #26767, Vyv03354 (vyv03354) wrote : | #86 |
Comment on attachment 8398925
Part 2: Read charset from the channel
This part is no longer needed with the follow-up patch of bug 989576.
In Mozilla Bugzilla #26767, Vyv03354 (vyv03354) wrote : | #87 |
michal, ping?
In Mozilla Bugzilla #26767, Vyv03354 (vyv03354) wrote : | #88 |
Comment on attachment 8398993
Part1. FTP client detects UTF-8 if server returns UTF8 on FEAT
No response from Michal.
Honza, could you take a look at?
In Mozilla Bugzilla #26767, Michal-novotny (michal-novotny) wrote : | #89 |
Comment on attachment 8398993
Part1. FTP client detects UTF-8 if server returns UTF8 on FEAT
Review of attachment 8398993:
-------
Sorry for the delay, r+ with fixed indentation
::: netwerk/
@@ +657,5 @@
> + case FTP_S_FEAT:
> + rv = S_feat();
> +
> + if (NS_FAILED(rv))
> + mInternalError = rv;
wrong indentation
@@ +675,5 @@
> + case FTP_S_OPTS:
> + rv = S_opts();
> +
> + if (NS_FAILED(rv))
> + mInternalError = rv;
wrong indentation
In Mozilla Bugzilla #26767, Vyv03354 (vyv03354) wrote : | #90 |
Thank you. Landed with the indent fixed.
https:/
In Mozilla Bugzilla #26767, Neil-httl (neil-httl) wrote : | #91 |
(In reply to Masatoshi Kimura from comment #82)
> Comment on attachment 8398925
> Part 2: Read charset from the channel
>
> This part is no longer needed with the follow-up patch of bug 989576.
Although, would it be nice to emit a <meta charset="UTF-8"> tag if we know that the charset is UTF-8 so that we don't have to detect it later on (and report that annoying warning to the console)?
In Mozilla Bugzilla #26767, Vyv03354 (vyv03354) wrote : | #92 |
The charset information will be taken from the channel which is more preferable than the meta element.
Neither auto-detect nor console warnings are involved.
In Mozilla Bugzilla #26767, Vyv03354 (vyv03354) wrote : | #93 |
I tested with the tinderbox build and verified that no console warnings are displayed.
http://
In Mozilla Bugzilla #26767, KWierso (kwierso) wrote : | #94 |
Changed in firefox: | |
status: | In Progress → Fix Released |
Paul White (paulw2u) wrote : | #95 |
Upstream bugs showing "RESOLVED FIXED" on 2014-04-22 and 2014-03-29
Closing by marking "Fix Released"
Changed in firefox (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in firefox: | |
importance: | Wishlist → Medium |
-> Jud