[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] Accepting application/xml payload
From: |
Ken Zangelin |
Subject: |
[libmicrohttpd] Accepting application/xml payload |
Date: |
Thu, 13 Jun 2013 21:33:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5 |
Hi,
I'm using microhttpd for a project developed by Telefonica R&D, Barcelona,
Spain.
Our "thirdparty" clients needed to send their payload as "application/xml"
mime-type and that gave us some problems I currently cannot recall. I think the payload data simply
didn't get through to the callbacks.
The problem had a really really easy fix. I just changed the define MHD_HTTP_POST_ENCODING_FORM_URLENCODED from
"application/x-www-form-urlencoded" to "application/xml", and my problem was solved. Actually,
finally I left that definition untouched and I changed the use of it in postprocessor.c, to accept
"application/xml" too when accepting "application/x-www-form-urlencoded"
(MHD_HTTP_POST_ENCODING_FORM_URLENCODED). Just a single-line change ...
Now, I do understand this is most probably not the right way to solve the
problem but I don't really know which way IS the correct one ...
I believe it might be interesting to a lot of people to be able to accept
"application/xml".
The parsing of the XML payload I do myself, of course ...
Regards,
Ken Zangelin
________________________________
Este mensaje se dirige exclusivamente a su destinatario. Puede consultar
nuestra política de envío y recepción de correo electrónico en el enlace
situado más abajo.
This message is intended exclusively for its addressee. We only send and
receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx
- [libmicrohttpd] Accepting application/xml payload,
Ken Zangelin <=