mirror of
https://repo.or.cz/socat.git
synced 2025-07-06 13:06:33 +00:00
Changes for new Linux distributions: grep -E, -F
This commit is contained in:
parent
2ab4b232fc
commit
54cbb0bb09
4 changed files with 10 additions and 8 deletions
|
@ -39,13 +39,13 @@ done
|
|||
|
||||
# read and parse HTTP request
|
||||
read l
|
||||
if ! echo "$l" |egrep '^CONNECT +[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+ +HTTP/[1-3].[0-9]$' >/dev/null
|
||||
if ! echo "$l" |grep -E '^CONNECT +[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+ +HTTP/[1-3].[0-9]$' >/dev/null
|
||||
then
|
||||
echo "HTTP/1.0${SPACES}500 Bad Request"
|
||||
echo
|
||||
exit
|
||||
fi
|
||||
if ! echo "$l" |egrep '^CONNECT +[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+ +HTTP/'"$REQVER"'$' >/dev/null
|
||||
if ! echo "$l" |grep -E '^CONNECT +[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+ +HTTP/'"$REQVER"'$' >/dev/null
|
||||
then
|
||||
echo "HTTP/1.0${SPACES}426 Upgrade Required"
|
||||
echo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue