From 1f52c727ca0ac9aab9a7f53a0d7649c6d38f70b2 Mon Sep 17 00:00:00 2001 From: xia-chu <771730766@qq.com> Date: Sun, 7 Feb 2021 22:56:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/HttpSession.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/HttpSession.cpp b/src/Http/HttpSession.cpp index 7b2ff254..c8df9de7 100644 --- a/src/Http/HttpSession.cpp +++ b/src/Http/HttpSession.cpp @@ -537,7 +537,7 @@ void HttpSession::sendResponse(int code, headerOut.emplace(kAccessControlAllowCredentials, "true"); } - if(!no_content_length && size >= 0 && size < SIZE_MAX){ + if(!no_content_length && size >= 0 && (size_t)size < SIZE_MAX){ //文件长度为固定值,且不是http-flv强制设置Content-Length headerOut[kContentLength] = to_string(size); }