diff options
author | Yorhel <git@yorhel.nl> | 2021-04-06 14:58:32 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2021-04-06 14:58:32 +0200 |
commit | ac6243978d587991373ec3e60d3a908bff67d7d8 (patch) | |
tree | bd397c09ed9746b0e81e3305d286916f459349d7 | |
parent | 9e53fe7e8c84e4f49480a5d774e5592647ca35e4 (diff) |
-rw-r--r-- | bpaste.sh | 11 |
1 files changed, 7 insertions, 4 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#" |