소스 검색

Code cleanup

yhirose 2 년 전
부모
커밋
c30906a541
1개의 변경된 파일2개의 추가작업 그리고 7개의 파일을 삭제
  1. 2 7
      httplib.h

+ 2 - 7
httplib.h

@@ -6262,15 +6262,10 @@ Server::process_request(Stream &strm, bool close_connection,
   if (!line_reader.getline()) { return false; }
 
   Request req;
-  Response res;
 
+  Response res;
   res.version = "HTTP/1.1";
-
-  for (const auto &header : default_headers_) {
-    if (res.headers.find(header.first) == res.headers.end()) {
-      res.headers.insert(header);
-    }
-  }
+  res.headers = default_headers_;
 
 #ifdef _WIN32
   // TODO: Increase FD_SETSIZE statically (libzmq), dynamically (MySQL).