W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2000

Re: Please Help on Synchronous Post...

From: Henrik Frystyk Nielsen <frystyk@microsoft.com>
Date: Fri, 17 Mar 2000 08:33:28 -0800
Message-ID: <002b01bf902e$92a649d0$c2bb1eac@redmond.corp.microsoft.com>
To: <jose.kahan@inrialpes.fr>, "Cal Caldwell" <Caldwell@kfalls.net>
Cc: <www-lib@w3.org>
POST and PUT (and any other method that takes a request entity requires
use of non-blocking and hence async handler callbacks. The reason is tha
t libwww uses 100 Continue codes and other tricks to make the operation
reliable in various situations and it is impossible to block when we don
't whether the server will send us a 100 Continue code or not.

It is described a little bit at

    http://www.w3.org/Library/User/Using/Event.html

Henrik Frystyk Nielsen,
mailto:frystyk@microsoft.com

> Have you tried returning from your terminate_handler with HT_ERROR?
>
> Also, I'm not sure for the sync request that it's ok to make the
> HTRequest_delete in that handler. I'd do it after the return from the
> Load.. call.
>
> -Jose
>
> In our previous episode, Cal Caldwell said:
> >
> > /*  Here is the terminate handler */
> >
> > static int CHttpPost::terminate_handler (HTRequest * request, HTResp
onse * response, void * param, int status)
> > {
> >  USES_CONVERSION;
> >  CComBSTR str_response;
> >  CHttpPost* php_this;
> >
> >
> >  php_this = (CHttpPost*)param;
> >
> >  str_response = HTChunk_data(php_this->g_phc_responseData);
> >
> >  FILE* f= fopen("C:\\log.txt", "a+");
> >  fprintf(f, "%s\n", W2A(str_response));
> >  fclose(f);
> >
> >     HTRequest_delete(request);
> >
> >  return 1;
> > }
> >
> >
>
Received on Friday, 17 March 2000 11:34:34 GMT

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