No major changes that we need to be compatible with. r3508 tweaks
InPlaceResourceRecorder::DoneAndSetHeaders so that we can now make sure to
release it: the recorder is allocated in ps_in_place_check_header_filter and
released in ps_in_place_body_filter, but if there's an error in between it will
be leaked. We know ps_release_request_context will get run regardless because
it's set as a cleanup handler, so clean up the recorder there.
Fixes#527
This fixes a few valgrind errors on shutdown, plus a potential
issue when url_util.cc would lazily initialize in a thread-unsafe
manner. Also adds --leak-check=full to the suggested valgrind
command for the system tests.
Issue #364 was fixed upstream in r3492. Backport the fix to master.
"We only need to shut down the caches in child processes because they are not
started in the master process. This wasn't a problem before, but shutting down
the caches can start a thread which isn't safe to do in the master process of a
forking server like Nginx."
Also backport the change from r3497 where we use a DCHECK for
may_start_threads_. It's bad to start threads in the root process, but it's not
worth crashing a production server over.
* Adds IPRO tests that we should have copied from apache_system_test.sh back
when we first added IPRO.
* The "IPRO-optimized resources should have fixed size, not chunked" test
fails. The problem is as it says: IPRO optimized resources are being sent
out with `Transfer-Encoding: Chunked` instead of `Content-Length: ...`. How
do we fix this?
* install/system_test.sh moved to net/instaweb/automatic/system_test.sh
* minor method signature changes
* url.is_valid() is gone, replaced by .IsWebValid()
* I pushed Otto's #464 upstream, and now we need to make some IPRO changes.
* beacons have nonces now, so we need to update tests.
Get rid of net_instaweb:: everywhere. By eliminating the ngx_psol namespace we
can stop prefixing everything in ngx_pagespeed.cc with net_instaweb::
Fix other minor style issues.
Remove unnecessary declarations.
Rename ps_create_request_context to ps_route_request and CreateRequestContext to
RequestRouting because it no longer creates the request context.
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.
X-Cache handling is not needed because the pagespeed server never gets to see
a request with X-Cache header added by its downstream cache. X-Cache headers
are only to be added in responses served out of the downstream cache for debugging
purposes only. This piece of deleted code was also conflicting with X-Cache
headers present on upstream caches (wrt pagespeed) and hence not optimizing responses
that happened to carry this header.
(More details are present in https://github.com/pagespeed/ngx_pagespeed/issues/488)
* Remove PopulateRequestHeaders() and PopulateResponseHeaders().
* Set stop copying request headers to the base fetch twice.
* This fixes a dcheck failure in the debug build.
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.
SystemRewriteDriverFactory was expanded by r3366 to do a lot of what
NgxRewriteDriverFactory used to have to do. Take advantage of this and
simplifiy our code.
After more testing, it turns out that the timer that is initially set
in Init() remains active throughout the whole lifetime of the fetch.
This reverts the previous change, which isn't correct, and replaces
all TODO's concerning timers with a comment about that we don't need
them.
Fixes https://github.com/pagespeed/ngx_pagespeed/issues/466