Squash-merge of Jan's #608 and Otto's #611.
* r3726:
* Updated closure compiler flags for static JS files.
* r3729:
* Centralize parsing of FetchHttps in SystemRewriteOptions so ngx_pagespeed
can get it too.
* To keep the helpful error_message from SerfUrlAsyncFetcher, wire it through
RewriteOptions as a new-fangled error_detail.
* r3735:
* Follow-up changes for downstream caching integration with beaconing
dependent filters: If a downstream cache rebeaconing key is configured, we
should instrument the page only if the key present in the PS-ShouldBeacon
header matches the one in the configuration. This allows us to send no-cache
headers for anything that carries the right beaconing key, and continue to
send out the original cache control headers in other cases where downstream
caching is enabled.
* Native fetcher: fortify handling of content length (and absense).
* Native fetcher: fail when the stream terminates before having
completely parsed the headers.
* Tests: Rename `test_filter` -> `start_test` in ngx_system_test.sh for
a test.
* Tests: Move blockingrewrite key to the http {} block.
* Tests: Update localhost -> 127.0.0.1. The native fetcher uses
dns to resolve, and won't be able to retreive an ip for
localhost.
* Tests: Allow outstanding proxy fetches some time to finish
when running under valgrind, before terminating nginx.
* Valgrind: Add suppressions to make testing a release build pass.
This pull update was extra work because the valgrind and native fetcher flows
had rotted a bit. We need to make sure to test them with every update.
This makes nginx run in the background under valgrind,
with both a master and a child process.
Valgrind errors will be redirected to `valgrind.log`.
When `USE_VALGRIND` is set, all system tests will be run under valgrind,
and at the end a new test is appended which ensures no valgrind errors
where encountered.
It is also worth noting that:
- There is a new file, `valgrind.sup`, which contains a few suppressions.
- Some tests behave flakey under valgrind. For now these are appended
to the expected failures (when under valgrind only).
- 'Possibly lost' errors are all suppressed to get the amount of false
positives manageable.