Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
db5e538f
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
db5e538f
编写于
12月 04, 2019
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove some logs
上级
ee33d784
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
8 deletion
+7
-8
src/modules/http/src/httpHandle.c
src/modules/http/src/httpHandle.c
+3
-4
src/modules/http/src/httpServer.c
src/modules/http/src/httpServer.c
+4
-4
未找到文件。
src/modules/http/src/httpHandle.c
浏览文件 @
db5e538f
...
...
@@ -279,8 +279,7 @@ bool httpReadChunkedBody(HttpContext* pContext, HttpParser* pParser) {
httpParseChunkedBody
(
pContext
,
pParser
,
false
);
return
HTTP_CHECK_BODY_SUCCESS
;
}
else
{
httpTrace
(
"context:%p, fd:%d, ip:%s, chunked body not finished, continue read"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
);
//httpTrace("context:%p, fd:%d, ip:%s, chunked body not finished, continue read", pContext, pContext->fd, pContext->ipstr);
if
(
!
httpReadDataImp
(
pContext
))
{
httpError
(
"context:%p, fd:%d, ip:%s, read chunked request error"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
);
return
HTTP_CHECK_BODY_ERROR
;
...
...
@@ -298,8 +297,8 @@ int httpReadUnChunkedBody(HttpContext* pContext, HttpParser* pParser) {
httpSendErrorResp
(
pContext
,
HTTP_PARSE_BODY_ERROR
);
return
HTTP_CHECK_BODY_ERROR
;
}
else
if
(
dataReadLen
<
pParser
->
data
.
len
)
{
httpTrace
(
"context:%p, fd:%d, ip:%s, un-chunked body not finished, read size:%d dataReadLen:%d < pContext->data.len:%d, continue read"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
pContext
->
parser
.
bufsize
,
dataReadLen
,
pParser
->
data
.
len
);
//
httpTrace("context:%p, fd:%d, ip:%s, un-chunked body not finished, read size:%d dataReadLen:%d < pContext->data.len:%d, continue read",
//
pContext, pContext->fd, pContext->ipstr, pContext->parser.bufsize, dataReadLen, pParser->data.len);
return
HTTP_CHECK_BODY_CONTINUE
;
}
else
{
return
HTTP_CHECK_BODY_SUCCESS
;
...
...
src/modules/http/src/httpServer.c
浏览文件 @
db5e538f
...
...
@@ -101,7 +101,7 @@ void httpFreeContext(HttpServer *pServer, HttpContext *pContext) {
void
httpCleanUpContextTimer
(
HttpContext
*
pContext
)
{
if
(
pContext
->
timer
!=
NULL
)
{
taosTmrStopA
(
&
pContext
->
timer
);
httpTrace
(
"context:%p, ip:%s, close timer:%p"
,
pContext
,
pContext
->
ipstr
,
pContext
->
timer
);
//
httpTrace("context:%p, ip:%s, close timer:%p", pContext, pContext->ipstr, pContext->timer);
pContext
->
timer
=
NULL
;
}
}
...
...
@@ -329,8 +329,6 @@ bool httpReadDataImp(HttpContext *pContext) {
}
pParser
->
buffer
[
pParser
->
bufsize
]
=
0
;
httpTrace
(
"context:%p, fd:%d, ip:%s, thread:%s, read size:%d"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
pContext
->
pThread
->
label
,
pParser
->
bufsize
);
return
true
;
}
...
...
@@ -383,10 +381,12 @@ bool httpReadData(HttpThread *pThread, HttpContext *pContext) {
int
ret
=
httpCheckReadCompleted
(
pContext
);
if
(
ret
==
HTTP_CHECK_BODY_CONTINUE
)
{
taosTmrReset
(
httpCloseContextByServerForExpired
,
HTTP_EXPIRED_TIME
,
pContext
,
pThread
->
pServer
->
timerHandle
,
&
pContext
->
timer
);
httpTrace
(
"context:%p, fd:%d, ip:%s, not finished yet, try another times, timer:%p"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
pContext
->
timer
);
//
httpTrace("context:%p, fd:%d, ip:%s, not finished yet, try another times, timer:%p", pContext, pContext->fd, pContext->ipstr, pContext->timer);
return
false
;
}
else
if
(
ret
==
HTTP_CHECK_BODY_SUCCESS
){
httpCleanUpContextTimer
(
pContext
);
httpTrace
(
"context:%p, fd:%d, ip:%s, thread:%s, read size:%d, dataLen:%d"
,
pContext
,
pContext
->
fd
,
pContext
->
ipstr
,
pContext
->
pThread
->
label
,
pContext
->
parser
.
bufsize
,
pContext
->
parser
.
data
.
len
);
if
(
httpDecompressData
(
pContext
))
{
return
true
;
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录