diff options
author | pliard@chromium.org <pliard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-08 11:27:05 +0000 |
---|---|---|
committer | pliard@chromium.org <pliard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-08 11:27:05 +0000 |
commit | bba74b3dd925807e68ac0330c2835cc6b8bc1f49 (patch) | |
tree | e076c15abb951de58cdad19eda9349bbe55c9152 /webkit | |
parent | 571e37e2b99edc7e4f7dec7cc75216b02cc67818 (diff) | |
download | chromium_src-bba74b3dd925807e68ac0330c2835cc6b8bc1f49.zip chromium_src-bba74b3dd925807e68ac0330c2835cc6b8bc1f49.tar.gz chromium_src-bba74b3dd925807e68ac0330c2835cc6b8bc1f49.tar.bz2 |
Disable cookies when fetching favicon.
Processing cookies in a favicon response can cause undesirable side effects on
the cookie store. Some websites break because of this.
In particular it was impossible to login on linkedin on Android with desktop
user agent due to a 404 response with side effects on cookies (including the
authentication token cookie) for a /apple-touch-icon.png request.
BUG=171103,114082
Review URL: https://chromiumcodereview.appspot.com/12218057
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181483 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/resource_fetcher.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/webkit/glue/resource_fetcher.cc b/webkit/glue/resource_fetcher.cc index c3d7c84..8729aa7 100644 --- a/webkit/glue/resource_fetcher.cc +++ b/webkit/glue/resource_fetcher.cc @@ -51,6 +51,10 @@ void ResourceFetcher::Cancel() { void ResourceFetcher::Start(WebFrame* frame) { WebURLRequest request(url_); request.setTargetType(target_type_); + if (target_type_ == WebURLRequest::TargetIsFavicon) { + // Disable cookies to avoid side effects when fetching favicon. + request.setAllowCookies(false); + } request.setFirstPartyForCookies(frame->document().firstPartyForCookies()); frame->dispatchWillSendRequest(request); |