Handle DoneAndSetHeaders() new second argument that wants to know whether the response is complete.
This commit is contained in:
@@ -1602,8 +1602,8 @@ void ps_release_request_context(void* data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->recorder != NULL) {
|
if (ctx->recorder != NULL) {
|
||||||
ctx->recorder->Fail();
|
// Deletes recorder.
|
||||||
ctx->recorder->DoneAndSetHeaders(NULL); // Deletes recorder.
|
ctx->recorder->DoneAndSetHeaders(NULL, false /* incomplete response */);
|
||||||
ctx->recorder = NULL;
|
ctx->recorder = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2400,7 +2400,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()) {
|
if (cl->buf->last_buf || recorder->failed()) {
|
||||||
ResponseHeaders response_headers;
|
ResponseHeaders response_headers;
|
||||||
copy_response_headers_from_ngx(r, &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;
|
ctx->recorder = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user