Skip to content

Commit

Permalink
Merge r176119 - [SOUP] Encode/Decode allowCookies in ResourceRequest
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=138730

Reviewed by Sergio Villar Senin.

We are not sending this information to the network process, making
cookies always available. Fixes
http/tests/xmlhttprequest/cross-origin-no-authorization.html when
network process is enabled.

* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):

Canonical link: https://commits.webkit.org/154760.209@webkitgtk/2.6
git-svn-id: https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.6@176189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
carlosgcampos committed Nov 17, 2014
1 parent 761e837 commit c395995
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,19 @@
2014-11-14 Carlos Garcia Campos <cgarcia@igalia.com>

[SOUP] Encode/Decode allowCookies in ResourceRequest
https://bugs.webkit.org/show_bug.cgi?id=138730

Reviewed by Sergio Villar Senin.

We are not sending this information to the network process, making
cookies always available. Fixes
http/tests/xmlhttprequest/cross-origin-no-authorization.html when
network process is enabled.

* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):

2014-11-13 Carlos Garcia Campos <cgarcia@igalia.com>

[SOUP] Missing ResourceRequest members encoded/decoded
Expand Down
6 changes: 6 additions & 0 deletions Source/WebKit2/Shared/soup/WebCoreArgumentCodersSoup.cpp
Expand Up @@ -55,6 +55,7 @@ void ArgumentCoder<ResourceRequest>::encodePlatformData(ArgumentEncoder& encoder
encoder << httpBody->flattenToString();

encoder << resourceRequest.firstPartyForCookies().string();
encoder << resourceRequest.allowCookies();
encoder.encodeEnum(resourceRequest.priority());

encoder << static_cast<uint32_t>(resourceRequest.soupMessageFlags());
Expand Down Expand Up @@ -98,6 +99,11 @@ bool ArgumentCoder<ResourceRequest>::decodePlatformData(ArgumentDecoder& decoder
return false;
resourceRequest.setFirstPartyForCookies(URL(URL(), firstPartyForCookies));

bool allowCookies;
if (!decoder.decode(allowCookies))
return false;
resourceRequest.setAllowCookies(allowCookies);

ResourceLoadPriority priority;
if (!decoder.decodeEnum(priority))
return false;
Expand Down

0 comments on commit c395995

Please sign in to comment.