summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-05-18 20:42:19 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-06-01 09:43:35 +0300
commit3806c7ba24e772bba007c273f6e74f00ccb7d83f (patch)
tree2e26ba401a5f765752fb8a255c3a9d7f8bd07720
parentc4633c32c14ea1de8251cdb94da40b1f654fcde2 (diff)
examples/largepost.c: fixed caseless method match
-rw-r--r--doc/examples/largepost.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/doc/examples/largepost.c b/doc/examples/largepost.c
index 8669bc28..45c4ad03 100644
--- a/doc/examples/largepost.c
+++ b/doc/examples/largepost.c
@@ -13,12 +13,6 @@
#include <string.h>
#include <microhttpd.h>
-#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
@@ -236,7 +230,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,
@@ -264,7 +258,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];
@@ -278,7 +272,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 = *req_cls;