vary-header: Emit a single vary header in the IPRO flow
The report from some time ago mentioned three Vary: headers, but I can now only reproduce two using trunk-tracking plus the original repro-configuration. This fix unflags r->gzip_vary as set by the gzip module when PSOL hands us Vary: Accept-Encoding, to make sure that nginx's core header filter doesn't append another one. Fixes https://github.com/pagespeed/ngx_pagespeed/issues/1064
This commit is contained in:
committed by
Jeff Kaufman
parent
181875e80b
commit
2b4c097d48
@@ -1249,6 +1249,22 @@ OUT=$(http_proxy=$SECONDARY_HOSTNAME $WGET_DUMP -O /dev/null -S $URL 2>&1) || tr
|
||||
# We ignored the exit code, check if we got a 404 response.
|
||||
check_from "$OUT" fgrep -qi '404'
|
||||
|
||||
start_test Single Vary: Accept-Encoding header in IPRO flow
|
||||
URL=http://psol-vary.example.com/mod_pagespeed_example/styles/index_style.css
|
||||
OUT=$(http_proxy=$SECONDARY_HOSTNAME $WGET_DUMP -O /dev/null -S $URL 2>&1)
|
||||
# First hit will be recorded and passed on untouched
|
||||
MATCHES=$(echo "$OUT" | grep -c "Vary: Accept-Encoding") || true
|
||||
check [ $MATCHES -eq 1 ]
|
||||
|
||||
# Fetch until we get a fully optimized response
|
||||
http_proxy=$SECONDARY_HOSTNAME \
|
||||
fetch_until $URL "fgrep -c W/\"PSA" 1 --save-headers
|
||||
|
||||
# Test the optimized response.
|
||||
OUT=$(http_proxy=$SECONDARY_HOSTNAME $WGET_DUMP -O /dev/null -S $URL 2>&1)
|
||||
MATCHES=$(echo "$OUT" | grep -c "Vary: Accept-Encoding") || true
|
||||
check [ $MATCHES -eq 1 ]
|
||||
|
||||
start_test Shutting down.
|
||||
|
||||
# Fire up some heavy load if ab is available to test a stressed shutdown
|
||||
|
||||
Reference in New Issue
Block a user