Merge pull request #5232 from taosdata/fix/TD-2996

[TD-2996]<fix>: reset pContext->singleCmd to zeroes when httpReleaseContext(pContext, true)
This commit is contained in:
Shengliang Guan 2021-02-20 18:09:37 +08:00 committed by GitHub
commit 835b52d931
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -155,6 +155,7 @@ void httpReleaseContext(HttpContext *pContext, bool clearRes) {
if (clearRes) {
httpClearParser(pContext->parser);
memset(&pContext->singleCmd, 0, sizeof(HttpSqlCmd));
}
HttpContext **ppContext = pContext->ppContext;

View File

@ -229,7 +229,7 @@ static int32_t httpOnParseHeaderField(HttpParser *parser, const char *key, const
return 0;
}
else if (strncasecmp(key, "Connection: ", 12) == 0) {
else if (strncasecmp(key, "Connection", 10) == 0) {
if (strncasecmp(val, "Keep-Alive", 10) == 0) {
parser->keepAlive = HTTP_KEEPALIVE_ENABLE;
} else {