Skip to content

Instantly share code, notes, and snippets.

@lindsayevans
Created January 17, 2011 20:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lindsayevans/783416 to your computer and use it in GitHub Desktop.
Save lindsayevans/783416 to your computer and use it in GitHub Desktop.
HTML5 video request headers
Firefox 4.0b9:
Array
(
[Host] => localhost
[User-Agent] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b9) Gecko/20100101 Firefox/4.0b9
[Accept] => video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5
[Accept-Language] => en-us,en;q=0.5
[Accept-Charset] => ISO-8859-1,utf-8;q=0.7,*;q=0.7
[Keep-Alive] => 115
[Connection] => keep-alive
[Range] => bytes=0-
[Referer] => http://localhost/~lindsayevans/Projects/html5-video-test/negotiate.html
)
Firefox 3.6:
Array
(
[Host] => localhost
[User-Agent] => Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
[Accept] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[Accept-Language] => en-us,en;q=0.5
[Accept-Encoding] => gzip,deflate
[Accept-Charset] => ISO-8859-1,utf-8;q=0.7,*;q=0.7
[Keep-Alive] => 115
[Connection] => keep-alive
[Range] => bytes=0-
[Pragma] => no-cache
[Cache-Control] => no-cache
)
Chrome 9:
Array
(
[Host] => localhost
[Connection] => keep-alive
[Referer] => http://localhost/~lindsayevans/Projects/html5-video-test/negotiate.html
[User-Agent] => Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.45 Safari/534.13
[Accept-Encoding] => gzip,deflate,sdch
[Accept-Language] => en-US,en;q=0.8
[Accept-Charset] => ISO-8859-1,utf-8;q=0.7,*;q=0.3
[Range] => bytes=0-19
)
Safari 5:
Array
(
[Host] => localhost
[Range] => bytes=0-1
[Connection] => close
[User-Agent] => Apple Mac OS X v10.6.6 CoreMedia v1.0.0.10J567
[Accept] => */*
[Accept-Encoding] => identity
)
Array
(
[Host] => localhost
[Accept] => */*
[User-Agent] => QuickTime/7.6.6 (qtver=7.6.6;cpu=IA32;os=Mac 10.6.6)
[Connection] => close
)
Opera 11:
Array
(
[User-Agent] => Opera/9.80 (Macintosh; Intel Mac OS X 10.6.6; U; en) Presto/2.7.62 Version/11.00
[Host] => localhost
[Accept] => text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
[Accept-Language] => en,en-US;q=0.9,ja;q=0.8,fr;q=0.7,de;q=0.6,es;q=0.5,it;q=0.4,pt;q=0.3,pt-PT;q=0.2,nl;q=0.1,sv;q=0.1,nb;q=0.1,da;q=0.1,fi;q=0.1,ru;q=0.1,pl;q=0.1,zh-CN;q=0.1,zh-TW;q=0.1,ko;q=0.1
[Accept-Charset] => iso-8859-1, utf-8, utf-16, *;q=0.1
[Accept-Encoding] => deflate, gzip, x-gzip, identity, *;q=0
[Referer] => http://localhost/~lindsayevans/Projects/html5-video-test/negotiate.html
[Connection] => Keep-Alive, TE
[TE] => deflate, gzip, chunked, identity, trailers
[Range] => bytes=0-
)
<?php
$fh = fopen('headers.log', 'a');
$headers = print_r(getallheaders(), true);
fwrite($fh, $headers);
fclose($fh);
exit();
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<title>HTML5 &lt;video&gt; content negotiation test</title>
</head>
<body>
<h1>HTML5 &lt;video&gt; content negotiation test</h1>
<video src="log.php">
</video>
</body>
</html>
@MobeenRashid
Copy link

how can we add a custom Authorization header with access token?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment