Skip to content

Commit a80a536

Browse files
authored
Refactor postprocessor variable name for clarity
1 parent 1f20654 commit a80a536

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

http/server/HttpHandler.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,11 @@ int HttpHandler::HandleHttpRequest() {
482482
}
483483

484484
postprocessor:
485+
// Handle HTTP_STATUS_CLOSE: close connection without response
486+
if (status_code == HTTP_STATUS_CLOSE) {
487+
state = WANT_CLOSE;
488+
return HTTP_STATUS_CLOSE;
489+
}
485490
if (status_code >= 100 && status_code < 600) {
486491
pResp->status_code = (http_status)status_code;
487492
if (pResp->status_code >= 400 && pResp->body.size() == 0 && pReq->method != HTTP_HEAD) {
@@ -504,8 +509,8 @@ int HttpHandler::HandleHttpRequest() {
504509
pResp->headers["Etag"] = fc->etag;
505510
}
506511
if (service->postprocessor) {
507-
int pp_status_code = customHttpHandler(service->postprocessor);
508-
if (pp_status_code == HTTP_STATUS_CLOSE) {
512+
int post_status_code = customHttpHandler(service->postprocessor);
513+
if (post_status_code == HTTP_STATUS_CLOSE) {
509514
state = WANT_CLOSE;
510515
return HTTP_STATUS_CLOSE;
511516
}

0 commit comments

Comments
 (0)