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

Commit

Permalink
Revert "Revert "Handle DoneAndSetHeaders() new second argument that w…
Browse files Browse the repository at this point in the history
…ants to know whether the response is complete.""

Needed for 1.9.32.6 to build.

This reverts commit 19ebf69.
  • Loading branch information
jeffkaufman committed Jul 30, 2015
1 parent 30fdd02 commit 0f3f268
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ngx_pagespeed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1709,8 +1709,8 @@ void ps_release_request_context(void* data) {
}

if (ctx->recorder != NULL) {
ctx->recorder->Fail();
ctx->recorder->DoneAndSetHeaders(NULL); // Deletes recorder.
// Deletes recorder.
ctx->recorder->DoneAndSetHeaders(NULL, false /* incomplete response */);
ctx->recorder = NULL;
}

Expand Down Expand Up @@ -2506,7 +2506,9 @@ ngx_int_t ps_in_place_body_filter(ngx_http_request_t* r, ngx_chain_t* in) {
if (cl->buf->last_buf || recorder->failed()) {
ResponseHeaders response_headers;
copy_response_headers_from_ngx(r, &response_headers);
ctx->recorder->DoneAndSetHeaders(&response_headers);
ctx->recorder->DoneAndSetHeaders(
&response_headers,
cl->buf->last_buf /* response is complete if last_buf is set */);
ctx->recorder = NULL;
break;
}
Expand Down

0 comments on commit 0f3f268

Please sign in to comment.