Some small fixes for when we are accessing ourselves as [[::1]:12345 in tests.

This commit is contained in:
Maks Orlovich
2016-11-07 14:47:42 -05:00
parent 3f66cd36f7
commit 9a76ce6172
2 changed files with 9 additions and 5 deletions
+8 -4
View File
@@ -182,9 +182,13 @@ if ! var_defined PROXY_DOMAIN; then
fi
# Setup wget proxy information
export http_proxy=${3:-}
export https_proxy=${3:-}
export ftp_proxy=${3:-}
if [ -n "${3:-}" ]; then
export http_proxy=http://$3
else
export http_proxy=""
fi
export https_proxy=${http_proxy}
export ftp_proxy=${http_proxy}
export no_proxy=""
# Version timestamped with nanoseconds, making it extremely unlikely to hit.
@@ -755,7 +759,7 @@ function generate_url {
RESULT="http://$DOMAIN$PATH"
else
RESULT="--header X-Google-Pagespeed-Config-Domain:$DOMAIN"
RESULT+=" $STATIC_DOMAIN$PATH"
RESULT+=" http://$STATIC_DOMAIN$PATH"
fi
echo $RESULT
}
@@ -1,6 +1,6 @@
start_test ?PageSpeed=noscript inserts canonical href link
OUT=$($WGET_DUMP $EXAMPLE_ROOT/defer_javascript.html?PageSpeed=noscript)
check_from "$OUT" egrep -q \
check_from "$OUT" fgrep -q \
"link rel=\"canonical\" href=\"$EXAMPLE_ROOT/defer_javascript.html\""
# Checks that defer_javascript injects 'pagespeed.deferJs' from defer_js.js,