1137 Commits

Author SHA1 Message Date
Jeff Kaufman 7735cf0636 ngx-pagespeed-message: wire up ngx_pagespeed_message url
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.
2013-03-06 09:57:41 -05:00
Maks Orlovich c249a34643 Port cache setup code to SystemCaches
This -almost- gives SHM metadata cache support, except for lack
of parsing of CreateShmCache --- I don't have a good solution for
that yet.
2013-03-04 10:28:36 -05:00
Jeff Kaufman 6344d31c83 Add /ngx_pagespeed_statistics
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.
2013-02-26 11:42:39 -05:00
Maks Orlovich 1798f163ef PSOL needs FileCache::InitStats now 2013-02-22 10:58:30 -05:00
Maks Orlovich 5d24badf38 key_value_codec.cc is in the .a already as well 2013-02-22 10:52:55 -05:00
Maks Orlovich e4794ebd10 Update for AprMemCache moving into system/ and the .a file 2013-02-21 16:30:09 -05:00
Maks Orlovich 7a2ed053e5 Port NgxCache -> SystemCachePath 2013-02-21 13:52:06 -05:00
Maks Orlovich 592042fd72 Adjust to API changes.
StaticJsManager -> StaticAssetManager
Beacon gets an extra argument
2013-02-15 16:08:13 -05:00
Jeff Kaufman 4f6f155920 message-handler: Add NgxMessageHandler
This adds an NgxMessageHandler, that uses ngx_log_error to output messages. It
is heavily based on apache_message_handler from mod_pagespeed.

It falls back to an internal GoogleMessageHandler if the required initialisation
has not been performed yet.

It can also install a crash handler, that will try to log a backtrace upon
receiving certain signals. In preparation of us porting /ngx_pagespeed_messages,
it also keeps the last few messages in a SharedCircularBuffer

