PR #1453 was merged too soon, using this PR to address https://github.com/pagespeed/ngx_pagespeed/pull/1453#discussion_r134222719 (Sorry Josh!)
This commit is contained in:
committed by
GitHub
parent
c67f664244
commit
ef3899515e
@@ -90,6 +90,7 @@ net_instaweb::NgxRewriteDriverFactory* active_driver_factory = NULL;
|
|||||||
namespace net_instaweb {
|
namespace net_instaweb {
|
||||||
|
|
||||||
const char* kInternalEtagName = "@psol-etag";
|
const char* kInternalEtagName = "@psol-etag";
|
||||||
|
const int kNginx1_13_4 = 1013004;
|
||||||
// The process context takes care of proactively initialising
|
// The process context takes care of proactively initialising
|
||||||
// a few libraries for us, some of which are not thread-safe
|
// a few libraries for us, some of which are not thread-safe
|
||||||
// when they are initialized lazily.
|
// when they are initialized lazily.
|
||||||
@@ -3022,7 +3023,7 @@ ngx_int_t ps_preaccess_handler(ngx_http_request_t* r) {
|
|||||||
|
|
||||||
// move handlers before try_files && content phase
|
// move handlers before try_files && content phase
|
||||||
// As of nginx 1.13.4 we will be right before the try_files module
|
// As of nginx 1.13.4 we will be right before the try_files module
|
||||||
#if (nginx_version < 1013004)
|
#if (nginx_version < kNginx1_13_4)
|
||||||
while (ph[i + 1].checker != ngx_http_core_try_files_phase &&
|
while (ph[i + 1].checker != ngx_http_core_try_files_phase &&
|
||||||
ph[i + 1].checker != ngx_http_core_content_phase) {
|
ph[i + 1].checker != ngx_http_core_content_phase) {
|
||||||
ph[i] = ph[i + 1];
|
ph[i] = ph[i + 1];
|
||||||
@@ -3088,7 +3089,7 @@ ngx_int_t ps_init(ngx_conf_t* cf) {
|
|||||||
int phase = NGX_HTTP_PRECONTENT_PHASE;
|
int phase = NGX_HTTP_PRECONTENT_PHASE;
|
||||||
|
|
||||||
// As of nginx 1.13.4, try_files has changed.
|
// As of nginx 1.13.4, try_files has changed.
|
||||||
#if (nginx_version < 1013004)
|
#if (nginx_version < kNginx1_13_4)
|
||||||
phase = NGX_HTTP_PREACCESS_PHASE;
|
phase = NGX_HTTP_PREACCESS_PHASE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user