summaryrefslogtreecommitdiff
path: root/src/HTTP_Message_Header.c
diff options
context:
space:
mode:
authorlishu <[email protected]>2021-06-18 18:44:46 +0800
committerlishu <[email protected]>2021-06-18 18:44:46 +0800
commitdd10be9f413e6a660d3a43ebd2d8ea566d8e94ee (patch)
tree3d46f8673dc9bf51525584805349e5a4febab514 /src/HTTP_Message_Header.c
parent1a428ed842873d2a80ea09443bd17e6a316da51f (diff)
处理s2c单向流下,响应体对应的是HEAD方法。
Diffstat (limited to 'src/HTTP_Message_Header.c')
-rw-r--r--src/HTTP_Message_Header.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HTTP_Message_Header.c b/src/HTTP_Message_Header.c
index 8d1630d..8345b14 100644
--- a/src/HTTP_Message_Header.c
+++ b/src/HTTP_Message_Header.c
@@ -238,14 +238,14 @@ void http_initHttpConnection(http_stream *a_http_stream, int thread_seq, struct
{
if(a_tcp->curdir==DIR_C2S)
{
- if(DIR_DOUBLE!=a_tcp->dir && g_http_prog_para.singleway_seq >0 && a_http_stream->create_infor_num > g_http_prog_para.singleway_seq)
+ if(DIR_DOUBLE!=a_tcp->dir && (g_http_prog_para.singleway_seq ==0 || (g_http_prog_para.singleway_seq >0 && a_http_stream->create_infor_num > g_http_prog_para.singleway_seq)))
{
a_http_stream->dir = DIR_C2S;
}
}
else
{
- if(DIR_DOUBLE!=a_tcp->dir && g_http_prog_para.singleway_seq >0 && a_http_stream->create_infor_num > g_http_prog_para.singleway_seq)
+ if(DIR_DOUBLE!=a_tcp->dir && (g_http_prog_para.singleway_seq ==0 || (g_http_prog_para.singleway_seq >0 && a_http_stream->create_infor_num > g_http_prog_para.singleway_seq)))
{
a_http_stream->dir = DIR_S2C;
}