W3C home > Mailing lists > Public > www-lib@w3.org > April to June 2001

Re: Delay between header and body in POST

From: <Yusef_Badri@tertio.com>
Date: Thu, 24 May 2001 10:19:49 +0100
To: www-lib@w3.org, "Sean Kelly" <kelly@ad1440.net>
Message-ID: <OF12333CB2.04506D56-ON80256A56.0031BC0F@LocalDomain>
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 05:12:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:39 GMT