Making a converter(proxy) HTTP server with wwwlib?
Subject: Making a converter(proxy) HTTP server with wwwlib?
From: Markku Savela <firstname.lastname@example.org>
Date: Thu, 7 Mar 1996 11:34:47 +0200 (EET)
From email@example.com Thu Mar 7 04: 37:51 1996
Reply-To: firstname.lastname@example.org (Markku Savela)
Just to sound out if I am on the right track and not doing something
that I might regret later, I am posting this notice/status report.
What I am trying to achieve is described by
Client Proxy/Converter The WEB
(requestor) (real WWW server)
GET URL (pass through) GET URL
----------------------------> .............. ------------> ........
.............. HTTP Reply ........
.............. <------------ ........
+ the whole converter
stacking and type matching
stuff sitting here
In my converter, the output stream is going to HTTPReply stream, which
then opens quite many other streams (MakeReplyPipe/HTConLen.c,
HTTPRes.c/HTTPResponce), most of which insist on adding some headers
based on achors and requests (and the result is totally incorrect for
I found it very difficult to control these beasts and finally resolved
in making a private copy of HTTPServ.c module, with only one little
addition into HTTPReply_new function:
me->transparent = YES;
This disables the creation of all those extra (for my application)
pipelines and gives me a straight backstream to the requesting client.
My application can now safely generate the necessary special reply and
I am only wondering if I actually missed some control that would have
achieved the same result. If such exists, I wouldn't have to use
private version of HTTPServ.c
Markku Savela (email@example.com), Technical Research Centre of Finland
Multimedia Systems, P.O.Box 1203,FIN-02044 VTT,http://www.vtt.fi/tte/staff/msa/