Commit 0d93015b authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: add --no-content-disposition

parent 40068977
...@@ -317,7 +317,8 @@ AXELQ='' #-q ...@@ -317,7 +317,8 @@ AXELQ='' #-q
# TODO: aria2c # TODO: aria2c
# TODO: # TODO:
WGETNAMEOPTIONS='--content-disposition' WGETNAMEOPTIONS='--content-disposition'
CURLNAMEOPTIONS='--remote-name --remote-time --remote-header-name' CURLFILENAMEOPTIONS='--remote-name --remote-time --remote-header-name'
CURLNAMEOPTIONS='--remote-time --remote-header-name'
AXELNAMEOPTIONS='' AXELNAMEOPTIONS=''
WGETRUSTSERVERNAMES='' WGETRUSTSERVERNAMES=''
CURLTRUSTSERVERNAMES='' CURLTRUSTSERVERNAMES=''
...@@ -371,6 +372,7 @@ Options: ...@@ -371,6 +372,7 @@ Options:
-q|--quiet - quiet mode -q|--quiet - quiet mode
--verbose - verbose mode --verbose - verbose mode
-k|--no-check-certificate - skip SSL certificate chain support -k|--no-check-certificate - skip SSL certificate chain support
--no-content-disposition - skip Content-Disposition header
-H|--header - use <header> (X-Cache:1 for example) -H|--header - use <header> (X-Cache:1 for example)
-U|-A|--user-agent - send browser like UserAgent -U|-A|--user-agent - send browser like UserAgent
--compressed - request a compressed response and automatically decompress the content --compressed - request a compressed response and automatically decompress the content
...@@ -450,6 +452,12 @@ while [ -n "$1" ] ; do ...@@ -450,6 +452,12 @@ while [ -n "$1" ] ; do
CURLNOSSLCHECK='-k' CURLNOSSLCHECK='-k'
AXELNOSSLCHECK='--insecure' AXELNOSSLCHECK='--insecure'
;; ;;
--no-content-disposition)
WGETNAMEOPTIONS=''
CURLFILENAMEOPTIONS=''
CURLNAMEOPTIONS=''
AXELNAMEOPTIONS=''
;;
-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
...@@ -1143,11 +1151,11 @@ url_sget() ...@@ -1143,11 +1151,11 @@ url_sget()
local FILENAME=$(url_get_filename "$URL") local FILENAME=$(url_get_filename "$URL")
if [ -n "$FILENAME" ] ; then if [ -n "$FILENAME" ] ; then
download_with_mirroring __curl "$URL" --remote-time --remote-header-name --output "$FILENAME" download_with_mirroring __curl "$URL" $CURLNAMEOPTIONS --output "$FILENAME"
return return
fi fi
download_with_mirroring __curl "$URL" $CURLNAMEOPTIONS download_with_mirroring __curl "$URL" $CURLFILENAMEOPTIONS
} }
url_get_response() url_get_response()
......
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