From cefcdd78b0121ff91833888d296cbd3c2c29ce70 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 9 Oct 2018 14:21:10 +0800 Subject: [PATCH] 1 --- a8/mixedsession.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/a8/mixedsession.cc b/a8/mixedsession.cc index 6b1c35b..87e9f2f 100644 --- a/a8/mixedsession.cc +++ b/a8/mixedsession.cc @@ -15,10 +15,10 @@ namespace a8 static bool IsHttpHead(char* buf, int buflen) { - return (buflen > 4 && strncmp("GET ", buf, 4)) || - (buflen > 4 && strncmp("get ", buf, 4)) || - (buflen > 5 && strncmp("POST ", buf, 5)) || - (buflen > 5 && strncmp("post ", buf, 5)); + return (buflen > 4 && strncmp("GET ", buf, 4) == 0) || + (buflen > 4 && strncmp("get ", buf, 4) == 0) || + (buflen > 5 && strncmp("POST ", buf, 5) == 0) || + (buflen > 5 && strncmp("post ", buf, 5) == 0); } void MixedSession::Reset()