Re: Please Help on Synchronous Post...

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 UTC