Up !

--- In [email protected], "remi.mimiche" <remi.mimi...@...> wrote:
>
> Hi,
> 
> I am using GSoap to create a simple http server. I sucessfully 
> redefined the HTTP get callback (fget) and now I am trying to redefine
> the http post callback (fparsehdr + fform).
> 
> So I do the callback for fparsehdr, which return SOAP_FORM when 
> Content-Length isnot 0 in the http post request I receive, and it
> calls my fform callback which look like:
> 
> int http_form(struct soap *soap)
> {
>   std::cout << soap->path << " " << soap->length  << std::endl;
>   soap_response(soap, SOAP_HTML); // HTTP response header with text/html
>   soap_end_send(soap);
>   return SOAP_OK;
> }
> 
> Now my question: how do I access the content of the http message in
> my http_form callback ??
> 
> NB: I have looked inside the plugin folder, and tryed to copy
> what was done in httpform.c, but it doesn't seem to work, I mean
> the soap_getchar wait indefinitely.
> In the help it states:
> "int (*soap.fform)(struct soap *soap)
> Called by the main server loop when a user-defined fparsehdr callback 
> returned SOAP_FORM to signal that the HTTP body must be processed by this 
> form handler callback. The HTTP POST form data MUST be read, otherwise 
> keep-alive messages will end up out of sync. Should return SOAP_OK or a gSOAP 
> error code. Built-in gSOAP function: none. "
> 
> so it says "The HTTP POST form data MUST be read" but it doesn't say
> how :(((
> 
> Regards,
>


Reply via email to