Bug 122965 - certain http media tests doesn't receive the expected "Content-Length" header
Summary: certain http media tests doesn't receive the expected "Content-Length" header
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-17 08:00 PDT by Andres Gomez Garcia
Modified: 2013-10-17 09:17 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.46 KB, patch)
2013-10-17 08:11 PDT, Andres Gomez Garcia
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andres Gomez Garcia 2013-10-17 08:00:41 PDT
Although this is not specific to GTK, if in this GTK we switch on SOUP's logging and run the following test:

$ ./Tools/Scripts/run-webkit-tests --gtk LayoutTests/http/tests/media/video-query-url.html

We get in the "actual" result the following last answer from the custom php script:

Network LOG: > GET /media/resources/load-video.php?name=test.mp4&type=video/mp4 HTTP/1.1
Network LOG: > Soup-Debug-Timestamp: 1382021649
Network LOG: > Soup-Debug: SoupSessionAsync 1 (0x17dc130), SoupMessage 4 (0x1dea1d0), SoupSocket 3 (0x1df2230)
Network LOG: > Host: 127.0.0.1:8000
Network LOG: > Referer: http://127.0.0.1:8000/media/video-query-url.html
Network LOG: > User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) Chromium/25.0.1349.2 Chrome/25.0.1349.2 Safari/538.1
Network LOG: > transferMode.dlna: Streaming
Network LOG: > Accept: */*
Network LOG: > Connection: Keep-Alive
Network LOG:   
Network LOG: < HTTP/1.1 200 OK
Network LOG: < Soup-Debug-Timestamp: 1382021649
Network LOG: < Soup-Debug: SoupMessage 4 (0x1dea1d0)
Network LOG: < Date: Thu, 17 Oct 2013 14:54:09 GMT
Network LOG: < Server: Apache/2.2.22 (Ubuntu) mod_ssl/2.2.22 OpenSSL/1.0.1c PHP/5.4.9-4ubuntu2.3
Network LOG: < X-Powered-By: PHP/5.4.9-4ubuntu2.3
Network LOG: < Status: 200 OK
Network LOG: < Last-Modified: Thu, 17 Oct 2013 14:54:09 GMT
Network LOG: < Pragma: no-cache
Network LOG: < ETag: "192844-1343840397"
Network LOG: < Accept-Ranges: bytes
Network LOG: < Connection: close
Network LOG: < Transfer-Encoding: chunked
Network LOG: < Content-Type: video/mp4
Network LOG: < 
Network LOG:   

LayoutTests/http/tests/media/video-query-url.html uses LayoutTests/http/tests/media/resources/serve-video.php that supposedly would be including the "Content-Length" header in its answer. However, it is not doing it.
Comment 1 Andres Gomez Garcia 2013-10-17 08:11:42 PDT
Created attachment 214458 [details]
Patch
Comment 2 Andres Gomez Garcia 2013-10-17 08:14:55 PDT
This is the "actual" output after applying the attached patch:

Network LOG: > GET /media/resources/load-video.php?name=test.mp4&type=video/mp4 HTTP/1.1
Network LOG: > Soup-Debug-Timestamp: 1382022139
Network LOG: > Soup-Debug: SoupSessionAsync 1 (0xcb8130), SoupMessage 4 (0x12c61d0), SoupSocket 3 (0x12cea30)
Network LOG: > Host: 127.0.0.1:8000
Network LOG: > Referer: http://127.0.0.1:8000/media/video-query-url.html
Network LOG: > User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) Chromium/25.0.1349.2 Chrome/25.0.1349.2 Safari/538.1
Network LOG: > transferMode.dlna: Streaming
Network LOG: > Accept: */*
Network LOG: > Connection: Keep-Alive
Network LOG:   
Network LOG: < HTTP/1.1 200 OK
Network LOG: < Soup-Debug-Timestamp: 1382022139
Network LOG: < Soup-Debug: SoupMessage 4 (0x12c61d0)
Network LOG: < Date: Thu, 17 Oct 2013 15:02:19 GMT
Network LOG: < Server: Apache/2.2.22 (Ubuntu) mod_ssl/2.2.22 OpenSSL/1.0.1c PHP/5.4.9-4ubuntu2.3
Network LOG: < X-Powered-By: PHP/5.4.9-4ubuntu2.3
Network LOG: < Status: 200 OK
Network LOG: < Last-Modified: Thu, 17 Oct 2013 15:02:19 GMT
Network LOG: < Pragma: no-cache
Network LOG: < ETag: "192844-1343840397"
Network LOG: < Accept-Ranges: bytes
Network LOG: < Content-Length: 192844
Network LOG: < Connection: close
Network LOG: < Content-Type: video/mp4
Network LOG: < 
Network LOG:   

Now, we can see "Content-Length" correctly included in the response.
Comment 3 Eric Carlson 2013-10-17 08:54:03 PDT
Comment on attachment 214458 [details]
Patch

Thank you!
Comment 4 WebKit Commit Bot 2013-10-17 09:17:42 PDT
Comment on attachment 214458 [details]
Patch

Clearing flags on attachment: 214458

Committed r157577: <http://trac.webkit.org/changeset/157577>
Comment 5 WebKit Commit Bot 2013-10-17 09:17:44 PDT
All reviewed patches have been landed.  Closing bug.