Commit Graph

45 Commits

Author SHA1 Message Date
Jud Porter a668eafc38 Remove unnecessary cc sources from config. 2013-06-10 10:30:20 -04:00
Jud Porter 7e9c6b2dbc Add CFLAGS to fix OpenSSL linker error. 2013-06-10 10:30:20 -04:00
Jud Porter d9c19b98b7 Fix paths for files moved from apache/ to system/ 2013-06-10 10:30:20 -04:00
Jeff Kaufman 6da81d760d ngx-list-iterator: Make it easier to iterate over headers. Fixes #359. 2013-05-29 13:43:35 -04:00
Jeff Kaufman b557a56613 readme: mark as release 1.5.27.3 2013-05-16 11:51:23 -04:00
Otto van der Schaaf 514117142f gzip-and-etags: prevent gzip from clearing our weak etags 2013-05-07 12:13:13 +02:00
Jeff Kaufman 9f7978da27 readme: installation instructions 2013-04-29 11:08:23 -04:00
Jud Porter 32e0c3c0b7 Add google-sparehash include paths. 2013-04-26 15:26:16 -04:00
Jeff Kaufman 1426e918a8 system: roll back fd optimization 2013-04-26 15:26:16 -04:00
chaizhenhua d9abb1d666 Reduce fd usage, support convert_meta_tags
This reduced fd usage in NgxBaseFetch, and fixes support for convert_meta_tags

Fixes https://github.com/pagespeed/ngx_pagespeed/issues/56

Squash merge of chaizhenhua's https://github.com/pagespeed/ngx_pagespeed/pull/241

Conflicts:
	src/ngx_pagespeed.cc
2013-04-24 13:01:24 +02:00
Jeff Kaufman 66c177c3b2 logging: properly interpret google-style LOG() levels 2013-04-15 14:46:09 -04:00
Jeff Kaufman 14ace06078 fetcher: add native fetcher
Squash-merge of Junmin's #24.
2013-04-12 17:41:20 -04:00
Jeff Kaufman f3cc1a432e ssi: fix handling of server side includes
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.
2013-04-10 12:36:14 -04:00
Jeff Kaufman aad3f2c0ea housekeeping: we updated the binaries, so we don't need to keep these copies 2013-04-04 09:24:12 -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
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
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
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
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 7ee11fcbe5 trunk-sync: we now depend on re2 2013-01-23 14:21:09 -05:00
Jeff Kaufman 2056e919c4 config: fix line continuation bug 2013-01-22 12:54:18 -05:00
Jeff Kaufman 632973caed config: interpret amd64, i686, and i386 2013-01-21 17:18:45 -05:00
Jeff Kaufman b042efc2d0 threads: CHECK-fail on threads started before forking 2013-01-15 12:34:58 -05:00
Jeff Kaufman 27e093b365 remove stray fi 2013-01-10 15:29:12 -05:00
Jeff Kaufman 35dd83397e psol: support a binary distribution
We want people to be able to install ngx_pagespeed like any other nginx module.
If PSOL were a full-fledged library with a stable interface we could simply say
"install PSOL" which might be as easy as `apt-get install psol-dev`, but it's
not.  Instead we directly include a precompiled binary library along with its
headers.  By building the binaries on something sufficiently old (Centos 5.4)
they should work pretty much everywhere someone might think to run
ngx_pagespeed, but building from source is still a documented option if they
don't.

Headers and binaries are from trunk of r2338, as documented in the READMEs.
2013-01-04 13:15:34 -05:00
Weibin Yao 939d6046d3 added the header file dependences to ngx_pagespeed 2012-12-07 22:42:27 +08:00
Ben Noordhuis c5f061689a build: fix debug/release library linking 2012-12-04 07:50:44 +01:00
Jeff Kaufman 4b59d8badf caching: support memcached
Merge in Otto's #65 porting the apache memcached implementation to nginx.
2012-11-28 15:44:05 -05:00
Jeff Kaufman d41c90bad7 Merge pull request #31 from pagespeed/bnoordhuis-spinlocks
ngx_base_fetch: implement locking
2012-11-26 14:22:19 -08:00
Ben Noordhuis 4aad27ccf9 ngx_base_fetch: implement locking 2012-11-21 20:09:03 +01:00
Ben Noordhuis 51de81b123 build: link against debug libs if NGX_DEBUG=YES
Link against the debug versions of the mod_pagespeed libraries when nginx is
configured with --with-debug.

