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

Re: WWW_RAW bug (chunk.c )

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Thu, 11 Feb 1999 17:03:12 -0500
To: www-lib@w3.org
Message-ID: <36C353A0.4D64970F@w3.org>
To: Mikhail Grouchinski <mgrouch@usa.net>


Mikhail Grouchinski wrote:
> 
> I'm trying to make WWW_RAW work correctly.
> If I set WWW_RAW for request output format then (it seems) After filters
> are called only after closing the connection.
> I want to have callback called immediately after
> the receiving the reply.

The problem with "RAW" is that it short-circuits the HTTP stream
altogether so that the end of message isn't found and hence the after
filters are not called.

There are different ways around this:

1) Register a TEE stream instead of the HTTP status stream so that you
have

	                  ---->  direct output
	                /
	input from net <
	                \
	                  ---->  HTTP status stream ---> MIME ---> etc.

The current HTTP status stream is in HTConverterInit() in

	http://www.w3.org/Library/src/HTInit.c

2) Use the header fields from the HTResponse object, check that all
connection header fields are sorted out etc. and then forward them as
needed. This means that the HTTP header is not forwarded before the full
header has been parsed. This is the solution that I prefer.

3) Not try to proxy anything but instead tunnel the response through
directly. That is, don't use the HTTP status stream at all (this is in
fact what WWW_RAW is doing and the problem is that you don't have any
after filters called.

Henrik
Received on Thursday, 11 February 1999 17:03:17 GMT

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