Project

General

Profile

Actions

Feature #4423

closed

Server needs to honor requests that contain a "Range" header with a 206 "Partial Content" response

Added by Long Nguyễn Đức over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Low
Assignee:
Benoit Daccache
Target version:
Start date:
08/26/2015
Due date:
% Done:

0%

Estimated time:

Description

I find out that I cannot seek time on WMediaPlayer or WVideo widget on Chrome. It turns out that Chrome sends "Partial Content" requests that server cannot understand.

Detail


Files

4423.cpp (936 Bytes) 4423.cpp Benoit Daccache, 09/08/2015 01:56 PM
Actions #1

Updated by Benoit Daccache over 8 years ago

The built in HTTPD does all of that. What server is hosting the file ? It might be one that doesn't support Partial requests.

Actions #2

Updated by Benoit Daccache over 8 years ago

  • Status changed from New to Feedback
Actions #3

Updated by Long Nguyễn Đức over 8 years ago

Benoit Daccache wrote:

The built in HTTPD does all of that. What server is hosting the file ? It might be one that doesn't support Partial requests.

I'm hosting an MP4 file through WFileResource, without setting the MIME type

Actions #4

Updated by Long Nguyễn Đức over 8 years ago

I set the MIME type to "video/mp4" to WFileResource or give direct path to the video to the WMediaPlayer or WVideo. However, none works for me.

I test time seeking in FireFox and same problem persists.

Pressing on progress bar causes player to stop and browser not to send any requests.

Actions #5

Updated by Long Nguyễn Đức over 8 years ago

I switch from my laptop to Cloud9 IDE to compile the code and time seeking there is fine, both in FireFox and Chrome. It's the same code and I don't know why.

Source code

I already update C Wt to the latest version. My laptop OS is Ubuntu 15.04 64-bit.

Actions #6

Updated by Long Nguyễn Đức over 8 years ago

For the server built on my laptop, the browser doesn't make any request when seeking time. The player stops and button switchs to "Play" icon, the progress bar is 100%.

Actions #7

Updated by Long Nguyễn Đức over 8 years ago

After examining the log, I detect the error: [error] "Http::ResponseContinuation: WriteError" and the session is destroyed as soon as I press Play button.

Log:

