Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Clean the response headers when sending kNotInCache
Browse files Browse the repository at this point in the history
When we send out a 501 in the IPRO path for a http cache
hit, clear the response headers so we do not leave
behind stray headers.

Fixes #1496
  • Loading branch information
oschaaf committed Feb 16, 2017
1 parent 9394a38 commit 2887e52
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/instaweb/rewriter/in_place_rewrite_context.cc
Expand Up @@ -139,6 +139,7 @@ void RecordingFetch::HandleHeadersComplete() {
// kNotInCacheStatus instead to fall back to the server's native method of
// serving the url and indicate we do want it recorded.
if (!response_headers()->IsErrorStatus()) {
response_headers()->Clear();
response_headers()->set_status_code(
CacheUrlAsyncFetcher::kNotInCacheStatus);
}
Expand Down

0 comments on commit 2887e52

Please sign in to comment.