Compare commits
9 Commits
v1.12.34.2-stable
...
34
| Author | SHA1 | Date | |
|---|---|---|---|
| e6931ba037 | |||
| f4124cb5d1 | |||
| cf57d720e0 | |||
| 6320f71a7c | |||
| f5eccb7618 | |||
| 257c2bcb54 | |||
| b70c70ecb9 | |||
| 149c47ace4 | |||
| 0ca15283c8 |
+1
-6
@@ -42,9 +42,4 @@ compiler:
|
||||
- gcc
|
||||
notifications:
|
||||
email:
|
||||
- cheesy@google.com
|
||||
- jefftk@google.com
|
||||
- morlovich@google.com
|
||||
- jmarantz@google.com
|
||||
- huibao@google.com
|
||||
- jcrowell@google.com
|
||||
- pagespeed-ci@googlegroups.com
|
||||
|
||||
+15
-1
@@ -84,6 +84,7 @@ extern ngx_module_t ngx_pagespeed;
|
||||
|
||||
// Needed for SystemRewriteDriverFactory to use shared memory.
|
||||
#define PAGESPEED_SUPPORT_POSIX_SHARED_MEM
|
||||
#define NGINX_1_13_4 1013004
|
||||
|
||||
net_instaweb::NgxRewriteDriverFactory* active_driver_factory = NULL;
|
||||
|
||||
@@ -3007,13 +3008,17 @@ ngx_int_t ps_preaccess_handler(ngx_http_request_t* r) {
|
||||
ph = cmcf->phase_engine.handlers;
|
||||
|
||||
i = r->phase_handler;
|
||||
|
||||
// move handlers before try_files && content phase
|
||||
// As of nginx 1.13.4 we will be right before the try_files module
|
||||
#if (nginx_version < NGINX_1_13_4)
|
||||
while (ph[i + 1].checker != ngx_http_core_try_files_phase &&
|
||||
ph[i + 1].checker != ngx_http_core_content_phase) {
|
||||
ph[i] = ph[i + 1];
|
||||
ph[i].next--;
|
||||
i++;
|
||||
}
|
||||
#endif
|
||||
|
||||
// insert ps phase handler
|
||||
ph[i].checker = ps_phase_handler;
|
||||
@@ -3069,8 +3074,17 @@ ngx_int_t ps_init(ngx_conf_t* cf) {
|
||||
ngx_http_core_main_conf_t* cmcf = static_cast<ngx_http_core_main_conf_t*>(
|
||||
ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module));
|
||||
|
||||
int phase = NGX_HTTP_PREACCESS_PHASE;
|
||||
|
||||
// As of nginx 1.13.4, try_files has changed.
|
||||
// https://github.com/nginx/nginx/commit/129b06dc5dfab7b4513a4f274b3778cd9b8a6a22
|
||||
#if (nginx_version >= NGINX_1_13_4)
|
||||
phase = NGX_HTTP_PRECONTENT_PHASE;
|
||||
#endif
|
||||
|
||||
ngx_http_handler_pt* h = static_cast<ngx_http_handler_pt*>(
|
||||
ngx_array_push(&cmcf->phases[NGX_HTTP_PREACCESS_PHASE].handlers));
|
||||
ngx_array_push(&cmcf->phases[phase].handlers));
|
||||
|
||||
if (h == NULL) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
@@ -87,6 +87,10 @@ NgxRewriteDriverFactory::NgxRewriteDriverFactory(
|
||||
shut_down_(false) {
|
||||
InitializeDefaultOptions();
|
||||
default_options()->set_beacon_url("/ngx_pagespeed_beacon");
|
||||
// Put in the version of the ngx-pagespeed release. We don't release mod_pagespeed
|
||||
// so we cannot rely on PSOL to hand us to right version. Note that if we perform
|
||||
// another release, this must be either updated or removed.
|
||||
default_options()->set_x_header_value("1.12.34.3-0");
|
||||
SystemRewriteOptions* system_options = dynamic_cast<SystemRewriteOptions*>(
|
||||
default_options());
|
||||
system_options->set_file_cache_clean_inode_limit(500000);
|
||||
|
||||
Reference in New Issue
Block a user