./server.wt --http-addr 0.0.0.0 --http-port 8080 --docroot ".;/resources"
[2015-Aug-27 19:28:38.029473] 29925 - [info] "config: reading Wt config file: /etc/wt/wt_config.xml (location = './server.wt')"
[2015-Aug-27 19:28:38.031170] 29925 - [info] "WServer/wthttp: initializing built-in wthttpd"
[2015-Aug-27 19:28:38.031799] 29925 - [info] "wthttp: started server: http://0.0.0.0:8080"
[2015-Aug-27 19:28:41.179577] 29925 - [info] "Wt: session created (#sessions = 1)"
[2015-Aug-27 19:28:41.179901] 29925 [/ FBBUpxyGu04DxL6y] [info] "WEnvironment: UserAgent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36"
192.168.1.67 - - [2015-Aug-27 19:28:41.182479] "GET / HTTP/1.1" 200 2632
[2015-Aug-27 19:28:41.182638] 29925 - [info] "WebRequest: took 3.259ms"
192.168.1.67 - - [2015-Aug-27 19:28:41.213060] "GET /?wtd=FBBUpxyGu04DxL6y&request=style HTTP/1.1" 200 119
[2015-Aug-27 19:28:41.213144] 29925 - [info] "WebRequest: took 18.054ms"
192.168.1.67 - - [2015-Aug-27 19:28:41.276767] "GET /?wtd=FBBUpxyGu04DxL6y&sid=-14691253&webGL=true&tz=420&htmlHistory=true&deployPath=%2F&request=script&rand=4031827139 HTTP/1.1" 200 91513
[2015-Aug-27 19:28:41.277236] 29925 - [info] "WebRequest: took 66.759ms"
[2015-Aug-27 19:28:41.387985] 29925 - [info] "Wt: session created (#sessions = 2)"
[2015-Aug-27 19:28:41.388244] 29925 [/ lJQjav9DyMRsMEGm] [info] "WEnvironment: UserAgent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36"
192.168.1.67 - - [2015-Aug-27 19:28:41.390405] "GET /favicon.ico HTTP/1.1" 200 2643
[2015-Aug-27 19:28:41.390507] 29925 - [info] "WebRequest: took 2.708ms"
192.168.1.67 - - [2015-Aug-27 19:28:41.461205] "POST /?wtd=FBBUpxyGu04DxL6y HTTP/1.1" 200 49
[2015-Aug-27 19:28:41.461321] 29925 - [info] "WebRequest: took 0.898ms"
[2015-Aug-27 19:28:41.974408] 29925 - [error] "Http::ResponseContinuation: WriteError"
[2015-Aug-27 19:28:41.974732] 29925 - [info] "WebRequest: took 459.64ms"
[2015-Aug-27 19:30:27.850189] 29925 [/ lJQjav9DyMRsMEGm] [info] "WebController: timeout: expiring"
[2015-Aug-27 19:30:27.850290] 29925 [/ lJQjav9DyMRsMEGm] [info] "Wt: session destroyed (#sessions = 1)"
[2015-Aug-27 19:30:34.529060] 29925 - [error] "Http::ResponseContinuation: WriteError"
[2015-Aug-27 19:30:34.529363] 29925 - [info] "WebRequest: took 6679.39ms"
[2015-Aug-27 19:30:54.669092] 29925 - [info] "Wt: session created (#sessions = 2)"
[2015-Aug-27 19:30:54.669385] 29925 [/ usUf7bs64gdnXE5G] [info] "WEnvironment: UserAgent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36"
192.168.1.67 - - [2015-Aug-27 19:30:54.671515] "GET / HTTP/1.1" 200 2631
[2015-Aug-27 19:30:54.671643] 29925 - [info] "WebRequest: took 2.693ms"
[2015-Aug-27 19:30:54.687037] 29925 - [error] "Http::ResponseContinuation: WriteError"
[2015-Aug-27 19:30:54.687281] 29925 - [info] "WebRequest: took 20155ms"
192.168.1.67 - - [2015-Aug-27 19:30:54.760593] "GET /?wtd=usUf7bs64gdnXE5G&request=style HTTP/1.1" 200 119
[2015-Aug-27 19:30:54.760675] 29925 - [info] "WebRequest: took 47.006ms"
192.168.1.67 - - [2015-Aug-27 19:30:54.770597] "GET /resources/themes/default/wt.css HTTP/1.1" 304 0
192.168.1.67 - - [2015-Aug-27 19:30:54.771163] "GET /resources/jPlayer/skin/jplayer.blue.monday.css HTTP/1.1" 200 10695
192.168.1.67 - - [2015-Aug-27 19:30:54.771501] "GET /resources/webkit-transitions.css HTTP/1.1" 304 0
192.168.1.67 - - [2015-Aug-27 19:30:54.818089] "GET /?wtd=usUf7bs64gdnXE5G&sid=-1648456281&webGL=true&tz=420&htmlHistory=true&deployPath=%2F&request=script&rand=1899545844 HTTP/1.1" 200 91519
[2015-Aug-27 19:30:54.818184] 29925 - [info] "WebRequest: took 58.928ms"
192.168.1.67 - - [2015-Aug-27 19:30:54.897204] "GET /resources/jPlayer/jquery.jplayer.min.js HTTP/1.1" 304 0
[2015-Aug-27 19:30:54.970572] 29925 - [info] "Wt: session created (#sessions = 3)"
[2015-Aug-27 19:30:54.970703] 29925 [/ GmiT4AsnXvoJEMv1] [info] "WEnvironment: UserAgent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36"
192.168.1.67 - - [2015-Aug-27 19:30:54.971926] "GET /favicon.ico HTTP/1.1" 200 2643
[2015-Aug-27 19:30:54.971974] 29925 - [info] "WebRequest: took 1.489ms"
192.168.1.67 - - [2015-Aug-27 19:30:55.024583] "POST /?wtd=usUf7bs64gdnXE5G HTTP/1.1" 200 51
[2015-Aug-27 19:30:55.024656] 29925 - [info] "WebRequest: took 0.652ms"
[2015-Aug-27 19:30:55.481966] 29925 - [error] "Http::ResponseContinuation: WriteError"
[2015-Aug-27 19:30:55.482088] 29925 - [info] "WebRequest: took 409.97ms"
[2015-Aug-27 19:31:09.838637] 29925 [/ GmiT4AsnXvoJEMv1] [info] "WebController: timeout: expiring"
[2015-Aug-27 19:31:09.838769] 29925 [/ GmiT4AsnXvoJEMv1] [info] "Wt: session destroyed (#sessions = 2)"
^C[2015-Aug-27 19:31:33.243494] 29925 - [info] "WServer/wthttp: shutdown (signal = 2)"
[2015-Aug-27 19:31:33.243680] 29925 - [info] "WebController: shutdown: stopping sessions."
[2015-Aug-27 19:31:33.244143] 29925 [/ FBBUpxyGu04DxL6y] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Aug-27 19:31:33.244478] 29925 [/ usUf7bs64gdnXE5G] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Aug-27 19:31:33.244619] 29925 - [info] "WServer/wthttp: Shutdown: stopping web server."
[2015-Aug-27 19:31:33.245024] 29925 - [error] "Http::ResponseContinuation: WriteError"
[2015-Aug-27 19:31:33.245117] 29925 - [info] "WebRequest: took 23406.7ms"
Actions #8

Updated by Benoit Daccache over 8 years ago

We are also using ubuntu here and I cannot reproduce the problem. Maybe it's a miss build ?

Can you give more information about the boost version, wt version ?

Can you try on another browser, and accessing from another computer ?

Maybe it would be good to have a test case ?

Here is the one I used to try to reproduce the error. Can try it on your system?

Benoit

Actions #9

Updated by Long Nguyễn Đức over 8 years ago

Looks like I was using older version on Ubuntu that I installed via apt-get. Building the latest version of Wt seems to work now

Actions #10

Updated by Koen Deforche over 8 years ago

  • Status changed from Feedback to Resolved
Actions #11

Updated by Koen Deforche over 8 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF