File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -492,6 +492,11 @@ int HttpHandler::HandleHttpRequest() {
492492 }
493493 }
494494 }
495+ // Handle HTTP_STATUS_CLOSE: close connection without response
496+ if (status_code == HTTP_STATUS_CLOSE) {
497+ state = WANT_CLOSE;
498+ return HTTP_STATUS_CLOSE;
499+ }
495500 if (fc) {
496501 pResp->content = fc->filebuf .base ;
497502 pResp->content_length = fc->filebuf .len ;
@@ -501,12 +506,10 @@ int HttpHandler::HandleHttpRequest() {
501506 }
502507 if (service->postprocessor ) {
503508 status_code = customHttpHandler (service->postprocessor );
504- }
505-
506- // Handle HTTP_STATUS_CLOSE: close connection without response
507- if (status_code == HTTP_STATUS_CLOSE) {
508- state = WANT_CLOSE;
509- return HTTP_STATUS_CLOSE;
509+ if (status_code == HTTP_STATUS_CLOSE) {
510+ state = WANT_CLOSE;
511+ return HTTP_STATUS_CLOSE;
512+ }
510513 }
511514
512515 if (writer && writer->state != hv::HttpResponseWriter::SEND_BEGIN) {
You can’t perform that action at this time.
0 commit comments