libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] How to get last error


From: Christian Grothoff
Subject: Re: [libmicrohttpd] How to get last error
Date: Fri, 08 Nov 2013 14:15:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9

There are only really two reasons for MHD_create_post_processor to fail:
1) out of memory (highly unlikely)
2) the encoding is not specified in the headers
We do not explicitly set errno, so you cannot distinguish between
the two cases based on the return value; however, you could check
if the client has set a supported encoding before creating the PP.

If your Browser fails to supply the encoding but you know which one it
is, you can use MHD_set_connection_value to tell the PP which encoding
to expect, see also:

http://www.gnu.org/software/libmicrohttpd/manual/libmicrohttpd.html#index-MHD_005fset_005fconnection_005fvalue-93

Happy hacking!

Christian

On 11/08/2013 09:51 AM, Tiaan Wessels wrote:
> Hi,
> A newbie question: I am trying to register a POST processor. It fails
> for some reason or another which I can't figure out. I've researched the
> possible reasons e.g. encoding type etc. and tried changing that between
> url and multi-form but no use. My question is: is there some way to get
> an error code of some sort or an error string e.g. errno or
> strerror(errno) that will give me some clue as to the reason for the
> failure (MHS_create_post_processor simply returns NULL) ?
> Thanks

Attachment: 0x48426C7E.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]