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

Commit 662c1e1

Browse files
PikachuEXEoschaaf
authored andcommitted
Fix compiling issue with older nginx (#1470)
1 parent a897f64 commit 662c1e1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/ngx_pagespeed.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3085,11 +3085,12 @@ ngx_int_t ps_init(ngx_conf_t* cf) {
30853085
ngx_http_core_main_conf_t* cmcf = static_cast<ngx_http_core_main_conf_t*>(
30863086
ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module));
30873087

3088-
int phase = NGX_HTTP_PRECONTENT_PHASE;
3088+
int phase = NGX_HTTP_PREACCESS_PHASE;
30893089

30903090
// As of nginx 1.13.4, try_files has changed.
3091-
#if (nginx_version < kNginx1_13_4)
3092-
phase = NGX_HTTP_PREACCESS_PHASE;
3091+
// https://github.com/nginx/nginx/commit/129b06dc5dfab7b4513a4f274b3778cd9b8a6a22
3092+
#if (nginx_version >= kNginx1_13_4)
3093+
phase = NGX_HTTP_PRECONTENT_PHASE;
30933094
#endif
30943095

30953096
ngx_http_handler_pt* h = static_cast<ngx_http_handler_pt*>(

0 commit comments

Comments
 (0)