mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-25 23:07:17 +00:00
Now compliant with HTTP/1.1 RFC7230, so that it can be externally retrieved with nodejs and axios (#538)
Makes this page compliant with HTTP/1.1 RFC2616 and RFC7230 "HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all protocol elements except the entity-body" This only had LF, and when used with nodejs and axios that page would fail to be retrieved and throw a HPE_INVALID_HEADER_TOKEN error. (other pages likely need that fix, but retrieving the image was most important and most useful, I personally use it with Scrypted, which then uses this as the camera snapshot in Apple Home app) Added -n to echo to make it clearer for myself, which removes the otherwise automatically added LF
This commit is contained in:
parent
f004af3ef5
commit
f729f684a9
@ -19,11 +19,11 @@ fi
|
||||
|
||||
if [ -z "$GET_channel" ];
|
||||
then
|
||||
echo "X-Channel-Override: 0"
|
||||
echo -ne "X-Channel-Override: 0\r\n"
|
||||
GET_channel=0
|
||||
fi
|
||||
|
||||
echo "X-Channel: $GET_channel"
|
||||
|
||||
cmd jpeg "$GET_channel"
|
||||
echo -ne "X-Channel: $GET_channel\r\n"
|
||||
echo -ne "Content-Type: image/jpeg\r\n\r\n"
|
||||
|
||||
cmd jpeg "$GET_channel" -n
|
||||
|
Loading…
Reference in New Issue
Block a user