72b1b98bb9
Requests to: /ngx_pagespeed_static/... can be handled synchronously by pagespeed. They're used for support files for optimizations, like js_defer.js. This also includes a couple refactors: - I pulled most of NgxBaseFetch::CopyBufferToNginx() out into ngx_http_pagespeed_string_piece_to_buffer_chain(). - ngx_http_pagespeed_create_request_context() now returns a CreateRequestContext::Response which gives callers more detailed information about the request. - I also pulled ngx_http_pagespeed_set_cache_control() out of ngx_http_pagespeed_header_filter(). Fixes issue #62.
48 lines
1.4 KiB
Bash
Executable File
48 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Copyright 2012 Google Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
# Author: jefftk@google.com (Jeff Kaufman)
|
|
#
|
|
#
|
|
# Runs pagespeed's generic system test. Will eventually run nginx-specific
|
|
# tests as well.
|
|
#
|
|
# Exits with status 0 if all tests pass.
|
|
# Exits with status 1 immediately if any test fails.
|
|
# Exits with status 2 if command line args are wrong.
|
|
#
|
|
# Usage:
|
|
# Set up nginx to serve mod_pagespeed/src/install/ statically at the server
|
|
# root, then run:
|
|
# ./ngx_system_test.sh HOST:PORT
|
|
# for example:
|
|
# ./ngx_system_test.sh localhost:8050
|
|
#
|
|
|
|
this_dir="$( dirname "$0" )"
|
|
|
|
SYSTEM_TEST_FILE="$this_dir/../../mod_pagespeed/src/install/system_test.sh"
|
|
|
|
if [ ! -e "$SYSTEM_TEST_FILE" ] ; then
|
|
echo "Not finding $SYSTEM_TEST_FILE -- is mod_pagespeed not in a parallel"
|
|
echo "directory to ngx_pagespeed?"
|
|
exit 2
|
|
fi
|
|
|
|
PSA_JS_LIBRARY_URL_PREFIX="ngx_pagespeed_static"
|
|
|
|
source $SYSTEM_TEST_FILE
|