diff --git a/lib/utils.sh b/lib/utils.sh index 9f3e3bf..60345fe 100644 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -96,10 +96,10 @@ print_index_tab(){ delete_on_exit "$temp_headers_file" if [ -r "$etag_file" ]; then - curl_opts=(--location --header "If-None-Match: $(cat "$etag_file")") + curl_opts=(--header "If-None-Match: $(cat "$etag_file")") fi - index=$(curl --fail --silent --dump-header "$temp_headers_file" ${curl_opts+"${curl_opts[@]}"} "${NODEJS_ORG_MIRROR}index.tab") + index=$(curl --fail --silent --location --dump-header "$temp_headers_file" ${curl_opts+"${curl_opts[@]}"} "${NODEJS_ORG_MIRROR}index.tab") if [ "$index" ]; then awk 'tolower($1) == "etag:" { print $2 }' < "$temp_headers_file" > "$etag_file"