summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2019-02-08 09:18:50 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2019-02-08 22:49:46 -0500
commit7493d628b901864038f5a96b3018a91a59072c89 (patch)
treed4f1c4d09fef0f385f0f985ca74344015473d9ea
parent7f8fd8ad095f7d9e1a2f51c7cc054bd70e607f17 (diff)
downloadlighttpd1.4-7493d628b901864038f5a96b3018a91a59072c89.tar.gz
lighttpd1.4-7493d628b901864038f5a96b3018a91a59072c89.zip
[core] prefer buffer_caseless_compare()
prefer buffer_caseless_compare() to strcasecmp()
-rw-r--r--src/request.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/request.c b/src/request.c
index d550d19b..5ee02339 100644
--- a/src/request.c
+++ b/src/request.c
@@ -8,12 +8,9 @@
#include "log.h"
#include "sock_addr.h"
-#include <sys/stat.h>
-
#include <limits.h>
#include <stdlib.h>
#include <string.h>
-#include <sys-strings.h>
static int request_check_hostname(buffer *host) {
enum { DOMAINLABEL, TOPLABEL } stage = TOPLABEL;
@@ -1033,7 +1030,7 @@ int http_request_parse(server *srv, connection *con) {
goto failure;
}
- if (0 != strcasecmp(vb->ptr, "chunked")) {
+ if (0 != buffer_caseless_compare(CONST_BUF_LEN(vb), CONST_STR_LEN("chunked"))) {
/* Transfer-Encoding might contain additional encodings,
* which are not currently supported by lighttpd */
con->http_status = 501; /* Not Implemented */