Bug 42240 - [GTK] http/tests/media/video-cookie.html fails
Summary: [GTK] http/tests/media/video-cookie.html fails
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 42247 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-14 01:58 PDT by Philippe Normand
Modified: 2010-08-10 19:16 PDT (History)
5 users (show)

See Also:


Attachments
Create SoupCookieJar in tests if it does not exist when setting the accept policy (3.32 KB, patch)
2010-07-15 04:15 PDT, Sergio Villar Senin
no flags Details | Formatted Diff | Diff
Create SoupCookieJar in tests if it does not exist when setting the accept policy (3.37 KB, patch)
2010-07-15 04:20 PDT, Sergio Villar Senin
no flags Details | Formatted Diff | Diff
Create SoupCookieJar in tests if it does not exist when setting the accept policy (2.68 KB, patch)
2010-08-10 01:01 PDT, Sergio Villar Senin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2010-07-14 01:58:33 PDT
This test started to fail. Will bisect, this is a recent regression.
Comment 1 Philippe Normand 2010-07-14 02:06:01 PDT
Skipped as of http://trac.webkit.org/changeset/63293
Comment 2 WebKit Review Bot 2010-07-14 02:17:44 PDT
http://trac.webkit.org/changeset/63293 might have broken GTK Linux 32-bit Debug
The following changes are on the blame list:
http://trac.webkit.org/changeset/63292
http://trac.webkit.org/changeset/63293
Comment 3 Philippe Normand 2010-07-14 03:37:08 PDT
So after some investigation it seems the client gets a valid cookie after the first request to the server but then fails to send it again for the second request. Here's a trace of the HTTP session:

GET /media/resources/setCookie.cgi?name=resources/test.mp4 HTTP/1.1
Host: 127.0.0.1:8000
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Safari/531.2+
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Encoding: gzip

HTTP/1.1 200 OK
Date: Wed, 14 Jul 2010 10:25:44 GMT
Server: Apache/2.2.15 (Debian) mod_ssl/2.2.15 OpenSSL/0.9.8o PHP/5.3.2-1 with Suhosin-Patch
Cache-Control: no-store, no-cache="set-cookie"
Set-Cookie: TEST=resources/test.mp4
Content-Length: 0
Content-Type: text/plain

GET /media/resources/video-cookie-check-cookie.php HTTP/1.1
Host: 127.0.0.1:8000
transferMode.dlna: Streaming
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Safari/531.2+
icy-metadata: 1
Referer: file:///home/phil/gst/jhbuild/build/WebKit/LayoutTests/http/tests/media/video-cookie.html
Accept: */*
Accept-Encoding: gzip

HTTP/1.1 200 OK
Date: Wed, 14 Jul 2010 10:25:44 GMT
Server: Apache/2.2.15 (Debian) mod_ssl/2.2.15 OpenSSL/0.9.8o PHP/5.3.2-1 with Suhosin-Patch
X-Powered-By: PHP/5.3.2-1
Content-Length: 0
Content-Type: text/html
Comment 4 Sergio Villar Senin 2010-07-15 04:15:24 PDT
Created attachment 61638 [details]
Create SoupCookieJar in tests if it does not exist when setting the accept policy

The problem was that the test was trying to set the cookie accept policy before the SoupCookieJar was actually created. This happens because we create it on demand, i.e the first time a http request is issued. In this test the first request is a file:// url, that's why when the test tries to set the accept policy it fails because there is no SoupCookieJar. After that the following http request creates the soupcookiejar but with the default accept policy, which is no third party. That is the reason why the test was not working

What we do now is to create the SoupCookieJar if the test requests to change the accept policy and the jar was not yet created.
Comment 5 WebKit Review Bot 2010-07-15 04:16:03 PDT
Attachment 61638 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebKitTools/ChangeLog:10:  Line contains tab character.  [whitespace/tab] [5]
WebKitTools/ChangeLog:11:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 2 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Sergio Villar Senin 2010-07-15 04:20:40 PDT
Created attachment 61639 [details]
Create SoupCookieJar in tests if it does not exist when setting the accept policy

New version with style fixes
Comment 7 Philippe Normand 2010-07-15 05:30:55 PDT
*** Bug 42247 has been marked as a duplicate of this bug. ***
Comment 8 Xan Lopez 2010-08-02 03:55:53 PDT
Comment on attachment 61639 [details]
Create SoupCookieJar in tests if it does not exist when setting the accept policy

It looks good. Does add_feature ref the feature or not? If it does I guess you should unref it after adding.
Comment 9 Sergio Villar Senin 2010-08-10 01:01:25 PDT
Created attachment 63983 [details]
Create SoupCookieJar in tests if it does not exist when setting the accept policy

Added missing g_object_unref()
Comment 10 Eric Seidel (no email) 2010-08-10 03:17:28 PDT
Comment on attachment 61639 [details]
Create SoupCookieJar in tests if it does not exist when setting the accept policy

Cleared Xan Lopez's review+ from obsolete attachment 61639 [details] so that this bug does not appear in http://webkit.org/pending-commit.
Comment 11 Xan Lopez 2010-08-10 07:59:38 PDT
Comment on attachment 63983 [details]
Create SoupCookieJar in tests if it does not exist when setting the accept policy

r=me
Comment 12 WebKit Commit Bot 2010-08-10 08:48:13 PDT
Comment on attachment 63983 [details]
Create SoupCookieJar in tests if it does not exist when setting the accept policy

Rejecting patch 63983 from commit-queue.

Failed to run "['WebKitTools/Scripts/update-webkit']" exit_code: 2
Updating OpenSource
fatal: Unable to create '/Users/eseidel/Projects/CommitQueue/.git/svn/refs/remotes/trunk/index.lock': File exists.

If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
write-tree: command returned error: 128

Died at WebKitTools/Scripts/update-webkit line 129.

Full output: http://queues.webkit.org/results/3756037
Comment 13 Eric Seidel (no email) 2010-08-10 10:00:19 PDT
Comment on attachment 63983 [details]
Create SoupCookieJar in tests if it does not exist when setting the accept policy

Sorry.  I believe I've fixed the machine now.
Comment 14 WebKit Commit Bot 2010-08-10 19:15:54 PDT
Comment on attachment 63983 [details]
Create SoupCookieJar in tests if it does not exist when setting the accept policy

Clearing flags on attachment: 63983

Committed r65113: <http://trac.webkit.org/changeset/65113>
Comment 15 WebKit Commit Bot 2010-08-10 19:16:00 PDT
All reviewed patches have been landed.  Closing bug.