diff options
-rw-r--r-- | bpaste.sh | 11 | ||||
-rwxr-xr-x | index.cgi | 2 |
2 files changed, 8 insertions, 5 deletions
@@ -14,6 +14,9 @@ # projects@yorhel.nl # License: MIT # +# 0.7 - 2021-04-06 +# - Fix handling of lowercase Location: header +# # 0.6 - 2018-01-21 # - Display absolute URL even when the server gives a relative redirect # @@ -43,7 +46,7 @@ SYNTAX=nosyntax FILE=- WRAP=0 CLICK=1 -VERSION=0.6 +VERSION=0.7 showhelp() { @@ -88,6 +91,6 @@ PASS= curl -si -A "bpaste $VERSION" -F "f=<$TMPFILE" -F "s=$SYNTAX" -F "w=$WRAP" -F "c=$CLICK" -F "p=$PASS" $HOST\ - | grep 'Location: '\ - | sed 's/^Location: http/http/'\ - | sed "s#^Location: /#$HOST#" + | grep -i 'Location: '\ + | sed 's/^[Ll]ocation: http/http/'\ + | sed "s#^[Ll]ocation: /#$HOST#" @@ -28,7 +28,7 @@ TUWF::set( TUWF::hook before => sub { - return 0 if tuwf->{_TUWF}{http} && tuwf->resFile('.', tuwf->reqPath); + tuwf->done if tuwf->{_TUWF}{http} && tuwf->resFile('.', tuwf->reqPath); tuwf->dbh->sqlite_busy_timeout(10000); tuwf->dbExec(q( |