* Add FlushAll() public method to RedisCache and call it right after connecting to server in RedisCacheTest
* Add CacheKeyPrepender wrapper for CacheInterface
* Make AprMemCache add prefixes to all keys added to Memcached. Prefix right now is simply a test case + test name. Flushing Memcached requires us to further modify our apr_memcached fork, which we decided to avoid.
InMemoryCache is a maximally simple implementation of cacheInterface,
for debugging and faking purposes.
This changelist is more for me (Egor) to get feedback than to actually submit the
code into Piper, because I doubt there are any direct applications. The goal is to ensure that I understand what it's going on in caches and that I haven't missed anything important.
* Add hiredis to dependencies and write .gyp for it
* Add run_program_with_redis.sh (copied from run_program_with_memcache.sh)
* Add RedisCache and one simple unit test for it
Things to do:
* Add more tests
* Add configuration variables for Redis cache so it can be enabled
* Understand purpose of memcache-related flags and variables in test Makefiles
and ensure Redis has same, if needed
If what we're going to inline into CSS or JS starts with the gzip magic
bytes (file signature) then it's very likely to be gzipped and very
unlikely to be valid CSS or JS, so we should abort the inlining.
Fixes the amount of https://github.com/pagespeed/mod_pagespeed/issues/1307
that I could repro. If we later see mangling files in-place (or combining)
then we can extend this.
(These show up in debug logs --- I was expecting them to show up
in debug comments as well, and while that didn't work out, no reason
not to keep this).
* Adds Connection: to the list of headers that contain fields separated by ","
* Marks Alt-Svc and Alternate-Protocol as hop-by-hop, so we will treat them as such.
* Adds sanitization of headers marked as hop-by-hop in Connection: headers as per rfc.
* Moves initialization of 'AtExitManager' out of the css filter to the more central ProcessContext as this change adds another dependancy on it -- and we must initialize it exactly once.
* Changes the header definitions to be lazy initialized to avoid extra allocations when manipulating headers, while avoiding static initialization.
(From https://github.com/pagespeed/mod_pagespeed/pull/1195)
defer_js was using Image objects to preload scripts for WebKit in a way that is
harmful in modern browsers. Currently this isn't actually needed in Chrome,
since the preload scanner already finds our deferred scripts, but Chrome is
thinking of removing that [1]. This change switches us to the new standard,
rel=preload, which we will need once Chrome updates its scanner not to preload
things with invalid type attributes.
Fixes https://github.com/pagespeed/mod_pagespeed/issues/1054
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=623109
via:*google*.
Completes the fix to
https://github.com/pagespeed/ngx_pagespeed/issues/1149
A challenge here is to make sure we test all the egress points, e.g.
- pagespeed resources: cached and reconstructed on demand
- fallbacks of various sorts
- ipro resources: cached and reconstructed on demand
- loaded from LoadFromFile
also we must make sure we don't cache the 'public' based on the request
headers.
Partially fixes https://github.com/pagespeed/ngx_pagespeed/issues/1149
General strategy:
- adjust general mechanism for computing output response header from input response headers
to incorporate 'public' on input.
A challenge here is to make sure we test all the egress points, e.g.
- pagespeed resources: cached and reconstructed on demand
- fallbacks of various sorts
- ipro resources: cached and reconstructed on demand
- loaded from LoadFromFile
is included in something w/o explicitly restricted media.
Key thing to note here: empty media_ means everything, and we're doing
intersection, so there is a room for confusion between nothing and
everything.