-
Notifications
You must be signed in to change notification settings - Fork 363
Conversation
- Add fix_headers filter
extract function ps_base_fetch_filter_init()
now the following test failed with
|
@chaizhenhua I will have a go at figuring out why the IPRO tests still fail |
Test 'WGET_ARGS="--header='X-PSA-Blocking-Rewrite:psatest'"` [1] nginx marks the resulting request header as invalid as it gets send wrapped in single quotes: [1] https://code.google.com/p/modpagespeed/source/browse/trunk/src/install/system_test.sh#99 |
Testing again - this doesn't fix the failing test for us (though removing the single quotes does stop nginx's complaints about invalid headers) |
@chaizhenhua |
@chaizhenhua In a few hours, I will look some more at it, and hopefully figure out why |
Adding a little hack to add the current date instead for that, it now fails on something else. |
@chaizhenhua It passes 2/3 ipro tests (and all other tests), but doesn't fix the missing date header properly yet. |
@chaizhenhua |
@oschaaf that's great! Is config file |
@chaizhenhua Yes - I think that indeed is a remaining problem - looking at that. When I re-enable |
@chaizhenhua Updated to work with InPlaceResourceOptimization enabled globally. |
- Enable InPlaceResourceOptimization only in the required location - Hand over the response headers we received to our InPlaceResourceRecorder - Invent and pass in a Date response header set to the current date to the InPlaceResourceRecorder, if none is given. - Set the appropriate expire configuration in the test configuration as required to enable ipro and pass the tests - Port handle_error_ from ApacheProxyFetch - Update the 'blocking rewrite enabled' tests expectations for IPRO
IPRO: make it pass all tests
Before this will compile against the 1.6.29.3 distribution of psol we need to start shipping |
Squash-merge of chaizhenhua's work over many pull requests, especially #450. The copy of in_place_resource_recorder.cc is temporary and can be removed after the next PSOL release.
Merged as ad6429d |
In testing this on jefftk.com it looks like there's a problem with duplicate gzip headers. Most of the time pages load normally and have headers like:
But sometimes I'll get:
And Chrome will report Where is the second gzip header coming from? |
(Manually removing the second gzip header and testing with netcat as the server, this fixes the problem. So the question is, why are their two headers?) |
I've now set up http://www.jefftk.com:8091 with IPRO enabled for testing. |
Hi Jeff, You can print the debug log to check when the duplicate gzip header is inserted. |
The reason it's being served as cachable is that I have The duplicate gzip headers are consistently showing up on the second time I load a page:
And:
They also continue showing up once they've done that once. |
@jeffkaufman
Are we copying over the gzip header there? |
@jeffkaufman This is bacause |
@chaizhenhua setting
(I'm still not sure why there's not an etag on the first load but there is on later loads.) You had also suggested disabling |
I think I see why: my patch above makes it so we don't have a duplicate gzip header, but it means the output claims to be gzip encoded when it's actually plain. |
|
How do we disable |
We should move the discussion off this closed pull request. I've created a bug: #456 |
return NGX_ERROR; | ||
} | ||
|
||
ctx->base_fetch->SetRequestHeadersTakingOwnership(request_headers.release()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I make a debug build I get a check failure here. The code in question is in async_fetch.cc:set_request_headers
:
DCHECK(!owns_request_headers_);
if (owns_request_headers_) {
delete request_headers_;
}
request_headers_ = headers;
owns_request_headers_ = false;
(SetRequestHeadersTakingOwnership
first calls set_request_headers
and then sets owns_request_headers_ = true
.)
It looks like ctx->base_fetch
already has request headers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a BaseFetch is constructed it calls PopulateRequestHeaders
which calls copy_request_headers_from_ngx
. This used to make sense but doesn't anymore because now in the only place where we create a BaseFetch we immediately set request headers in a different way. I'll fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeffkaufman This is a bug, we should remove the line PopulateRequestHeaders
https://github.com/pagespeed/ngx_pagespeed/blob/12b57f3bd550be748e9fa08cda9a99513741c2d7/src/ngx_base_fetch.cc#L43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeffkaufman #461 already fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's also fixed in #484 (merged)
No description provided.