diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 03:06:54 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 03:06:54 +0000 |
commit | 8f3c963473091104513c05328fe2fe98989e8339 (patch) | |
tree | 6dcf38d7305ee622a13b56c5f30143eb833148ef /net/proxy/proxy_resolver.h | |
parent | 0f3dfb420337c569091ac303081c30c9e060f842 (diff) | |
download | chromium_src-8f3c963473091104513c05328fe2fe98989e8339.zip chromium_src-8f3c963473091104513c05328fe2fe98989e8339.tar.gz chromium_src-8f3c963473091104513c05328fe2fe98989e8339.tar.bz2 |
Respect the charset specified in PAC file responses.
I have updated the documentation of ProxyResolver and ProxyScriptFetcher to indicate that the response must always be given as UTF8. So ProxyScriptFetcher is responsible for any charset conversions internally.
This CL also adds a unit-test to make sure that content-encodings are respected (like gzip). This was not previously broken, but it is a related area (and wasn't being tested.)
BUG=http://crbug.com/22310
Review URL: http://codereview.chromium.org/210028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26790 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_resolver.h')
-rw-r--r-- | net/proxy/proxy_resolver.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/proxy/proxy_resolver.h b/net/proxy/proxy_resolver.h index 3811be8..58b09e6 100644 --- a/net/proxy/proxy_resolver.h +++ b/net/proxy/proxy_resolver.h @@ -59,10 +59,10 @@ class ProxyResolver { } // Sets the PAC script backend to use for this proxy resolver (by contents). - int SetPacScriptByData(const std::string& bytes, + int SetPacScriptByData(const std::string& bytes_utf8, CompletionCallback* callback) { DCHECK(expects_pac_bytes()); - return SetPacScript(GURL(), bytes, callback); + return SetPacScript(GURL(), bytes_utf8, callback); } // TODO(eroman): Make this =0. @@ -72,12 +72,12 @@ class ProxyResolver { private: // Called to set the PAC script backend to use. If |pac_url| is invalid, - // this is a request to use WPAD (auto detect). |bytes| may be empty if the - // fetch failed, or if the fetch returned no content. + // this is a request to use WPAD (auto detect). |bytes_utf8| may be empty if + // the fetch failed, or if the fetch returned no content. // Returns ERR_IO_PENDING in the case of asynchronous completion, and notifies // the result through |callback|. virtual int SetPacScript(const GURL& pac_url, - const std::string& bytes, + const std::string& bytes_utf8, CompletionCallback* callback) = 0; const bool expects_pac_bytes_; |