W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1999

Re: Invoking a request from within an after filter

From: Raffaele Sena <raff@nuvomedia.com>
Date: Fri, 2 Jul 1999 09:36:50 -0700
Message-ID: <003301bec4a9$161bf280$52c0a8c0@nuvomedia.com>
To: <olga@goliath.eai.com>, "Yuval Krymolowski" <yuvalk@macs.biu.ac.il>, <www-lib@w3.org>
>
> On 09-Jun-99 Yuval Krymolowski wrote:
> > Hello,
> >
> >  In the after filter of a request, I create a new request
> >  and issue it using HTLoad.
> >
> >  It doesn't work, although the HTLoad returns '1'.
> >  The same code worked when I just issued the requests one after the
> >  other. It runs on NT.
> >
> >  Actually, one requests gets the HEAD (for last access date) and the other
> >  gets the HTML data through the HTML parser.
> >  Could some one please send a small example of such request nesting, or
> >  a simpler way of getting HEAD+parsed HTML ?
> >
> >  Thanks,
> >    Yuval Krymolowski
> >    Bar-Ilan University
>

I'm wondering if this is somehow related to a problem I had on Windows 98
(where everything was working
fine on Linux). If I remember well, in a similar situation where I started a
new request in the after filter
from the previous request (i.e. to follow a link or loading an image), I was
getting a close event for the
original request that was erroneously associated to the second, aborting it.

After going mad for a while trying to figure that out, I "fixed" it by
manipulating the "Windows Handle"
right after creating the new request ( with HTRequest_new ) and before the
HTLoad*.

You may want to give it a try, and see what happen.

-- Raffaele

--------------------------------------- 8< CUT HERE
>8 ----------------------------------------

#ifdef WWW_WIN_ASYNC
    /*
    ** If requests are too close to eachother libwww seems to
    ** get messages for a previous one and if the socket is the
    ** same they get incorrectly processed.
    **
    ** To "fix" things just bump the Windows Handle to make
    ** sure each consecutive request get a different one
    */
    {
 UINT m;
 HWND w = HTEventList_getWinHandle(&m);
 HTEventList_setWinHandle(w, m+1);
    }
#endif
Received on Friday, 2 July 1999 12:37:14 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:16 UTC