Re: WWW_RAW bug (chunk.c )

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 UTC