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

Commit

Permalink
prevent crash from CHECK fail in SetAcceptsGzip()
Browse files Browse the repository at this point in the history
this change prevents double writes to SetAcceptsGzip()
  • Loading branch information
crowell authored and jeffkaufman committed Dec 15, 2015
1 parent 99b86b6 commit 0f77262
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/instaweb/rewriter/rewrite_driver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,10 @@ void RewriteDriver::PopulateRequestContext() {
if ((request_context_.get() != NULL && (request_headers_ != NULL))) {
request_context_->SetAcceptsWebp(
request_properties_->SupportsWebpRewrittenUrls());
request_context_->SetAcceptsGzip(request_properties_->AcceptsGzip());
request_context_->Freeze();
if (!request_context_->frozen()) {
request_context_->SetAcceptsGzip(request_properties_->AcceptsGzip());
request_context_->Freeze();
}
}
}

Expand Down

0 comments on commit 0f77262

Please sign in to comment.