Requires that said libraries have been pre-built with BUILDTYPE=Debug.
2012-11-21 19:37:04 +01:00
Otto van der Schaaf d12508b12d apr: include headers in a portable manner 2012-11-20 15:21:56 +01:00
Jeff Kaufman aeb0de0e77 configuration: prepare to parse options
Set up the background code for connecting pagespeed configuration structures
(RewriteOptions) to the companion nginx ones.  Passes all the actual work
through to NgxRewriteOptions::ParseAndSetOptions which isn't written yet.
(All it does so far is interpret "pagespeed on/off".)

Adding nginx subclasses of RewriteOptions and ServerContext are a bit overkill
for this change, but we're going to need them a lot.

Once configuration is complete, any mod_pagespeed configuration directive should
work in ngx_pagespeed:

    mod_pagespeed.conf:
      ModPagespeedEnableFilters collapse_whitespace
      ModPagespeedRunExperiment on
      ModPagespeedExperimentSpec id=3;percent=50;default
      ModPagespeedExperimentSpec id=4;percent=50

    ngx_pagespeed.conf:
      pagespeed ModPagespeedEnableFilters collapse_whitespace
      pagespeed ModPagespeedRunExperiment on;
      pagespeed ModPagespeedExperimentSpec "id=3;percent=50;default";
      pagespeed ModPagespeedExperimentSpec "id=4;percent=50";

The `ModPagespeed` is optional, and discouraged:

    ngx_pagespeed.conf:
      pagespeed EnableFilters collapse_whitespace
      pagespeed RunExperiment on;
      pagespeed ExperimentSpec "id=3;percent=50;default";
      pagespeed ExperimentSpec "id=4;percent=50";
2012-11-13 10:26:41 -05:00
Otto van der Schaaf b1eb547275 apr and serf: link in apr, apr-utils, and serf
- Links in apr, apr-utils, and serf.
- Replaces the wget fetcher with serf, which will be replaced later
on with the native fetcher.
2012-11-09 22:29:51 +01:00
Jeff Kaufman b9fff21986 Rewrite pages asynchronously (branch jefftk-async-rewrite, pull request 11). 2012-11-01 10:31:12 -04:00
Jeff Kaufman 1766acbffb Support Blocking Rewrite Flow
Run all responses through PSOL's rewriter in a blocking manner. While eventually we need to be using the asynchronous rewriting interface, this is a simple proof of concept. In test/expected/test.html you can see the effect of running this code on test/www/test/html
2012-10-18 10:18:05 -04:00
Ben Noordhuis 775cc36de6 build: adapt link order to -Wl,--as-needed 2012-10-10 17:34:55 +02:00
Jeff Kaufman a531e56e96 add include dir for version string 2012-10-02 11:43:39 -04:00
Jeff Kaufman fbec99cbaf actually link against pagespeed_automatic.a, and properly test we're doing so 2012-10-02 11:30:47 -04:00
Jeff Kaufman 8d0decb332 no need for dirname/BASH_SOURCE hack -- can use ngx_addon_dir 2012-10-01 15:10:56 -04:00
Jeff Kaufman cff21ace3a Merged in changes from jefftk-experimental to:
- link in psol
 - manipulate the buffer chain to add a 'processed by us' comment
 - use chunked encoding to we don't have to update the headers when
   we change the length of the request
 - use c++ for the module
2012-10-01 14:43:23 -04:00
Ben Noordhuis 64a66cfb07 skeleton ngx_pagespeed module 2012-06-23 22:13:06 +02:00