(Squash-merge of Otto's #163)
2013-02-13 11:26:20 -05:00
Jeff Kaufman 102070269c rewrite_driver_factory: move instantiation up front
We need to have the NgxRewriteDriverFactory available at configuration parse
time to set options on it. This change moves instantiation of the factory in
front of configuration parsing.  Afterwards, a check is done to see if we where
enabled anywhere.  If we where not enabled / do not have any active server
contexts, the NgxRewriteDriverFactory is deleted. It's not very elegant, but we
can't think of anything better currently.

Squash merge of Otto's #165.
2013-02-11 10:49:20 -05:00
Maks Orlovich a39144add7 Use the new common parsing code in PSOL 2013-02-11 10:30:48 -05:00
Maks Orlovich f8d1da5017 Use proper path for scoped_ptr.h
base/scoped_ptr.h is no longer in Chromium ---
base/memory/scoped_ptr.h is, but indirect via
PSOL for consistency.
2013-02-11 10:30:48 -05:00
Jeff Kaufman a8e3228625 trunk-sync: refactor SystemRewriteOptions, psuedo-RTTI removed
This is the ngx_pagespeed half of a refactor morlovich made:

    Split out the settings that can be shared between
    mod_pagespeed and ngx_pagespeed into a separate class.

    This is step 1 out of ??? of refactors to reduce code dupe
    between mod_pagespeed and ngx_pagespeed and make some
    things more testable.

    (Step 2 will be to share some of the configuration parsing
    code).
     -- https://code.google.com/p/modpagespeed/source/detail?r=2443
2013-02-05 12:42:11 -05:00
Jeff Kaufman 48582483a1 Merge pull request #167 from jperelli/patch-1
Solve "unknown type name ‘off64_t’", issue #166
2013-02-05 09:39:34 -08:00
jperelli f31f9de405 Solve "unknown type name ‘off64_t’", issue #166 2013-02-04 20:30:20 -02:00
Jeff Kaufman 60442b85c0 merge commit 2013-02-01 11:28:56 -05:00
Jeff Kaufman 9e6de567ee Merge pull request #162 from pagespeed/jefftk-experiment-resource-regexp
readme: support experiment resource urls
2013-02-01 06:42:53 -08:00
Jeff Kaufman cb2ce08004 readme: document tengine usage 2013-01-31 11:11:29 -05:00
Jeff Kaufman 0609b89162 readme: support experiment resource urls
A normal .pagespeed. url looks like:

    256x192vPuzzle.jpg.pagespeed.ic.alA0AdlR-2.jpg

If someone turns on RunExperiment, however, we generate urls like:

    256x192vPuzzle.jpg.pagespeed.a.ic.alA0AdlR-2.jpg
    256x192vPuzzle.jpg.pagespeed.b.ic.alA0AdlR-2.jpg

The new section is always a single letter between a and z.  We need to catch
these and pass them through to PageSpeed.
2013-01-31 10:44:31 -05:00
Jeff Kaufman 9c3c6e9ab0 Merge pull request #160 from pagespeed/oschaaf-shutdown-fix
shutdown-fix: fix a possible crasher on shutdown
2013-01-31 07:12:52 -08:00
Otto van der Schaaf be7b483cdc shutdown-fix: fix a possible crasher on shutdown 2013-01-31 16:09:03 +01:00
Jeff Kaufman dbcc5650c9 Merge pull request #159 from pagespeed/jefftk-debian-dependencies
readme: fix debian dependencies
2013-01-31 06:58:15 -08:00
Jeff Kaufman 4f97399f55 readme: fix debian dependencies
As @bnoordhuis points out, `build-essential` depends on `make` and older
releases call `git` as `git-core`.
2013-01-31 09:34:00 -05:00
Jeff Kaufman 5a73e37160 Merge pull request #158 from pagespeed/oschaaf-shared-mem-locks-fixed
Shared mem locks fixed
2013-01-30 13:58:35 -08:00
Otto van der Schaaf 1971ccc44f shared-memory-locks: Fix a segmentation fault
Do not instantiate a ProxyFetchFactory when the ServerContext is
NULL on cfg_s
2013-01-30 22:14:33 +01:00
Otto van der Schaaf 69cfb971ee Revert "Revert "locking: support shared memory locking""
This reverts commit be9a78b18a.
2013-01-30 22:12:20 +01:00
Jeff Kaufman c86f127161 Merge pull request #157 from benoit934/patch-2
Add Debian's Install dependencies command
2013-01-30 08:24:48 -08:00
Benoit Anastay 41e5a124d0 Add Debian's Install dependencies command 2013-01-30 01:51:18 +01:00
Jeff Kaufman be9a78b18a Revert "locking: support shared memory locking"
I just enabled this on jefftk.com and it locked the server up.

This reverts commit d0464e8982.
2013-01-29 18:12:07 -05:00
Jeff Kaufman d0464e8982 locking: support shared memory locking
Squashed merge of Otto's pull request #151.
2013-01-29 17:58:07 -05:00
Jeff Kaufman 5a10e31e81 experiments: support RunExperiment
Before the experiment code was just setting the need_to_store_experiment_data
option but nothing was looking at that option.  Rewrote the code, basing it on
InstawebContext::SetFuriousStateAndCookie, in order to actually set the cookie
to support the experiment.  There are tests for this functionality, but we're
waiting on issue #40 to be able to run them.

Manual testing (with line wrapping):

    $ curl -s -D- http://localhost:8050/mod_pagespeed_example/ | grep GFURIOUS
    Set-Cookie: _GFURIOUS=1; Expires=Fri, 01 Feb 2013 21:38:31 GMT;
                Domain=.localhost; Path=/

    $ curl -s -D- http://localhost:8050/mod_pagespeed_example/ | grep GFURIOUS
    Set-Cookie: _GFURIOUS=2; Expires=Fri, 01 Feb 2013 21:42:56 GMT;
                Domain=.localhost; Path=/

And it responds properly on receiving the cookie, although it did that before
this change too.
2013-01-29 17:55:55 -05:00
Jeff Kaufman ea4e17b623 add_instrumentation: return 204 and log for /ngx_pagespeed_beacon hits
Fixes #134
2013-01-23 17:43:57 -05:00
Jeff Kaufman 16dec39f7d guard against server only options being configured at location scope
guard against server only options being configured at location scope this
introduces a duplicated list of server-level-only options from mod_instaweb.cc,
which is a short term solution and should be removed later on

Fixes #99.
2013-01-23 17:30:52 -05:00
Jeff Kaufman cc14b642ad Merge pull request #146 from pagespeed/jefftk-lint-fixes
style: fix style errors cpplint finds; annotate the ones it's wrong about
2013-01-23 14:22:06 -08:00
Jeff Kaufman c4cb36f378 style: fix style errors cpplint finds; annotate the ones it's wrong about 2013-01-23 17:15:03 -05:00
Jeff Kaufman 7152e5498c trunk-sync: we also fail ipro testing because its not ported 2013-01-23 14:37:08 -05:00
Jeff Kaufman 51bc7e73df trunk-sync: system_test_trailer renamed to check_failures_and_exit 2013-01-23 14:36:30 -05:00
Jeff Kaufman c3fba8a36e trunk-sync: RewriteOptions::Enabled is now trinary 2013-01-23 14:31:59 -05:00
Jeff Kaufman 1fa65ba938 trunk-sync: threads now require names 2013-01-23 14:26:42 -05:00
Jeff Kaufman 12ba4308da trunk-sync: resource_fetch.h was moved 2013-01-23 14:21:44 -05:00
Jeff Kaufman 7ee11fcbe5 trunk-sync: we now depend on re2 2013-01-23 14:21:09 -05:00
Jeff Kaufman 3fe87dc64b shutdown-sequence: fix a segfault during a shutdown under load
Shut down the driver factory before the proxy fetch factory.
shutting down the driver factory will make sure that all worker
threads are stopped, This prevents in-flight callbacks to
destroyed proxy fetch factories, so we should be able to safely
delete them

This fixes #109.
2013-01-23 13:32:29 -05:00
Jeff Kaufman 5363fe0c32 cosmetic changes: alphabetization, spacing, indentation, type location
Merge of pull request #135
2013-01-23 13:29:18 -05:00
Jeff Kaufman 2056e919c4 config: fix line continuation bug 2013-01-22 12:54:18 -05:00
Jeff Kaufman 4eb9e0fce9 Merge pull request #139 from pagespeed/jefftk-32bit-arch
config: interpret amd64, i686, and i386
2013-01-21 14:50:12 -08:00
Jeff Kaufman 632973caed config: interpret amd64, i686, and i386 2013-01-21 17:18:45 -05:00
Jeff Kaufman 8fcea5c873 resources: reject non-HEAD non-GET requests 2013-01-21 13:48:32 -05:00
Jeff Kaufman 76ef7f9f47 readme: link to ngxpagespeed.com 2013-01-17 17:02:23 -05:00
Jeff Kaufman 7d825331cf readme: the Library command uses longer hashes now 2013-01-17 14:56:10 -05:00
Jeff Kaufman 53f08d3321 Merge pull request #132 from pagespeed/jefftk-strip-headers
headers: strip accept-bytes and vary-accept-encoding
2013-01-17 11:54:50 -08:00