<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] setting document.cookie from same domain in private mode overwrites previous value set in another webview"
href="https://bugs.webkit.org/show_bug.cgi?id=145734">145734</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[GTK] setting document.cookie from same domain in private mode overwrites previous value set in another webview
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>528+ (Nightly build)
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>WebKit2
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>kapouer@melix.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=254434" name="attach_254434" title="test.cc and server.js to reproduce">attachment 254434</a> <a href="attachment.cgi?id=254434&action=edit" title="test.cc and server.js to reproduce">[details]</a></span>
test.cc and server.js to reproduce
Hi,
if i do this:
```
load blank page in private webview <a href="http://localhost:40001/one">http://localhost:40001/one</a>
page change <a href="http://localhost:40001/one">http://localhost:40001/one</a> 0
page change <a href="http://localhost:40001/one">http://localhost:40001/one</a> 2
page change <a href="http://localhost:40001/one">http://localhost:40001/one</a> 3
set cookie by running script on page <a href="http://localhost:40001/one">http://localhost:40001/one</a>
document.cookie = 'sid=firstcookie; Path=/';
loading blank page in another private webview <a href="http://localhost:40001/two">http://localhost:40001/two</a>
page change <a href="http://localhost:40001/two">http://localhost:40001/two</a> 0
page change <a href="http://localhost:40001/two">http://localhost:40001/two</a> 2
page change <a href="http://localhost:40001/two">http://localhost:40001/two</a> 3
set cookie by running script on page <a href="http://localhost:40001/two">http://localhost:40001/two</a>
document.cookie = 'sid=secondcookie; Path=/';
load actual page1 content with script that do a xhr GET request to /xhr (need a http server)
page change <a href="http://localhost:40001/one">http://localhost:40001/one</a> 0
page change <a href="http://localhost:40001/one">http://localhost:40001/one</a> 2
page change <a href="http://localhost:40001/one">http://localhost:40001/one</a> 3
```
then the HTTP server receives a request to <a href="http://localhost:40001/xhr">http://localhost:40001/xhr</a> with these headers:
```
{ host: 'localhost:40001',
referer: '<a href="http://localhost:40001/one">http://localhost:40001/one</a>',
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/601.1 (KHTML, like Gecko) Version/8.0 Safari/601.1',
accept: '*/*',
'accept-encoding': 'gzip, deflate',
'accept-language': 'fr-fr',
connection: 'Keep-Alive',
cookie: 'sid=secondcookie' }
```
I expected cookie to be 'sid=firstcookie', especially in private mode.
Am i wrong ?
I attach actual code to reproduce with webkit2gtk 2.8 or 2.9 (and probably 2.6 too).
The server part is a nodejs script but any other server is good.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>