Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit 0f77262

Browse files
crowelljeffkaufman
authored andcommitted
prevent crash from CHECK fail in SetAcceptsGzip()
this change prevents double writes to SetAcceptsGzip()
1 parent 99b86b6 commit 0f77262

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

net/instaweb/rewriter/rewrite_driver.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,10 @@ void RewriteDriver::PopulateRequestContext() {
311311
if ((request_context_.get() != NULL && (request_headers_ != NULL))) {
312312
request_context_->SetAcceptsWebp(
313313
request_properties_->SupportsWebpRewrittenUrls());
314-
request_context_->SetAcceptsGzip(request_properties_->AcceptsGzip());
315-
request_context_->Freeze();
314+
if (!request_context_->frozen()) {
315+
request_context_->SetAcceptsGzip(request_properties_->AcceptsGzip());
316+
request_context_->Freeze();
317+
}
316318
}
317319
}
318320

0 commit comments

Comments
 (0)