hewei.it 4 years ago
parent
commit
cc20b66830
1 changed files with 3 additions and 0 deletions
  1. 3 0
      http/server/HttpHandler.cpp

+ 3 - 0
http/server/HttpHandler.cpp

@@ -20,6 +20,9 @@ int HttpHandler::HandleHttpRequest() {
 
 preprocessor:
     state = HANDLE_BEGIN;
+    if (writer) {
+        writer->Begin();
+    }
     if (service->preprocessor) {
         status_code = service->preprocessor(pReq, pResp);
         if (status_code != 0) {