libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] How to give busy message to second file upload clien


From: Sebastian Gerhardt
Subject: Re: [libmicrohttpd] How to give busy message to second file upload client when 1st client file
Date: Sat, 23 Aug 2008 18:30:15 +0200

Hello,

Christian, I am a bit confused over this. Are you proposing that 
such a response should be built in the RequestCompletedCallback
function? This seems counter-intuitive because the
RequestTerminationCode is MHD_REQUEST_TERMINATED_COMPLETED_OK
(Manual: "We finished sending the response."), suggesting that the
response has already been sent.

Reading the homepage, which says

  "-- if the client queues a response during this first call, a 100
   CONTINUE response will be suppressed, the request body will not be
   read and the connection will be closed after sending the response."

I would expect the MHD_AccessHandlerCallback to be the most appropriate
place to built and queue this response--returning with MHD_YES.

This version works for GET requests, but it does not work for POST
requests. The connection is just closed by MHD and nothing is sent.

The only way to get a response sent for POST requests that I found so
far is to create the postprocessor and do at least one post_data
iteration.

I used 0.3.1 beta.


Thanks for clarification

Sebastian


On Fri, 2008-08-22 at 15:59 -0600, Christian Grothoff wrote:
> First of all, a rejection message for a POST as you propose should be put in 
> here (to be send instead of 100 CONTINUE):
> 
>   if( NULL == con_info ){
>     return;
>   }




reply via email to

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