use strcasecmp for methods

This commit is contained in:
Christian Grothoff 2020-01-17 00:19:23 +01:00
parent d61c2e400a
commit 401a1f82ef
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -425,15 +425,15 @@ handle_mhd_request (void *cls,
/* The URL is a match! What we now do depends on the method. */ /* The URL is a match! What we now do depends on the method. */
if (0 == strcmp (method, MHD_HTTP_METHOD_OPTIONS)) if (0 == strcasecmp (method, MHD_HTTP_METHOD_OPTIONS))
{ {
GNUNET_async_scope_restore (&old_scope); GNUNET_async_scope_restore (&old_scope);
return TALER_MHD_reply_cors_preflight (connection); return TALER_MHD_reply_cors_preflight (connection);
} }
if ( (NULL == rh->method) || if ( (NULL == rh->method) ||
(0 == strcmp (method, (0 == strcasecmp (method,
rh->method)) ) rh->method)) )
{ {
/* FIXME: consider caching 'rh' in '**connection_cls' to /* FIXME: consider caching 'rh' in '**connection_cls' to
avoid repeated lookup! */ avoid repeated lookup! */