소스 검색

Fixed problem with content length 0.

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

+ 1 - 5
httplib.h

@@ -404,11 +404,7 @@ inline void write_headers(FILE* fp, const T& res)
 
     auto t = get_header_value(res.headers, "Content-Type", "text/plain");
     fprintf(fp, "Content-Type: %s\r\n", t);
-
-    if (!res.body.empty()) {
-        fprintf(fp, "Content-Length: %ld\r\n", res.body.size());
-    }
-
+    fprintf(fp, "Content-Length: %ld\r\n", res.body.size());
     fprintf(fp, "\r\n");
 }