Following check doesn't detect UTF8 in reply from proftpd:
+ if (mResponseMsg.Find(NS_LITERAL_CSTRING("UTF8" CRLF), PR_TRUE) > -1) {
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:
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...
Following check doesn't detect UTF8 in reply from proftpd:
+ if (mResponseMsg. Find(NS_ LITERAL_ CSTRING( "UTF8" CRLF), PR_TRUE) > -1) {
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. Find(NS_ LITERAL_ CSTRING( CRLF " UTF8" CRLF), PR_TRUE) > -1 || Find(NS_ LITERAL_ CSTRING( LFSTR " UTF8" LFSTR), PR_TRUE) > -1)
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:// mxr.mozilla. org/mozilla- central/ source/ netwerk/ streamconv/ converters/ nsDirIndexParse r.cpp#297 and such files aren't in the listing at all.