summaryrefslogtreecommitdiffstats
path: root/net/data/proxy_script_fetcher_unittest
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-22 03:06:54 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-22 03:06:54 +0000
commit8f3c963473091104513c05328fe2fe98989e8339 (patch)
tree6dcf38d7305ee622a13b56c5f30143eb833148ef /net/data/proxy_script_fetcher_unittest
parent0f3dfb420337c569091ac303081c30c9e060f842 (diff)
downloadchromium_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/data/proxy_script_fetcher_unittest')
-rw-r--r--net/data/proxy_script_fetcher_unittest/gzipped_pacbin0 -> 43 bytes
-rw-r--r--net/data/proxy_script_fetcher_unittest/gzipped_pac.mock-http-headers3
-rw-r--r--net/data/proxy_script_fetcher_unittest/utf16be_pacbin0 -> 60 bytes
-rw-r--r--net/data/proxy_script_fetcher_unittest/utf16be_pac.mock-http-headers2
4 files changed, 5 insertions, 0 deletions
diff --git a/net/data/proxy_script_fetcher_unittest/gzipped_pac b/net/data/proxy_script_fetcher_unittest/gzipped_pac
new file mode 100644
index 0000000..f44a604
--- /dev/null
+++ b/net/data/proxy_script_fetcher_unittest/gzipped_pac
Binary files differ
diff --git a/net/data/proxy_script_fetcher_unittest/gzipped_pac.mock-http-headers b/net/data/proxy_script_fetcher_unittest/gzipped_pac.mock-http-headers
new file mode 100644
index 0000000..b9a3312
--- /dev/null
+++ b/net/data/proxy_script_fetcher_unittest/gzipped_pac.mock-http-headers
@@ -0,0 +1,3 @@
+HTTP/1.1 200 OK
+Content-Type: application/x-ns-proxy-autoconfig
+Content-Encoding: gzip
diff --git a/net/data/proxy_script_fetcher_unittest/utf16be_pac b/net/data/proxy_script_fetcher_unittest/utf16be_pac
new file mode 100644
index 0000000..892841f
--- /dev/null
+++ b/net/data/proxy_script_fetcher_unittest/utf16be_pac
Binary files differ
diff --git a/net/data/proxy_script_fetcher_unittest/utf16be_pac.mock-http-headers b/net/data/proxy_script_fetcher_unittest/utf16be_pac.mock-http-headers
new file mode 100644
index 0000000..1bd08ee
--- /dev/null
+++ b/net/data/proxy_script_fetcher_unittest/utf16be_pac.mock-http-headers
@@ -0,0 +1,2 @@
+HTTP/1.1 200 OK
+Content-Type: text/javascript; charset=UTF16-BE