W3C home > Mailing lists > Public > www-lib@w3.org > October to December 1998

How to stop the event loop?

From: <Jim_Ravan@avid.com>
Date: Mon, 14 Dec 1998 14:06:55 -0500
To: www-lib@w3.org
Message-ID: <852566DA.00690136.00@amm02.avid.com>

I'm trying to write a "standard" AFTER filter that I will use in lots of
places to stop the event loop. Currently my Put code looks something like:

     // Perform a ranged PUT on that anchor.
     request = HTRequest_new();
     HTRequest_addRange(request, "bytes", rangeStr);
     HTRequest_addAfter(request, endRequest, NULL, NULL, HT_ALL,

     if (HTPutAbsolute(HTAnchor_parent(anchor), urlStr, request)) {
          err = OK;
     } else {
          err = NO;

     static int endRequest(HTRequest* req, HTResponse* res, void* param,
int status) {
          return HT_OK;

My first question is "Is this an acceptable way to stop the event loop?".
If so, it seems that endRequest() does not handle redirections, and if one
is in progress, this filter will stop the redirection. Is this correct, and
if so, how should the AFTER filter be coded so as to stop the event loop
when the PUT has finished and, at the same time, handle redirections, etc?

Received on Monday, 14 December 1998 14:08:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:48 UTC