sligocki is adding a feature to pagespeed where it will parse your statistics
for you and determine if there are any problems. This CL wires up the
ConsoleHandler and also includes a few required files in the build process.
It doesn't work yet, because as of svn r3193 the console has a hardcoded json
request to '/mod_pagespeed_statistics' and in nginx we use '/ngx_...' .
I've tested this by changing all uses here to use the "mod_..." version and that
worked, but I've undone those changes.
This matches two changes:
- Anupama made the caching tests use downstream_caching.html
(Thanks to her for help in updating this)
- Jan updated some configuration defaults, which made some images
compress more.
Adding a nginx conf snippet for constructing a proxy_cache_key based on the UserAgent and expected optimizations for that UserAgent class, bypassing the cache for all other cases. Sample config for downstream-cache proxy_cache_key construction now takes care of 2 classes of UserAgents (expected to get most of the traffic for a site) and also bypasses cache for all other desktop UAs, all mobile UAs and all tablet UAs.
(Fixing the startup phase of the nginx server to put out the original error message in case of failure.)
Add support for proxy_cache integration with pagespeed with:
a) Handling cache-hit-header to bypass content handling by pagespeed.
b) pagespeed_test_conf.template with the proxy_cache configuration blocks.
c) System tests for checking hit and miss headers and purge requests.
d) Checking for proxy_cache_purge module during start-up for tests.
Squash-merge of Anupama's #404
Updating trunk-tracking to compile and work with mod_pagespeed svn revision 3061 with 2 small modifications to serf_url_async_fetcher.cc to disable SERF_HTTPS_FETCHING.
Please note that anyone building mod_pagespeed from source will need to
a) edit serf_url_async_fetcher.h to change the line "#define SERF_HTTPS_FETCHING 1" to have 0.
b) edit serf_url_async_fetcher.cc to move the definition of "apr_status_t status = APR_SUCCESS;" on line 265 to be inside the "#if SERF_HTTPS_FETCHING" block (in order to avoid a compilation error for psol/mod_pagespeed).
Highlights of this change:
1) Propagating renaming changes related to
a) Furious -> Experiment
b) ModPagespeed -> PageSpeed.
2) UrlPollableAsyncFetcher going away.
3) RewriteOptions now requiring a ThreadSystem parameter for construction.
4) Removing client_property_cache references and usages (since this was removed from mod_pagespeed).
5) Propagating beacon construction changes (where POST requests can now carry the url query param in the request).
6) General fixes for API/test breakages in statistics_logger, fallback property page cache,
Add a keepalive test which is repeated 100 times, with us both
behind the gzip filter and directly behind nginx's output filter.
The reason for that is that modules running after us can mask
our errors, this at least tests the most used ones.
This CL adds a failure to the expected failures, as currently,
this tests gives suspicious messages in nginx's error.log:
"client prematurely closed connection while sending response to client"
We should probably also test other code paths, like .pagespeed.
resources and the beacon with post requests as well. If this approach
is generally ok, I can proceed to add those as well.
A small change, but it would be good to make it early on.
These changes should probably be mentioned in the release notes.
Set these as hardcoded defaults:
FileCacheInodeLimit 500000
AvoidRenamingIntrospectiveJavascript on
Fixes https://github.com/pagespeed/ngx_pagespeed/issues/284
If we get invalid query parameters or request options we should treat it as if
there are no request-specific options instead of producing a 50x error.
Fixes#252.
* Add tests for statistics.
* We weren't increasing resource_404_count on 404s.
* This required giving `NgxBaseFetch` a `NgxServerContext` pointer.
* /ngx_pagespeed_statistics was publically available.
* Made a pass over the readme to add a new configuration option and fixed up
serveral things that were out of date while I was there.
Fixes#248.
* Support AddOptionsToUrls
* Support tests that need top run something post cache flush
* Add `ps_determine_port` so we parse urls out of ports and fix#239
* Rejigger the tests to support how our headers for resources don't include a
Content-Length header
If we get a request for `/ngx_pagespeed_statistics` we don't create a
`ps_request_context`. We create the content properly, but then in the header
filter we assume that "ctx is NULL iff this is not a resource fetch" and so
conclude that we're not a resource fetch. Then we call `CreateRequestContext()`
with `resource_fetch=false` and so it doesn't check to see if it's statistics.
Here I fix this by pulling the check for statistics outside of the
resource-fetch-only part of `CreateRequestContext()`.
Make us live in peace with nginx's SSI module:
- Moved our module so that we we see the content that the ssi module produces as
a whole. (right before the gzip module does its work).
- Made the header and content filters bail out for subrequests, so we don't
attempt to rewrite the sub requests that the ssi module fires.
- Changed NGX_HTTP_SSI_BUFFERED to use an unused flag, so I could rule out that
the SSI module got confused by ngx_pagespeed manipulating that flag as well.
- Handled the case in ps_update() where CollectAccumulatedWrites gives us a null
cl
Squash-merge of Otto's #242.
* Add test that we handle beacons.
* Fix a segfault in handling beacons.
* This required switching NgxRequestContext to take an ngx_http_request_t
instead of a ps_request_ctx.
* Support running tests under valgrind:
USE_VALGRIND=true test/nginx_pagespeed_test.sh ...
But: we don't set a Content-Length header on our `204 No Content` response,
which makes wget wait for 60s to time it out. Compare:
wget --save-headers -O - http://localhost:8050/ngx_pagespeed_beacon
curl -D- http://localhost:8050/ngx_pagespeed_beacon
The headers we send are:
HTTP/1.1 204 No Content
Server: nginx/1.2.4
Date: Tue, 02 Apr 2013 21:07:02 GMT
Connection: keep-alive
While Apache sends:
HTTP/1.1 204 No Content
Date: Tue, 02 Apr 2013 21:07:43 GMT
Server: Apache/2.2.3 (CentOS)
Content-Length: 0
Content-Type: text/plain; charset=UTF-8
I can't get nginx to send a content length. I've tried manually doing the
opposite of ngx_http_clear_content_length but that didn't work. Asking on
nginx-devel I got:
Adding a Content-Length will be inconsistent with RFC2616:
The 204 response MUST NOT include a message-body, and thus is always
terminated by the first empty line after the header fields.
I've reported a bug to wget. For now we can just pass wget `-t 1 --timeout=1`.