1
0
Ficheiros
wyze-firmware/SD_ROOT/wz_mini/www/cgi-bin/jpeg.cgi
T
virmaior 91e76ec944 fixes to www (#231)
fixed display of camera version, fixed issue jpeg.cgi, added diagnostics page, minor css improvements, made shared.cgi for common code between diagnostics and config
2022-08-09 18:26:14 -07:00

29 linhas
523 B
Bash

#!/bin/sh
#test for jpeg
if [[ $REQUEST_METHOD = 'GET' ]]; then
#since ash does not handle arrays we create variables using eval
IFS='&'
for PAIR in $QUERY_STRING
do
K=$(echo $PAIR | cut -f1 -d=)
VA=$(echo $PAIR | cut -f2 -d=)
#VB=${VA//%3A/:}
#echo "<div>$K=$VA</div>"
eval GET_$K=$VA
done
fi
if [ -z "$GET_channel" ];
then
echo "X-Channel-Override: 0"
GET_channel=0
fi
echo "X-Channel: $GET_channel"
cmd jpeg "$GET_channel"