libmicrohttpd
[Top][All Lists]
Advanced

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

[libmicrohttpd] How can I decode the form-data fields with MHD_http_unes


From: silvioprog
Subject: [libmicrohttpd] How can I decode the form-data fields with MHD_http_unescape() function?
Date: Mon, 15 Feb 2016 23:32:29 -0300

Hello,

I have following form-data:

Content-Type: multipart-form-data
id=10&name=Silvio+Cl%C3%A9cio
... some uploads here ...

But when I decode it with MHD_http_unescape() function:

..., char *key, ...
MHD_http_unescape(key);

I got:

Silvio+Clécio

But I need the full unescaped value, that is "Silvio Clécio" (without quotes). So, I have two questions:

1. is it correct to pass only the reference of my variable to this function?
2. is it correct to replece all "+" occurrences after to use the HTTP unescape function, or do I need to replace other chars?

Thank you!

--
Silvio Clécio

reply via email to

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