diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-11 09:19:30 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-11 09:19:30 +0000 |
commit | 193c35145799c33bde24a470f460587954d70aba (patch) | |
tree | 330c97462719bb266940cec9cd40ea70531d8500 /net/base | |
parent | 587f4ff6420df90d4e6160aeb78918fcf55e3599 (diff) | |
download | chromium_src-193c35145799c33bde24a470f460587954d70aba.zip chromium_src-193c35145799c33bde24a470f460587954d70aba.tar.gz chromium_src-193c35145799c33bde24a470f460587954d70aba.tar.bz2 |
FTP: fix navigating to files listed under non-ASCII characters
We need to convert the file name back to server encoding.
BUG=38016
TEST=see bug
Review URL: http://codereview.chromium.org/1857002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46900 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r-- | net/base/net_error_list.h | 3 | ||||
-rw-r--r-- | net/base/net_util.h | 10 |
2 files changed, 9 insertions, 4 deletions
diff --git a/net/base/net_error_list.h b/net/base/net_error_list.h index c42549d..3338229 100644 --- a/net/base/net_error_list.h +++ b/net/base/net_error_list.h @@ -335,6 +335,9 @@ NET_ERROR(INVALID_AUTH_CREDENTIALS, -338) // machine. NET_ERROR(UNSUPPORTED_AUTH_SCHEME, -339) +// Detecting the encoding of the response failed. +NET_ERROR(ENCODING_DETECTION_FAILED, -340) + // The cache does not have the requested entry. NET_ERROR(CACHE_MISS, -400) diff --git a/net/base/net_util.h b/net/base/net_util.h index 77bd69a..5c3e37e 100644 --- a/net/base/net_util.h +++ b/net/base/net_util.h @@ -210,10 +210,12 @@ std::string GetDirectoryListingHeader(const string16& title); // Currently, it's a script tag containing a call to a Javascript function // |addRow|. // -// Its 1st parameter is derived from |name| and is the Javascript-string -// escaped form of |name| (i.e \uXXXX). The 2nd parameter is the url-escaped -// |raw_bytes| if it's not empty. If empty, the 2nd parameter is the -// url-escaped |name| in UTF-8. +// |name| is the file name to be displayed. |raw_bytes| will be used +// as the actual target of the link (so for example, ftp links should use +// server's encoding). If |raw_bytes| is an empty string, UTF-8 encoded |name| +// will be used. +// +// Both |name| and |raw_bytes| are escaped internally. std::string GetDirectoryListingEntry(const string16& name, const std::string& raw_bytes, bool is_dir, int64 size, |