Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f8b87ea436 | |||
| 86d840f76e | |||
| 0110d33fa7 | |||
| 497594ba7f | |||
| 6db4d02a91 | |||
| 1354cee4ed |
@@ -37,11 +37,11 @@ recompiling Tengine](https://github.com/pagespeed/ngx_pagespeed/wiki/Using-ngx_p
|
||||
|
||||
```bash
|
||||
$ cd ~
|
||||
$ wget https://github.com/pagespeed/ngx_pagespeed/archive/v1.7.30.2-beta.zip
|
||||
$ unzip v1.7.30.2-beta.zip # or unzip v1.7.30.2-beta
|
||||
$ cd ngx_pagespeed-1.7.30.2-beta/
|
||||
$ wget https://dl.google.com/dl/page-speed/psol/1.7.30.2.tar.gz
|
||||
$ tar -xzvf 1.7.30.2.tar.gz # expands to psol/
|
||||
$ wget https://github.com/pagespeed/ngx_pagespeed/archive/v1.7.30.4-beta.zip
|
||||
$ unzip v1.7.30.4-beta.zip # or unzip v1.7.30.4-beta
|
||||
$ cd ngx_pagespeed-1.7.30.4-beta/
|
||||
$ wget https://dl.google.com/dl/page-speed/psol/1.7.30.4.tar.gz
|
||||
$ tar -xzvf 1.7.30.4.tar.gz # expands to psol/
|
||||
```
|
||||
|
||||
3. Download and build nginx:
|
||||
@@ -51,7 +51,7 @@ recompiling Tengine](https://github.com/pagespeed/ngx_pagespeed/wiki/Using-ngx_p
|
||||
$ wget http://nginx.org/download/nginx-1.4.4.tar.gz
|
||||
$ tar -xvzf nginx-1.4.4.tar.gz
|
||||
$ cd nginx-1.4.4/
|
||||
$ ./configure --add-module=$HOME/ngx_pagespeed-1.7.30.2-beta
|
||||
$ ./configure --add-module=$HOME/ngx_pagespeed-1.7.30.4-beta
|
||||
$ make
|
||||
$ sudo make install
|
||||
```
|
||||
@@ -94,7 +94,7 @@ To confirm that the module is loaded, fetch a page and check that you see the
|
||||
|
||||
```bash
|
||||
$ curl -I 'http://localhost:8050/some_page/' | grep X-Page-Speed
|
||||
X-Page-Speed: 1.7.30.2-...
|
||||
X-Page-Speed: 1.7.30.4-...
|
||||
```
|
||||
|
||||
Looking at the source of a few pages you should see various changes, such as
|
||||
|
||||
@@ -27,8 +27,8 @@ if [ "$mod_pagespeed_dir" = "unset" ] ; then
|
||||
echo " You need to separately download the pagespeed library:"
|
||||
echo ""
|
||||
echo " $ cd /path/to/ngx_pagespeed"
|
||||
echo " $ wget https://dl.google.com/dl/page-speed/psol/1.7.30.2.tar.gz"
|
||||
echo " $ tar -xzvf 1.7.30.2.tar.gz # expands to psol/"
|
||||
echo " $ wget https://dl.google.com/dl/page-speed/psol/1.7.30.4.tar.gz"
|
||||
echo " $ tar -xzvf 1.7.30.4.tar.gz # expands to psol/"
|
||||
echo ""
|
||||
echo " Or see the installation instructions:"
|
||||
echo " https://github.com/pagespeed/ngx_pagespeed#how-to-build"
|
||||
|
||||
@@ -2175,6 +2175,7 @@ ngx_int_t ps_in_place_check_header_filter(ngx_http_request_t* r) {
|
||||
// (or at least a note that it cannot be cached stored there).
|
||||
// We do that using an Apache output filter.
|
||||
ctx->recorder = new InPlaceResourceRecorder(
|
||||
RequestContextPtr(cfg_s->server_context->NewRequestContext(r)),
|
||||
url,
|
||||
request_headers.release(),
|
||||
options->respect_vary(),
|
||||
@@ -2238,7 +2239,9 @@ ngx_int_t ps_in_place_body_filter(ngx_http_request_t* r, ngx_chain_t* in) {
|
||||
// Unlike in Apache we get the final response headers before we get the
|
||||
// content. This means we can consider them earlier and abort the
|
||||
// request if need be without buffering everything.
|
||||
recorder->ConsiderResponseHeaders(ctx->ipro_response_headers);
|
||||
recorder->ConsiderResponseHeaders(
|
||||
InPlaceResourceRecorder::kPreliminaryHeaders,
|
||||
ctx->ipro_response_headers);
|
||||
}
|
||||
|
||||
for (ngx_chain_t* cl = in; cl; cl = cl->next) {
|
||||
|
||||
Reference in New Issue
Block a user