code question about object superseded

"Ming Fu" <[email protected]>
Newsgroups gmane.comp.web.polipo.user
Message-ID <[email protected]>
Hi,

In client.c line # 1374-1399
 /* We're handling the wrong object now.  It's simpler to
           rebuild the whole data structure from scratch rather than
           trying to compensate. */
        rc = delayedHttpClientNoticeRequest(request);

It realizes that the object is superseded, At this point, the new object has
already received the reply header in httpServerHandlerHeaders(). The
OBJECT_VALIDATING flags should be off on the new object. However, by calling
delayedHttpClientNoticeRequest() to rebuild the structure, it will
eventually call httpClientNoticeRequest(), which will add OBJECT_VALIDATING
to the new object

client.c line #1257
request->object->flags |= OBJECT_VALIDATING;

The object can only be send to the client until the OBJECT_VALIDATING flag
is removed.
client.c line # 1248
 if(request->object->flags & OBJECT_VALIDATING)
        return 1;

As the server has already sent the reply headers, no one will call
httpServerHandlerHeaders() to remove this flag. The only other place that
removes the validating flags is when ServerFinish() was called after the
server has sent the whole reply.

If the reply is large or infinite (stream audio/video), the client will
receive nothing for that request.

If my trace is correct, I need advice as how to re-build the request without
calling delayedHttpClientNoticeRequest(request)

Best Regards,
Ming
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.