1137 Commits

Author SHA1 Message Date
Jeff Kaufman 98d404d707 headers: strip accept-bytes and vary-accept-encoding
If we're proxying the origin server might advertise `Accept-Ranges: bytes` but
we don't support range requests.  So we need to remove the header.  We also need
to not add `Vary: Accept-Encoding` twice, and because the gzip encoding will add
it later we need to remove it here.
2013-01-17 14:54:19 -05:00
Jeff Kaufman bf6a95ee1a readme: you can't send Accept-Encoding to an upstream 2013-01-16 17:13:08 -05:00
Jeff Kaufman df04cb1119 readme: document dependencies 2013-01-16 14:58:34 -05:00
Jeff Kaufman f80faa6016 readme: tidy link to mps build from source 2013-01-16 11:38:05 -05:00
Jeff Kaufman 111c354d65 readme: what to do if configure fails 2013-01-16 11:36:30 -05:00
Jeff Kaufman 87b4faa038 slow_worker: reenable slow worker for the file cache
The file cache needs a slow worker or it will never run the cleanup code.  In
configurations with multiple server blocks, like jefftk.com, the rewrite
driver factory could cause a a segfault by deleting the slow worker when setting
up caches.  So this fixes #126.
2013-01-15 15:33:43 -05:00
Jeff Kaufman b042efc2d0 threads: CHECK-fail on threads started before forking 2013-01-15 12:34:58 -05:00
Jeff Kaufman fc5ac99895 load-from-file: port load-from-file
load-from-file is helpful in may setups, and also is used in many
vhosts in the test configuration

Squash-merge of Otto's change via pull request #125
2013-01-15 10:04:08 -05:00
Jeff Kaufman 02dd432ac1 Revert "filecache-worker: hook the worker up to the filecache"
This is causing segfaults on jefftk.com.

This reverts commit 6f927897ec.
2013-01-11 10:16:42 -05:00
Jeff Kaufman d310f9d326 readme: run configure from nginx/ not nginx/src/ 2013-01-10 15:30:52 -05:00
Jeff Kaufman 27e093b365 remove stray fi 2013-01-10 15:29:12 -05:00
Jeff Kaufman 77fd3105eb readme: put valgrind doc in the right section of the config 2013-01-09 15:44:36 -05:00
Jeff Kaufman b7b4b822b5 Merge pull request #124 from pagespeed/jefftk-leak
options: delete on process exit
2013-01-09 12:42:11 -08:00
Jeff Kaufman 99d5017c8f document testing with valgrind 2013-01-09 15:41:49 -05:00
Jeff Kaufman ead1bd7eef options: delete on process exit 2013-01-09 15:35:09 -05:00
Jeff Kaufman 50f2ab4c2b readme: be consistent with debug usage 2013-01-09 14:44:24 -05:00
Jeff Kaufman f1d965bb4a Merge branch 'master' of github.com:pagespeed/ngx_pagespeed 2013-01-09 14:37:55 -05:00
Jeff Kaufman 48adc8a6e1 readme: svn commands need to be run under src/ 2013-01-09 14:31:32 -05:00
Jeff Kaufman 0b585d8aa7 Merge pull request #119 from pagespeed/jefftk-binary-psol
psol: support a binary distribution
2013-01-09 11:30:38 -08:00
Jeff Kaufman ded5935099 Merge pull request #123 from pagespeed/jefftk-leak
options: don't leak custom options
2013-01-09 09:47:42 -08:00
Jeff Kaufman 48383c9d08 options: don't leak custom options 2013-01-09 11:32:56 -05:00
Jeff Kaufman 3ab41ea48a Merge pull request #121 from pagespeed/jefftk-leak
base fetch: fix two memory leaks, one severe and one potential
2013-01-08 14:32:42 -08:00
Jeff Kaufman 377917c5d0 base fetch: fix two memory leaks, one severe and one potential 2013-01-08 15:58:02 -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
Jeff Kaufman 1a38573bf9 document building against r2338 2013-01-04 10:53:32 -05:00
Jeff Kaufman 0064a4534d Merge pull request #117 from pagespeed/oschaaf-filecache-worker
filecache: pass in a slow worker during construction
2013-01-02 13:24:24 -08:00
Otto van der Schaaf 6f927897ec filecache-worker: hook the worker up to the filecache 2012-12-28 23:25:28 +01:00
Jeff Kaufman 6d267cba83 headers: set X-Page-Speed properly
We weren't respecting the XHeaderValue configuration option.  If someone sets:

    pagespeed XHeaderValue "ngx_pagespeed";

We should see:

    ...
    Cache-Control: max-age=0, no-cache
    X-Page-Speed: ngx_pagespeed
    ...

Before we were only respecting it for .pagespeed. resources.

