Closed Bug 546700 Opened 14 years ago Closed 13 years ago

Ogg video fails to load when server lies about accepting range requests

Categories

(Core :: Audio/Video, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: bmschwar, Assigned: kinetik)

References

()

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4) Gecko/20091205 Gentoo Firefox/3.5.4
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4) Gecko/20091205 Gentoo Firefox/3.5.4

I tried to play this video URL in Firefox and it utterly failed. It just spins forever, apparently trying to buffer but not succeeding.  Downloading the same video in wget, even using -U to enforce the same User-Agent string as Firefox, works perfectly.  This behavior has been consistent for every Ogg video I have encountered.

My best guess for this is that I am behind an http proxy here at work (almost sure), and that this proxy is somehow mangling range requests (total guess).  That, I think, could explain why wget would work, but Firefox would fail.

Anyway, whatever the cause is, Firefox should handle this more gracefully.  If wget works, Firefox should work too.

Reproducible: Always
>Anyway, whatever the cause is, Firefox should handle this more gracefully.  If
>wget works, Firefox should work too.

I disagree if Gecko really uses range requests and your proxy fails.
But whatever, a http log my help :
https://developer.mozilla.org/en/HTTP_Logging
Attached file gzip'd HTTP Log
This is the HTTP log when firefox fails to play a video.  I stopped it after it grew to 3 MB of log.
Hello,

For me, behind a proxy which is an isa server It is working like a charm

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)
Kind Regards
Reporter, are you still seeing this issue with Firefox 3.6.13 or later in safe mode? If not, please close. These links can help you in your testing.
http://support.mozilla.com/kb/Safe+Mode
http://support.mozilla.com/kb/Managing+profiles

You can also try to reproduce in Firefox 4 Beta 8 or later, there are many improvements in the new version, http://www.mozilla.com/en-US/firefox/all-beta.html
Whiteboard: [CLOSEME 2011-1-30]
No reply, INCOMPLETE. Please retest with Firefox 3.6.13 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INCOMPLETE
Re-tested in FF 3.6.13, fresh profile, with and without safe mode.  No real improvement in behavior is detectable.  Most videos don't even load.
Status: RESOLVED → UNCONFIRMED
Resolution: INCOMPLETE → ---
Re-tested in FF 4.0b10 on Windows 7.  Same bad behavior.  For example browsing to 

http://media.xiph.org/basilgohar/timelapse/work-clouds-vga-30fps-q7.ogv

does not even pop up a gray box of the correct size, and the video never plays.  However, downloading this file with wget on the same network works perfectly.

Incidentally, the network in question is filtered by a Cisco IronPort appliance.  I don't know whether there are any other filters in place.
Sorry, I somehow missed the http log
Component: General → Networking: HTTP
Product: Firefox → Core
QA Contact: general → networking.http
Whiteboard: [CLOSEME 2011-1-30]
Version: unspecified → 1.9.2 Branch
So the log is showing us making a GET request like so:

GET /~blizzard/weblog-videos/2010-02-14-difference-engine/VID00212.ogv HTTP/1.1

and getting back a response which has:

  Content-Length: 13989970

Then we do another request like so:

GET /~blizzard/weblog-videos/2010-02-14-difference-engine/VID00212.ogv HTTP/1.1
Range: bytes=13983744-

(trying to read the ogg metadata) and getting back a 200 (not 206) response like so:

  Content-Length: 13989970

Then we repeat this last bit 100-some times.  But it never gets better.  ;)

This is definitely NOT an HTTP issue, and I was pretty sure we handled lack of Range support in the media code, so what gives?
Status: UNCONFIRMED → NEW
Component: Networking: HTTP → Video/Audio
Ever confirmed: true
QA Contact: networking.http → video.audio
I think we blindly believe the server if it sends an Accept-Ranges:bytes header which the logs seem to show that this server does. We should possibly cancel that belief if we find out the server lied.
Ah, yeah, that seems like a good idea.  The proxy is all kinds of broken, but still....
A brief google finds one other instance of someone being bitten by Ironport's range-request lies.  Similar problem, same diagnosis.

http://lists.opensuse.org/opensuse/2010-03/msg00461.html
According to

http://aicheh.files.wordpress.com/2010/05/wsa_6-3-3_ga_release_notes.pdf (page 32)

this bug was fixed in Ironport 6.0.0, which is a few years old but does not appear to be prehistoric.
Summary: Firefox won't play ogg videos from behind a proxy → Ogg video fails to load when server lies about accepting range requests
Version: 1.9.2 Branch → Trunk
Attached patch patch v0Splinter Review
If the server sends Accept-Ranges and we've received an HTTP 200 back from an attempted range request, mark the stream as not seekable.

Requesting approval since this is a simple, fairly safe patch that avoids an awful case for a small set of users.
Assignee: nobody → kinetik
Status: NEW → ASSIGNED
Attachment #513917 - Flags: review?(roc)
Attachment #513917 - Flags: approval2.0?
Attachment #513917 - Flags: review?(roc)
Attachment #513917 - Flags: review+
Attachment #513917 - Flags: approval2.0?
Attachment #513917 - Flags: approval2.0+
Whiteboard: [needs landing]
http://hg.mozilla.org/mozilla-central/rev/d30bc9781cfd
Status: ASSIGNED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing]
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b12) Gecko/20100101 Firefox/4.0b12

Something seems broken with the two test cases.  I'm not sure if this is related to this bug or not:

http://www.0xdeadbeef.com/~blizzard/weblog-videos/2010-02-14-difference-engine/VID00212.ogv
http://media.xiph.org/basilgohar/timelapse/work-clouds-vga-30fps-q7.ogv

Both buffer and play as expected, but the video pauses when the mouse cursor is not over the video and resumes when the mouse cursor is on top of the video.
This is covered by a mochitest, so it should be fine to mark as verified.

I can reproduce the other bug you're seeing--it seems like a variation of bug 633261, but that is OpenGL specific (and requires closing and reopening a tab).  I can reproduce it on Windows with D3D10 without reopening a tab, so it's not exactly the same bug.  Would you mind filing a new bug in Core::Graphics and requesting blocking?
Verified fixed as per comment 17.  Will file a followup bug.
Status: RESOLVED → VERIFIED
See bug 636817.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: