[Top][All Lists]

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

Re: [libmicrohttpd] MHD_create_post_processor

From: Christian Grothoff
Subject: Re: [libmicrohttpd] MHD_create_post_processor
Date: Fri, 28 Dec 2012 17:14:23 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

I think the real issue is that you're trying to create a post processor for a data format (XML) that is not supported by the post processor. For XML data, you should just pass the 'upload_data' directly to your XML parser (and update *data_size to reflect the number of bytes you did (not) process).

Creating the postprocessor fails (with returning NULL) because it cannot find a supported data format in the header.

I hope this helps!

Happy hacking!


On 12/28/2012 01:06 PM, Douglas Corner wrote:
I'm using the largepost.c example from the tutorial and sending a POST
from a java client written to communicate with a RESTful WebServices
server.  The client was written with RESTEasy and works with a JBoss
server.  For compatibility reasons it's important that I be able to use
the same client although I can make changes in it.

My plan is to use libmicrohttpd to build a fairly simple WS server.  I'm
running on Windows 7 and Visual Studio 2010 (Not my choice).

In the "answer_to_connection" routine I'm getting a null return from
MHD_create_post_processor.  The following is from a tcpdump trace of the

Question - As you can see the data is XML but the client is
using Content-Type: text/plain.  I will do any XML parsing needed and
would like the XML to be processed as text and not interpreted.

POST /SBMLServerREST-war/SBML/bml;submitterID=dsc;domain=ibml HTTP/1.1
Accept-Encoding: gzip, deflate
Accept: text/plain
User-Agent: Jakarta Commons-HttpClient/3.1
Host: wise:8080
Content-Length: 269
Content-Type: text/plain

<?xml version="1.0" encoding="UTF-8"?>

Doug Corner

Douglas Corner
4439 Nguyen Engineering Building
George Mason Universiy
4400 University Drive
Fairfax, VA 22030
Email:address@hidden <mailto:address@hidden>
Cell:(571) 215-0773

reply via email to

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