New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 8 users

Issue metadata

Status: WontFix
Owner:
Closed: Nov 2011
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Restricted
  • Only users with EditIssue permission may comment.



Sign in to add a comment

Chunked Transfer causes Multiple Requests, the First Few of Which Terminate Prematurely

Reported by man...@gmail.com, Sep 22 2010

Issue description

Chrome Version       : 6.0.472.63
Other browsers tested:
     Safari 4: FAIL
  Firefox 3.x: OK

What steps will reproduce the problem?
1. Setup a server that transmits and audio/ogg file via chunked transfer encoding
2. Access the file through Chrome.
3. Watch requests come in. More than one request for the file will be made. Chrome will terminate the connections to the server prematurely and then start a new connection. Eventually, it will work.


Here is some quick output of a very simple server I have written. The number in parentheses represents the number of bytes it's attempting to send. Note that I have truncated the full output, since this is a 1.5MB file being transmitted.

Note how the first request partially completes, the second request breaks after the first chunk, and the third requests works. I have chosen to send 16 bytes at a time for brevity's sake. I originally saw this problem when I was sending 16,384 byte chunks.


REQUEST: /audios/11/file.ogg

data(17): 'HTTP/1.1 200 OK\r\n'
data(31): 'Content-Type: application/ogg\r\n'
data(28): 'Transfer-Encoding: chunked\r\n'
data(37): 'Date: Wed, 22 Sep 2010 00:28:12 GMT\r\n'
data(2): '\r\n'
data(4): '10\r\n'
data(18): 'OggS\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\xbb/\r\n'
data(4): '10\r\n'
data(18): 'vT\x00\x00\x00\x00\\q\x88\xd5\x01\x1e\x01vor\r\n'
data(4): '10\r\n'
data(18): 'bis\x00\x00\x00\x00\x02D\xac\x00\x00\x00\x00\x00\x00\r\n'
... SEVERAL LINES LATER
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 60584)
Traceback (most recent call last):
...
error: [Errno 32] Broken pipe
----------------------------------------


REQUEST: /audios/11/file.ogg

data(17): 'HTTP/1.1 200 OK\r\n'
data(31): 'Content-Type: application/ogg\r\n'
data(28): 'Transfer-Encoding: chunked\r\n'
data(37): 'Date: Wed, 22 Sep 2010 00:28:13 GMT\r\n'
data(2): '\r\n'
data(4): '10\r\n'
data(18): 'OggS\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\xe7\x1b\r\n'
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 60585)
...
error: [Errno 32] Broken pipe
----------------------------------------


REQUEST: /audios/11/file.ogg

data(17): 'HTTP/1.1 200 OK\r\n'
data(31): 'Content-Type: application/ogg\r\n'
data(28): 'Transfer-Encoding: chunked\r\n'
data(37): 'Date: Wed, 22 Sep 2010 00:28:13 GMT\r\n'
data(2): '\r\n'
data(4): '10\r\n'
data(18): 'OggS\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00*d\r\n'
data(4): '10\r\n'
data(18): 'tT\x00\x00\x00\x00\x95Ta\x8b\x01\x1e\x01vor\r\n'
data(4): '10\r\n'
data(18): 'bis\x00\x00\x00\x00\x02D\xac\x00\x00\x00\x00\x00\x00\r\n'
... CONTINUES TO COMPLETION
 
Labels: -Area-Undefined Area-WebKit Feature-Media OS-All Mstone-X
Status: Assigned
we intentionally use range requests to do random access requests in the file.  for ogg files we unfortunately need to seek to the end of the file to grab some extra data so we can start playback, so we do some trickery with requesting/caching/cancelling requests

hclam can verify but I believe this is working as intended


Comment 2 by hclam@chromium.org, Jan 20 2011

Assigning to acolwell since he's working on this area now.

Possibly related to this (I wasn't sure so I logged another bug) is  Issue 74975 . Please refer to it when fixing/resolving this Issue.

Summary:
-------
When the request for the audio stream results in a HTTP redirect (302/307), it is incorrect to hit the redirected URL a second time. If you *must* hit the URL again, Chrome should hit the original URL and then follow the redirect again.

Additional comment: Firefox 3.x and Firefox 4 both don't make multiple requests for ogg resources.
Labels: -Mstone-X Mstone-15 Action-FeedbackNeeded
acolwell: any feedback/advice for this bug?
Labels: -Mstone-15 Mstone-16

Comment 7 by laforge@google.com, Oct 24 2011

Labels: -Mstone-16 MovedFrom-16 Mstone-17
Status: WontFix
No feedback received. Closing bug

Comment 9 by man...@gmail.com, Nov 16 2011

Is the bug fixed? I'm not sure what feedback/advice is being asked for.
Sorry mankyd - miscommunication during triage (the Action-FeedbackNeeded label was asking for feedback from acolwell, not you).

At any rate, I think this report is a dup of  bug 82027 , with the twist that for ogg we have to fetch metadata from the end of the file.  Do you agree?

Comment 11 by man...@gmail.com, Nov 16 2011

They do sound like dupes. I had 3 requests in my example as opposed to two requests, but I don't recall whether it was consistently three requests or not.

As for whether fetching from the end of the of the file is necessary, I'll let you guys make the final call, but in the end, the browser is able to play the file without first reading the end, so it must not be _entirely_ necessary.

Similarly, since the server responded with a chunked transfer and no indication that it supported range requests, I would think the browser could be intelligent enough to detect that it should simply start streaming the file.
fischman: Like mankyd said, it would great to get Chrome to recognize servers which do not support range requests for ogg streams (and hence cannot seek to the end) - if you can a note about that to 82027, that would be great.
The only way Chrome can detect that the server doesn't support range requests is to try a Range request and see what happens.  The presence of a chunked response does not imply lack of Range support.  I'll make a note in 82027.
Thanks. Lack of the accepts-range response header is an indication that the server doesn't support it (and conversely, presence of the header indicates support). Currently, it looks like Chrome tries to make a range request even if the server doesn't exhibit support.

Comment 15 by man...@gmail.com, Nov 17 2011

This is true: chunked responses don't indicate lack of range support, but the Accept-Ranges header does. Perhaps that can be looked for:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.5
Unless the server sends Accept-Ranges: none the client can't assume it doesn't support ranges.  (the mere absence of Accept-Ranges is not sufficient, because Range-accepting servers aren't required to say Accept-Ranges: bytes)
Ah, thanks. I'll make sure my server's sending that header to help Chrome out. Appreciate your help with this!
Project Member

Comment 18 by bugdroid1@chromium.org, Oct 13 2012

Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member

Comment 19 by bugdroid1@chromium.org, Mar 9 2013

Labels: -Action-FeedbackNeeded Needs-Feedback
Project Member

Comment 20 by bugdroid1@chromium.org, Mar 10 2013

Labels: -Area-WebKit -Feature-Media -Mstone-17 Cr-Content Cr-Internals-Media M-17
Project Member

Comment 21 by bugdroid1@chromium.org, Mar 13 2013

Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue
Project Member

Comment 22 by bugdroid1@chromium.org, Apr 6 2013

Labels: -Cr-Content Cr-Blink

Sign in to add a comment