Merge branch 'master' into HEAD
Preparing for 1.9.32.1 release Conflicts: config src/ngx_pagespeed.cc src/ngx_rewrite_driver_factory.h src/ngx_rewrite_options.cc test/nginx_system_test.sh test/pagespeed_test.conf.template
This commit is contained in:
@@ -27,8 +27,8 @@ if [ "$mod_pagespeed_dir" = "unset" ] ; then
|
|||||||
echo " You need to separately download the pagespeed library:"
|
echo " You need to separately download the pagespeed library:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ cd /path/to/ngx_pagespeed"
|
echo " $ cd /path/to/ngx_pagespeed"
|
||||||
echo " $ wget https://dl.google.com/dl/page-speed/psol/1.8.31.2.tar.gz"
|
echo " $ wget https://dl.google.com/dl/page-speed/psol/1.8.31.4.tar.gz"
|
||||||
echo " $ tar -xzvf 1.8.31.2.tar.gz # expands to psol/"
|
echo " $ tar -xzvf 1.8.31.4.tar.gz # expands to psol/"
|
||||||
echo ""
|
echo ""
|
||||||
echo " Or see the installation instructions:"
|
echo " Or see the installation instructions:"
|
||||||
echo " https://github.com/pagespeed/ngx_pagespeed#how-to-build"
|
echo " https://github.com/pagespeed/ngx_pagespeed#how-to-build"
|
||||||
@@ -205,7 +205,7 @@ if [ $ngx_found = yes ]; then
|
|||||||
else
|
else
|
||||||
cat << END
|
cat << END
|
||||||
$0: error: module ngx_pagespeed requires the pagespeed optimization library.
|
$0: error: module ngx_pagespeed requires the pagespeed optimization library.
|
||||||
Look in obj/autoconf.err for more details.
|
Look in objs/autoconf.err for more details.
|
||||||
END
|
END
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -286,11 +286,6 @@ void copy_response_headers_from_ngx(const ngx_http_request_t* r,
|
|||||||
|
|
||||||
headers->set_status_code(r->headers_out.status);
|
headers->set_status_code(r->headers_out.status);
|
||||||
|
|
||||||
if (r->headers_out.location != NULL) {
|
|
||||||
headers->Add(HttpAttributes::kLocation,
|
|
||||||
str_to_string_piece(r->headers_out.location->value));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Manually copy over the content type because it's not included in
|
// Manually copy over the content type because it's not included in
|
||||||
// request_->headers_out.headers.
|
// request_->headers_out.headers.
|
||||||
headers->Add(HttpAttributes::kContentType,
|
headers->Add(HttpAttributes::kContentType,
|
||||||
@@ -1178,6 +1173,12 @@ ngx_int_t ps_base_fetch_handler(ngx_http_request_t* r) {
|
|||||||
STR_CASE_EQ_LITERAL(header->key, "Last-Modified") ||
|
STR_CASE_EQ_LITERAL(header->key, "Last-Modified") ||
|
||||||
STR_CASE_EQ_LITERAL(header->key, "Expires"))))) {
|
STR_CASE_EQ_LITERAL(header->key, "Expires"))))) {
|
||||||
header->hash = 0;
|
header->hash = 0;
|
||||||
|
if (STR_CASE_EQ_LITERAL(header->key, "Location")) {
|
||||||
|
// There's a possible issue with the location header, where setting
|
||||||
|
// the hash to 0 is not enough. See:
|
||||||
|
// https://github.com/nginx/nginx/blob/master/src/http/ngx_http_header_filter_module.c#L314
|
||||||
|
r->headers_out.location = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -498,6 +498,10 @@ NgxRewriteOptions* NgxRewriteOptions::Clone() const {
|
|||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NgxRewriteOptions::Merge(const RewriteOptions& src) {
|
||||||
|
SystemRewriteOptions::Merge(src);
|
||||||
|
}
|
||||||
|
|
||||||
const NgxRewriteOptions* NgxRewriteOptions::DynamicCast(
|
const NgxRewriteOptions* NgxRewriteOptions::DynamicCast(
|
||||||
const RewriteOptions* instance) {
|
const RewriteOptions* instance) {
|
||||||
return dynamic_cast<const NgxRewriteOptions*>(instance);
|
return dynamic_cast<const NgxRewriteOptions*>(instance);
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ class NgxRewriteOptions : public SystemRewriteOptions {
|
|||||||
|
|
||||||
// Make an identical copy of these options and return it.
|
// Make an identical copy of these options and return it.
|
||||||
virtual NgxRewriteOptions* Clone() const;
|
virtual NgxRewriteOptions* Clone() const;
|
||||||
|
virtual void Merge(const RewriteOptions& src);
|
||||||
|
|
||||||
// Returns a suitably down cast version of 'instance' if it is an instance
|
// Returns a suitably down cast version of 'instance' if it is an instance
|
||||||
// of this class, NULL if not.
|
// of this class, NULL if not.
|
||||||
|
|||||||
Reference in New Issue
Block a user