Commit Graph

218 Commits

Author SHA1 Message Date
Jeff Kaufman 768ba6a64f system-test: clear cache; simpler init
* always run with a clean cache
 * in the future we should structure the tests so they run twice, once with a clean cache and then again with a populated one, but for now a clean cache should catch more bugs
* stop requiring a file cache path for tests; just use
* fix exit codes to match documentation at the top of the file: 1 is a test failure, 2 is bad args

Squash-merge of my #198.
2013-03-29 11:37:17 -04:00
Jeff Kaufman b25150effe Merge pull request #200 from pagespeed/jefftk-blocking-rewrite-key
system-test: support blocking rewrites
2013-03-28 14:14:28 -07:00
Jeff Kaufman cb00b0a0e8 system-test: support blocking rewrites (fixes #199) 2013-03-28 16:02:58 -04:00
Jeff Kaufman 51ebf51b4e system-test: infrastructure, host validation
We are going to need some nginx-specific system tests, and this seemed like a
good place to start. This adds two tests, as well as some infrastructure. With

Squash-merge of my #194 and #195
2013-03-28 13:39:03 -04:00
Jeff Kaufman 057038d20f loopback-routing: apply session fetchers
Makes sure we use the LoopbackRouteFetcher, and also wires up AddHeadersFetcher.

Note that this pulls in loopback_route_fetcher.cc from svn revision r2649

The LoopbackRouteFetcher is applied unconditionally, while in mod_pagespeed it
is not applied when one of these configuration settings is true:

* disable_loopback_routing
* slurping_enabled, or
* test_proxy is set

I added a TODO for that.

(Sqash-merge of Otto's #193.)
2013-03-28 10:29:24 -04:00
Jeff Kaufman 24787567b6 config: explictily link in the math library 2013-03-26 16:43:52 -04:00
Jeff Kaufman 705e6a0225 trunk-tracking: updated debug binaries against r2618 2013-03-26 16:34:18 -04:00
Jeff Kaufman 7436f39214 trunk-tracking: updated release binaries against r2618 2013-03-26 16:05:19 -04:00
Jeff Kaufman 1419c127ef readme: make all needs AR.foo as well 2013-03-26 15:09:36 -04:00
Jeff Kaufman bf74641fc9 readme: make now needs a wrapper for the ar command 2013-03-26 13:25:56 -04:00
Jeff Kaufman a0e738b4e8 merge commit: inflating upstream; fix message handler initialization 2013-03-20 16:05:15 -04:00
Otto van der Schaaf acec3ae6d2 Merge pull request #190 from pagespeed/oschaaf-inflate-upstream
Adds suport for silently inflating compressed upstreams. This is
good for when the link to the upstream is low bandwidth

This should fix https://github.com/pagespeed/ngx_pagespeed/issues/140
2013-03-20 12:24:51 -07:00
Otto van der Schaaf 9fabe2d322 inflate-upstream: support gzipped/deflated upstreams
Adds suport for silently inflating compressed upstreams. This is
good for when the link to the upstream is low bandwidth

This should fix https://github.com/pagespeed/ngx_pagespeed/issues/140
2013-03-20 20:06:30 +01:00
Jeff Kaufman 7a064eb6ee readme: clarify that 'make all' always fails 2013-03-18 17:32:37 -04:00
Jeff Kaufman 23422094e0 building off r2618 2013-03-18 17:26:09 -04:00
Jeff Kaufman d8f2b034c0 file_cache: validate FileCachePath 2013-03-18 17:20:29 -04:00
Jeff Kaufman f4e89451b6 psol: updating from r2618 2013-03-18 16:45:55 -04:00
Jeff Kaufman 82c5e058fa readme: doc depot tools installation 2013-03-18 13:07:30 -04:00
Jeff Kaufman a996856b7b psol: updating from r2577 2013-03-18 12:36:07 -04:00
Jeff Kaufman 05765a33f7 trunk-tracking: we depend on r2577 now 2013-03-18 11:41:49 -04:00
Jeff Kaufman 01f7dcdc3f trunk-tracking: minor style fix 2013-03-18 11:39:31 -04:00
Jeff Kaufman 140800bf4d trunk-tracking: include-what-you-use add set include 2013-03-18 11:38:13 -04:00
Jeff Kaufman d85d47746a trunk-tracking: include-what-you-use add vector include 2013-03-18 11:37:16 -04:00
Jeff Kaufman 9ccb1658f6 trunk-tracking: removed unneeded import 2013-03-18 11:36:05 -04:00
Jeff Kaufman 46055b400a Merge pull request #187 from pagespeed/oschaaf-fix-message-handler-initializer
fix-message-handler-intializer: add log_ to the list
2013-03-12 13:04:14 -07:00
Otto van der Schaaf 606d011812 fix-message-handler-intializer: add log_ to the list 2013-03-12 19:56:52 +01:00
Maks Orlovich 456d5e0f92 Quick hack to not violate the ODR.
Having two classes with the same name in a single ELF binary is
extremely risky.
2013-03-11 09:46:18 -04:00
Maks Orlovich 3f6d261684 SHM metadata cache support.
This will eventually get removed, too, in favor of generic code.
Note: the cache needs to be fairly large to pass the tests.
2013-03-11 09:44:08 -04:00
Maks Orlovich f303e953c5 Merge branch 'master' of git://github.com/pagespeed/ngx_pagespeed into morlovich-trunk-tracking-with-system
Resolves quite some conflicts by hand, so rather error-prone.
2013-03-08 17:33:03 -05:00
Maks Orlovich 14587fc63b Update to master API changes
In particular, it expects NewServerContext to be overriden, even if
in a non-callable way, and ProxiesHtml() to be implemented.
2013-03-08 15:59:45 -05:00
Jeff Kaufman e081fff031 shared-mem-locks: clean up shared memory segments
This wires up cleanup code shared memory segments.
It uses slightly modified copies of pthread_shared_mem.cc/h, containing a change
proposal to support our ordering of events during a configuration reload.

It can be tested and reviewed through this branch.

I did some extensive tests, it seems segment cleanup is not perfect yet
(segments for named locks, per vhost statistics segments). I think we need to
fix that in the trunk-tracking branch or in a separate pull though. It seems the
current trunk of psol has improvements that may fix this, and fixing it in this
pull will make it larger and more complex then I would like it to be.

Squash-merge of Otto's #179.
2013-03-06 10:02:29 -05:00
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