File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -482,6 +482,11 @@ int HttpHandler::HandleHttpRequest() {
482482 }
483483
484484postprocessor:
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 }
You can’t perform that action at this time.
0 commit comments