The pagespeed_connection needs a log to write to, but unfortunately
r->connection->log isn't guaranteed to still be around for the whole
lifetime of the pagespeed_connection. Use the log from the server
context instead.
Fixes issue #522.
As of r3447 ServerContext::ChildInit is now in system/, which means we can
delete a lot of code.
DangerFetchFromUnknownHosts and FetchWithGzip are now handled by RewriteOptions.
ServerContext now needs a hostname and port, but we don't have one so we
hackishly provide a different unique id.
Adjust for fetchers and options that moved from apache/ to system/ in r3390.
Use AllocateFetcher() hook from r3402 to put the native fetcher into the fetcher
map maintained by the SystemRewriteDriverFactory.
Makes sure we use the LoopbackRouteFetcher, and also wires up AddHeadersFetcher.
Note that this pulls in loopback_route_fetcher.cc from svn revision r2649
The LoopbackRouteFetcher is applied unconditionally, while in mod_pagespeed it
is not applied when one of these configuration settings is true:
* disable_loopback_routing
* slurping_enabled, or
* test_proxy is set
I added a TODO for that.
(Sqash-merge of Otto's #193.)
This allows viewing the last few messages written to the SharedCircularBuffer in
NgxMessageHandler through url /ngx_pagespeed_message
Related issue: https://github.com/pagespeed/ngx_pagespeed/issues/153
Squash-merge of Otto's #180.
This adds /ngx_pagespeed_statistics. It also uses SharedMemoryStatistics instead
of the SimpleStatistics currently used, and sets them as the default. It also
adds support for tracking per server{} statistics.
Cleaning up of shared segments is disabled, because the current psol version we
link in has a problem with the ordering of nginx's events during a configuration
reload.
The referrer statistics will be ported in a separate pull.
Related to issue #133
Squash-merge of Otto's work in #176.
Set up the background code for connecting pagespeed configuration structures
(RewriteOptions) to the companion nginx ones. Passes all the actual work
through to NgxRewriteOptions::ParseAndSetOptions which isn't written yet.
(All it does so far is interpret "pagespeed on/off".)
Adding nginx subclasses of RewriteOptions and ServerContext are a bit overkill
for this change, but we're going to need them a lot.
Once configuration is complete, any mod_pagespeed configuration directive should
work in ngx_pagespeed:
mod_pagespeed.conf:
ModPagespeedEnableFilters collapse_whitespace
ModPagespeedRunExperiment on
ModPagespeedExperimentSpec id=3;percent=50;default
ModPagespeedExperimentSpec id=4;percent=50
ngx_pagespeed.conf:
pagespeed ModPagespeedEnableFilters collapse_whitespace
pagespeed ModPagespeedRunExperiment on;
pagespeed ModPagespeedExperimentSpec "id=3;percent=50;default";
pagespeed ModPagespeedExperimentSpec "id=4;percent=50";
The `ModPagespeed` is optional, and discouraged:
ngx_pagespeed.conf:
pagespeed EnableFilters collapse_whitespace
pagespeed RunExperiment on;
pagespeed ExperimentSpec "id=3;percent=50;default";
pagespeed ExperimentSpec "id=4;percent=50";