I am sorry, the previous email was sent incomplete by accident:
To cut a long story short: I am doing the authentication in the "if
(NULL == *con_cls)" part. If the user passed valid credentials the
connection is serviced later on by returning MHD_YES (without queueing
any response) otherwise the
Hi,
because this email is not an answer to Your question, please consider
it like a hint, not advice.
You are not obligated to return only MHD_YES in "if (NULL ==
*con_cls)". You may also return MHD_NO or even process the connection.
According to my stack trace,
Thread [12] 4230 [core: 1] (Suspen
Hi,
Am 17.02.2014 13:58, schrieb Christian Grothoff:
if (*upload_data_size > 0)
{
*upload_data_size = 0; // consume
return MHD_YES;
}
that did it!
Thank you very much,
Sebastian
I think simply adding a
if (*upload_data_size > 0)
{
*upload_data_size = 0; // consume
return MHD_YES;
}
just before
const char *page = "Not Authorized!\n\n";
will do the trick (untested). This will cause MHD to process (and throw
away) all upload data before you queue a response. If you
Hi,
I just started experimenting with libmicrohttpd and followed the
tutorial with all the examples. When I implemented HTTP basic auth,
I experienced the following problem:
When I send a request with invalid auth credentials and no additional
(e.g. POST) data everything works well and I get the