summaryrefslogtreecommitdiff
path: root/src/libwaitress
diff options
context:
space:
mode:
Diffstat (limited to 'src/libwaitress')
-rw-r--r--src/libwaitress/waitress.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libwaitress/waitress.c b/src/libwaitress/waitress.c
index 1c2456f..705d8dc 100644
--- a/src/libwaitress/waitress.c
+++ b/src/libwaitress/waitress.c
@@ -43,7 +43,7 @@ THE SOFTWARE.
#include "config.h"
#include "waitress.h"
-#define streq(a,b) (strcmp(a,b) == 0)
+#define strcaseeq(a,b) (strcasecmp(a,b) == 0)
#define WAITRESS_HTTP_VERSION "1.1"
typedef struct {
@@ -568,10 +568,10 @@ static WaitressHandlerReturn_t WaitressHandleChunked (WaitressHandle_t *waith,
*/
static void WaitressHandleHeader (WaitressHandle_t *waith, const char * const key,
const char * const value) {
- if (streq (key, "Content-Length")) {
+ if (strcaseeq (key, "Content-Length")) {
waith->request.contentLength = atol (value);
- } else if (streq (key, "Transfer-Encoding")) {
- if (streq (value, "chunked")) {
+ } else if (strcaseeq (key, "Transfer-Encoding")) {
+ if (strcaseeq (value, "chunked")) {
waith->request.dataHandler = WaitressHandleChunked;
}
}
@@ -925,6 +925,8 @@ const char *WaitressErrorToStr (WaitressReturn_t wRet) {
#include <string.h>
#include "waitress.h"
+#define streq(a,b) (strcmp(a,b) == 0)
+
/* string equality test (memory location or content)
*/
static bool streqtest (const char *x, const char *y) {