Fixes #115
2012-12-28 10:28:17 -05:00
Jeff Kaufman 69183bb271 Merge pull request #112 from pagespeed/jefftk-map-proxy-domain
options: support MapProxyDomain
2012-12-28 07:11:02 -08:00
Jeff Kaufman 9f4e44881b update project status 2012-12-20 15:41:44 -05:00
Jeff Kaufman aaeec07f16 readme: keep it up to date with recent code changes, some rephrasing 2012-12-19 17:02:34 -05:00
Jeff Kaufman 2613c04e01 docs: minor edits 2012-12-19 11:47:03 -05:00
Jeff Kaufman 8f64b36681 base fetch: add Release() and reference counting
When a request is cancelled part way through nginx calls the cleanup
handler. This was set to delete the base fetch, but the proxy fetch was
sometimes not done with it yet.  Both nginx and pagespeed must be finished with
the base fetch before it's safe to delete it.  Pagespeed calls Done(), and this
adds Release() for nginx to call.  Whichever is called second deletes the
base_fetch.  We use a count of references that starts at two and is decremented
atomically with a memory barrier once when Done() is called and once when
Release() is called.

Fixes #103, #104, and #106.
2012-12-19 11:36:58 -05:00
Jeff Kaufman 9ab64ba3df update docs 2012-12-19 11:10:20 -05:00
Jeff Kaufman 814e0c18f2 rewrite driver factory: start a scheduler thread
Because we're a non-blocking server we need to run a scheduler thread or else
alerts we set might not fire.  We need to be careful to start it after we fork.

Better long term would be to use an nginx timer and avoid the extra thread;
tracking this in #111.

Fixes #55
2012-12-19 10:59:04 -05:00
Jeff Kaufman 3e6523d915 Merge pull request #113 from pagespeed/oschaaf-cache-fixup
cache: fixes
2012-12-19 07:56:12 -08:00
Otto van der Schaaf 6977f12e79 cache: fixes
- restores slow worker initialization/termination
- amend an error I apparently made while rebasing to head:
    - do not null the lru cache when using memcached (accidentally
      left in)
    - remove debug fprintf's
    - remove comment about virtual hosts
    - restore a TODO
    - abort when memcached is configure and we fail to connect
      to the memcached interface
2012-12-18 18:10:49 +01:00
Jeff Kaufman 5f0e504447 options: support mapProxyDomain 2012-12-18 11:49:56 -05:00
Jeff Kaufman eeb006df2a Merge pull request #110 from pagespeed/jefftk-request-context
request context: deal with changes in pagespeed's api
2012-12-17 13:28:55 -08:00
Jeff Kaufman 9cd5f3b19c request context: deal with changes in pagespeed's api
The pagespeed api for handling logs has changed, we need to change with it in
order to build against the latest pagespeed optimization libraries.

Separately, a new test was added to the generic system test that depends on the
property cache (insert_dns_prefetch).  We've not ported the property cache yet,
so this test will fail, and I've added it to the list of failing tests.
2012-12-17 10:57:18 -05:00
Jeff Kaufman 599578f2b5 install docs: make more thorough 2012-12-14 17:10:37 -05:00
Jeff Kaufman ce91fe670f configuration: document content priority workaround 2012-12-14 11:44:07 -05:00
Jeff Kaufman e6d1937e68 process-shutdown
Merge of Otto's pull request #105:

  This wires up and executes cleanup code.

  There is an issue when sending SIGTERM to a worker under high load, I will
  create a separate issue for that. Normal shutdowns and reloads are working.

Fixes #84.

The issue with workers under high load is #109.
2012-12-14 10:25:11 -05:00
Jeff Kaufman 8676bcc335 Merge pull request #101 from yaoweibin/add_deps
added the header file dependences to ngx_pagespeed
2012-12-10 08:31:40 -08:00
Jeff Kaufman 40910e7965 Merge pull request #100 from pagespeed/jefftk-fetch-proxy
fetch: support proxy
2012-12-07 13:08:33 -08:00
Weibin Yao 939d6046d3 added the header file dependences to ngx_pagespeed 2012-12-07 22:42:27 +08:00
Jeff Kaufman 0a21a1d880 fetch: support proxy
Example:
    pagespeed FetchProxy        127.0.0.1:8081;

With a proxy set the fetcher will send all outside requests through the proxy.
Like ModPagespeedFetchProxy, this is intended to be used for load tests.

For now, this must be set in the 'http' block.

Fixes #98, and is needed for #41.
2012-12-06 16:44:02 -05:00
Ben Noordhuis c5f061689a build: fix debug/release library linking 2012-12-04 07:50:44 +01:00
Jeff Kaufman 8198033f89 readme: minor typos 2012-11-30 17:17:40 -05:00
Jeff Kaufman 45fb3c4254 create request context: keep parsed and string urls in sync
ServerContext::GetQueryOptions modifies the url passed to it, removing any
ModPagespeedFoo=Bar query parameters.  CreateNewProxyFetch needs that modified
url but we were giving it the unmodified one.

Fixes #83
2012-11-30 17:17:40 -05:00