Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit ef38995

Browse files
authored
Adress @jmarantz his comment from #1453's review (#1458)
PR #1453 was merged too soon, using this PR to address #1453 (comment) (Sorry Josh!)
1 parent c67f664 commit ef38995

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ngx_pagespeed.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ net_instaweb::NgxRewriteDriverFactory* active_driver_factory = NULL;
9090
namespace net_instaweb {
9191

9292
const char* kInternalEtagName = "@psol-etag";
93+
const int kNginx1_13_4 = 1013004;
9394
// The process context takes care of proactively initialising
9495
// a few libraries for us, some of which are not thread-safe
9596
// when they are initialized lazily.
@@ -3022,7 +3023,7 @@ ngx_int_t ps_preaccess_handler(ngx_http_request_t* r) {
30223023

30233024
// move handlers before try_files && content phase
30243025
// As of nginx 1.13.4 we will be right before the try_files module
3025-
#if (nginx_version < 1013004)
3026+
#if (nginx_version < kNginx1_13_4)
30263027
while (ph[i + 1].checker != ngx_http_core_try_files_phase &&
30273028
ph[i + 1].checker != ngx_http_core_content_phase) {
30283029
ph[i] = ph[i + 1];
@@ -3088,7 +3089,7 @@ ngx_int_t ps_init(ngx_conf_t* cf) {
30883089
int phase = NGX_HTTP_PRECONTENT_PHASE;
30893090

30903091
// As of nginx 1.13.4, try_files has changed.
3091-
#if (nginx_version < 1013004)
3092+
#if (nginx_version < kNginx1_13_4)
30923093
phase = NGX_HTTP_PREACCESS_PHASE;
30933094
#endif
30943095

0 commit comments

Comments
 (0)