Permalink
Browse files

prevent crash from CHECK fail in SetAcceptsGzip()

this change prevents double writes to SetAcceptsGzip()
  • Loading branch information...
crowell authored and jeffkaufman committed Dec 15, 2015
1 parent 99b86b6 commit 0f772622b8f315884f5f9dc79b3e0b58d8ee31cf
Showing with 4 additions and 2 deletions.
  1. +4 −2 net/instaweb/rewriter/rewrite_driver.cc
@@ -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();
}
}
}

0 comments on commit 0f77262

Please sign in to comment.