Re: Delay between header and body in POST

Is the 'Expect 100-Continue' header there to force an ack from the server?
Might be left over from debugging.

Judd

Yusef_Badri@tertio.com wrote:

> That is a default which is set in HTTP.c
>      #define DEFAULT_FIRST_WRITE_DELAY   2000
>      #define DEFAULT_SECOND_WRITE_DELAY  3000
>
> The reason for the delay is to allow the client to wait for the
> 100=Continue response, before proceeding to transmit the body of the
> request. You don't have to wait if you don't want to though, and you can
> decrease the delay by  calling HTTP_setBodyWriteDelay()
>
> That routine does silently enforces a min delay of 0.2 secs, which hasn't
> been explained to me. I took away that restricion in my version, and was
> able to specify a zero delay without any problems. Can't remember if the
> library still inserted an Expect 100-Continue header in my request though,
> and not sure if there is a way to stop it doing so.
>
> "Sean Kelly" <kelly@ad1440.net>@w3.org on 23/05/2001 23:19:47
>
> Sent by:  www-lib-request@w3.org
>
> To:   <www-lib@w3.org>
> cc:
> Subject:  Delay between header and body in POST
>
> Hello again:
>
> When POSTing data to a server, there's a very palpable
> delay (2 seconds) between transmission of the request
> headers and transmission of the POSTed data body.
> Anyone have ideas what I'm doing wrong that's causing
> that?
>
> My calls, in order, are:
>
> HTLibInit("retrieveProduct()", "1.0");
> HTLib_setSecure(YES);
> HTLib_setSecure(YES);
> HTTransportInit();
> HTProtocolInit();
> HTMIMEInit();
> converters = HTList_new();
> HTConverterInit(converters);
> HTFormat_setConversion(converters);
> presenters = HTList_new();
> HTPresenterInit(presenters);
> transferEncoders = HTList_new();
> HTTransferEncoderInit(transferEncoders);
> HTFormat_setTransferCoding(transferEncoders);
> contentEncoders = HTList_new();
> HTContentEncoderInit(contentEncoders);
> HTNetInit();
> HTAAInit();
> HTEventInit();
> HTNet_addAfter(responseArrived, NULL, NULL, HT_ALL, HT_FILTER_LAST);
> HTHost_setEventTimeout(10000);
> HTRequest_setOutputFormat(request, HTAtom_for("text/xml"));
> anchor = HTAnchor_findAddress(uri);
> HTAnchor_setFormat((HTParentAnchor*) anchor, WWW_FORM);
> result = HTPostFormAnchorToChunk(params, anchor, request);
> HTEventList_newLoop();
>
> And the responseArrived() function merely calls
> HTEventList_stopLoop().
>
> Thanks for your assistance,
> --Sean

Received on Thursday, 24 May 2001 11:20:21 UTC