WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
46241
HTML5 video element Useragent string is QuickTime
https://bugs.webkit.org/show_bug.cgi?id=46241
Summary
HTML5 video element Useragent string is QuickTime
Shiv Kumar
Reported
2010-09-21 20:11:27 PDT
When Safari makes a request for a video stream, the useragent string the server side receives is Quicktime. This causes problems because we don't typically allow Quicktime direct access to videos. The useragent string should be the same as the Safari useragent string.
Attachments
Proposed patch
(12.18 KB, patch)
2012-03-06 12:13 PST
,
Eric Carlson
dbates
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Eric Carlson
Comment 1
2010-09-22 07:24:13 PDT
<
rdar://problem/8463568
>
Eric Carlson
Comment 2
2012-03-06 12:13:11 PST
Created
attachment 130426
[details]
Proposed patch
Daniel Bates
Comment 3
2012-03-07 11:50:40 PST
Comment on
attachment 130426
[details]
Proposed patch View in context:
https://bugs.webkit.org/attachment.cgi?id=130426&action=review
This patch looks straightforward to me. Notice that the code in LayoutTests/http/tests/media/resources/serve-video.php doesn't adhere to the WebKit style guide. Although we don't seem to strictly enforce these rules for test files and test support files, you may want to consider fixing the style so as to be consistent with the style guide either in this patch or in a follow up patch.
> Source/WebCore/ChangeLog:3 > + Html 5 video element Useragent string is Quicktime
Nit: "Html 5" => "HTML5"
> LayoutTests/http/tests/media/resources/serve-video.php:12 > + $range = explode("-", substr($contentRange, 6));
I know that you extracted this code from file LayoutTests/http/tests/media/resources/video-referer-check-referer.php. The number 6 for the length parameter of substr() seems mysterious, especially for people who may not be familiar with the syntax for Byte Ranges (maybe we don't have to worry about this audience?) . For your consideration, I suggest either substituting the expression strlen("bytes=") or adding an inline comment that explains that 6 is the length of the bytes-unit string "bytes=".
Daniel Bates
Comment 4
2012-03-07 11:53:05 PST
(In reply to
comment #3
) >
>[...] length of the bytes-unit string "bytes=".
This should read: [...] length of the bytes-unit string plus "=".
Eric Carlson
Comment 5
2012-03-07 13:27:47 PST
(In reply to
comment #3
)
> (From update of
attachment 130426
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=130426&action=review
> > Notice that the code in LayoutTests/http/tests/media/resources/serve-video.php doesn't adhere to the WebKit style guide. Although we don't seem to strictly enforce these rules for test files and test support files, you may want to consider fixing the style so as to be consistent with the style guide either in this patch or in a follow up patch. >
Done.
> > Source/WebCore/ChangeLog:3 > > + Html 5 video element Useragent string is Quicktime > > Nit: "Html 5" => "HTML5" > > > LayoutTests/http/tests/media/resources/serve-video.php:12 > > + $range = explode("-", substr($contentRange, 6)); > > I know that you extracted this code from file LayoutTests/http/tests/media/resources/video-referer-check-referer.php. >
Well, I "extracted" code that I wrote in the first place so the fault is mine ;-)
> The number 6 for the length parameter of substr() seems mysterious, especially for people who may not be familiar with the syntax for Byte Ranges (maybe we don't have to worry about this audience?) . For your consideration, I suggest either substituting the expression strlen("bytes=") or adding an inline comment that explains that 6 is the length of the bytes-unit string "bytes=".
Done. Thanks for the review!
Eric Carlson
Comment 6
2012-03-07 13:28:06 PST
http://trac.webkit.org/changeset/110095
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug