From d1882a8723cbe64f58fe0a6d16fa169352e4e79c Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Thu, 18 May 2023 20:42:19 +0300 Subject: [PATCH] examples/largepost.c: fixed caseless method match --- doc/examples/largepost.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/doc/examples/largepost.c b/doc/examples/largepost.c index dc685745..165c47ed 100644 --- a/doc/examples/largepost.c +++ b/doc/examples/largepost.c @@ -13,12 +13,6 @@ #include #include -#ifdef _MSC_VER -#ifndef strcasecmp -#define strcasecmp(a,b) _stricmp ((a),(b)) -#endif /* !strcasecmp */ -#endif /* _MSC_VER */ - #if defined(_MSC_VER) && _MSC_VER + 0 <= 1800 /* Substitution is OK while return value is not used */ #define snprintf _snprintf @@ -239,7 +233,7 @@ answer_to_connection (void *cls, con_info->answercode = 0; /* none yet */ con_info->fp = NULL; - if (0 == strcasecmp (method, MHD_HTTP_METHOD_POST)) + if (0 == strcmp (method, MHD_HTTP_METHOD_POST)) { con_info->postprocessor = MHD_create_post_processor (connection, @@ -267,7 +261,7 @@ answer_to_connection (void *cls, return MHD_YES; } - if (0 == strcasecmp (method, MHD_HTTP_METHOD_GET)) + if (0 == strcmp (method, MHD_HTTP_METHOD_GET)) { /* We just return the standard form for uploads on all GET requests */ char buffer[1024]; @@ -281,7 +275,7 @@ answer_to_connection (void *cls, MHD_HTTP_OK); } - if (0 == strcasecmp (method, MHD_HTTP_METHOD_POST)) + if (0 == strcmp (method, MHD_HTTP_METHOD_POST)) { struct connection_info_struct *con_info = *con_cls;