Commit ec99eb15 authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: fix header quoting issue

parent b4d5e24e
...@@ -442,14 +442,14 @@ while [ -n "$1" ] ; do ...@@ -442,14 +442,14 @@ while [ -n "$1" ] ; do
AXELNOSSLCHECK='--insecure' AXELNOSSLCHECK='--insecure'
;; ;;
-H|--header) -H|--header)
#TODO: error if header value contains spaces # TODO: error if header value contains spaces
if [ -z "$argvalue" ];then if [ -z "$argvalue" ];then
shift shift
argvalue="$1" argvalue="${1/ /}"
fi fi
WGETHEADER="--header=\"$argvalue\"" WGETHEADER="--header=$argvalue"
CURLHEADER="--header \"$argvalue\"" CURLHEADER="--header $argvalue"
AXELHEADER="--header=\"$argvalue\"" AXELHEADER="--header=$argvalue"
;; ;;
-U|-A|--user-agent) -U|-A|--user-agent)
user_agent="Mozilla/5.0 (X11; Linux $arch) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36" user_agent="Mozilla/5.0 (X11; Linux $arch) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment