Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6865525deb | |||
| cd8c45fc86 | |||
| 9d6bfad665 | |||
| c253c3ba80 | |||
| 8c7c8a843a |
@@ -29,8 +29,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.10.33.0.tar.gz"
|
echo " $ wget https://dl.google.com/dl/page-speed/psol/1.10.33.4.tar.gz"
|
||||||
echo " $ tar -xzvf 1.10.33.0.tar.gz # expands to psol/"
|
echo " $ tar -xzvf 1.10.33.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"
|
||||||
|
|||||||
@@ -986,6 +986,7 @@ void* ps_create_main_conf(ngx_conf_t* cf) {
|
|||||||
"" /* hostname, not used */,
|
"" /* hostname, not used */,
|
||||||
-1 /* port, not used */);
|
-1 /* port, not used */);
|
||||||
active_driver_factory = cfg_m->driver_factory;
|
active_driver_factory = cfg_m->driver_factory;
|
||||||
|
active_driver_factory->LoggingInit(ngx_cycle->log, false);
|
||||||
cfg_m->driver_factory->Init();
|
cfg_m->driver_factory->Init();
|
||||||
ps_set_conf_cleanup_handler(cf, ps_cleanup_main_conf, cfg_m);
|
ps_set_conf_cleanup_handler(cf, ps_cleanup_main_conf, cfg_m);
|
||||||
return cfg_m;
|
return cfg_m;
|
||||||
@@ -2478,8 +2479,8 @@ ngx_int_t send_out_headers_and_body(
|
|||||||
|
|
||||||
rc = ngx_http_send_header(r);
|
rc = ngx_http_send_header(r);
|
||||||
|
|
||||||
if (rc != NGX_OK) {
|
if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) {
|
||||||
return NGX_ERROR;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send the body.
|
// Send the body.
|
||||||
@@ -3051,7 +3052,7 @@ ngx_int_t ps_init_module(ngx_cycle_t* cycle) {
|
|||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg_m->driver_factory->LoggingInit(cycle->log);
|
cfg_m->driver_factory->LoggingInit(cycle->log, true);
|
||||||
cfg_m->driver_factory->RootInit();
|
cfg_m->driver_factory->RootInit();
|
||||||
} else {
|
} else {
|
||||||
delete cfg_m->driver_factory;
|
delete cfg_m->driver_factory;
|
||||||
@@ -3083,7 +3084,7 @@ ngx_int_t ps_init_child_process(ngx_cycle_t* cycle) {
|
|||||||
|
|
||||||
// ChildInit() will initialise all ServerContexts, which we need to
|
// ChildInit() will initialise all ServerContexts, which we need to
|
||||||
// create ProxyFetchFactories below
|
// create ProxyFetchFactories below
|
||||||
cfg_m->driver_factory->LoggingInit(cycle->log);
|
cfg_m->driver_factory->LoggingInit(cycle->log, true);
|
||||||
cfg_m->driver_factory->ChildInit();
|
cfg_m->driver_factory->ChildInit();
|
||||||
|
|
||||||
ngx_http_core_main_conf_t* cmcf = static_cast<ngx_http_core_main_conf_t*>(
|
ngx_http_core_main_conf_t* cmcf = static_cast<ngx_http_core_main_conf_t*>(
|
||||||
|
|||||||
@@ -208,10 +208,11 @@ void NgxRewriteDriverFactory::StartThreads() {
|
|||||||
threads_started_ = true;
|
threads_started_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NgxRewriteDriverFactory::LoggingInit(ngx_log_t* log) {
|
void NgxRewriteDriverFactory::LoggingInit(
|
||||||
|
ngx_log_t* log, bool may_install_crash_handler) {
|
||||||
log_ = log;
|
log_ = log;
|
||||||
net_instaweb::log_message_handler::Install(log);
|
net_instaweb::log_message_handler::Install(log);
|
||||||
if (install_crash_handler()) {
|
if (may_install_crash_handler && install_crash_handler()) {
|
||||||
NgxMessageHandler::InstallCrashHandler(log);
|
NgxMessageHandler::InstallCrashHandler(log);
|
||||||
}
|
}
|
||||||
ngx_message_handler_->set_log(log);
|
ngx_message_handler_->set_log(log);
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ class NgxRewriteDriverFactory : public SystemRewriteDriverFactory {
|
|||||||
return process_script_variables_;
|
return process_script_variables_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoggingInit(ngx_log_t* log);
|
void LoggingInit(ngx_log_t* log, bool may_install_crash_handler);
|
||||||
|
|
||||||
virtual void ShutDownMessageHandlers();
|
virtual void ShutDownMessageHandlers();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user