Created
December 9, 2013 08:25
-
-
Save cs8425/7869055 to your computer and use it in GitHub Desktop.
M-JPG http header
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://stackoverflow.com/questions/2060953/httpwebresponse-with-mjpeg-and-multipart-x-mixed-replace-boundary-myboundary | |
var BOUNDARY = '----' + Math.random().toString(16).substring(2); | |
header("Cache-Control: no-cache"); | |
header("Cache-Control: private"); | |
header("Pragma: no-cache"); | |
header("Content-type: multipart/x-mixed-replace; boundary=$boundary"); | |
============================ | |
HTTP/1.1 200 OK | |
Content-Type: multipart/x-mixed-replace; boundary=--myboundary | |
--myboundary | |
Content-Type: image/jpeg | |
Content-length: 12345 | |
[image 1 encoded jpeg data] | |
--myboundary | |
Content-Type: image/jpeg | |
Content-length: 45678 | |
[image 2 encoded jpeg data] | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment