Can I use a jpeg input missing content-type in the http reply?
Posted: Sun Nov 08, 2015 6:30 pm
One of my cameras has a special backdoor URL that returns a jpeg, but is missing the Content-Type: image/jpeg header in the reply.
I can view the jpeg in a browser which figures out it's a jpeg, but zoneminder complains about the empty content-type (and I can't blame it, it is missing). Is there any workaround outside of fixing the camera firmware which I don't have access to?
----------------------------------------------------------------------------
GET /mjpeg/snap.cgi?chn=1 HTTP/1.0
User-Agent: ZoneMinder/1.28.1
Host: 192.168.205.181
Connection: Keep-Alive
Authorization: Digest username="pict", realm="IPCamera Login",
nonce="8dbdb168c6c557a2437bec3daa465eac", uri="/mjpeg/snap.cgi?chn=1", qop=auth, nc=00000001,
cnonce=0a4f113b, response="d0aaaa79d0e9e1a2e4984fcf1f982a22"
HTTP/1.0 200 OK
Cache-Control: public,max-age=0
Content-Length: 13823
Connection: close
Date: Sat, 07 Nov 2015 04:31:22 GMT
Server: lighttpd/1.4.35
......JFIF.............C..............
(B+(%%(Q:=0B`Ued_U][jx..jq.s[].........g.............C....(#(N++N.n]n..................................
......................h...."......................................
.....................}........!1A..Qa."q.2....#B...R..$3br..
.....%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwx
----------------------------------------------------------------------------
I suppose I could wget the jpeg from the command line, dump to a flie, and have zoneminder read that instead, but that seems kind of ugly and there will be no synchronization :-/
The camera does offer RTSP, but I'd rather avoid using that to limit load on my overloaded server.
I can view the jpeg in a browser which figures out it's a jpeg, but zoneminder complains about the empty content-type (and I can't blame it, it is missing). Is there any workaround outside of fixing the camera firmware which I don't have access to?
----------------------------------------------------------------------------
GET /mjpeg/snap.cgi?chn=1 HTTP/1.0
User-Agent: ZoneMinder/1.28.1
Host: 192.168.205.181
Connection: Keep-Alive
Authorization: Digest username="pict", realm="IPCamera Login",
nonce="8dbdb168c6c557a2437bec3daa465eac", uri="/mjpeg/snap.cgi?chn=1", qop=auth, nc=00000001,
cnonce=0a4f113b, response="d0aaaa79d0e9e1a2e4984fcf1f982a22"
HTTP/1.0 200 OK
Cache-Control: public,max-age=0
Content-Length: 13823
Connection: close
Date: Sat, 07 Nov 2015 04:31:22 GMT
Server: lighttpd/1.4.35
......JFIF.............C..............
(B+(%%(Q:=0B`Ued_U][jx..jq.s[].........g.............C....(#(N++N.n]n..................................
......................h...."......................................
.....................}........!1A..Qa."q.2....#B...R..$3br..
.....%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwx
----------------------------------------------------------------------------
I suppose I could wget the jpeg from the command line, dump to a flie, and have zoneminder read that instead, but that seems kind of ugly and there will be no synchronization :-/
The camera does offer RTSP, but I'd rather avoid using that to limit load on my overloaded server.