how to flatten Requests and Responses ?
Heinrich Langos (heinrich@wh9.tu-dresden.de)
Tue, 2 Jan 2001 18:19:39 +0100
hi
i'm new to the list. so, first of all, thanx for libwww-perl ...
and here's MY problem :-)
I would like to flatten HTTP::Response and HTTP::Request objects so
that i can transfer them between different computers make them objects
on the other side again.
"as_string" doesn't do the trick since it takes a lot of
string-parsing to translate the string back to an object.
anybody else done something like that? is there a builtin function
that i just didn't see ?
background: i work on an anonymizing proxy solution with a local
filtering proxy and a remote prefetching proxy. both connected by a
link that has medium bandwidth but high latency.
a local proxy gets a request and strips it of obvious stuff like
cookies, referrer, user-agent and sends that request to the
prefetcher. the prefetching proxy should get the request, forward
it to the server and parse the response for embeded links like IMG
and FRAME. then it should fetch the embedded objects and return the
whole thing in one batch to the local proxy. the local proxy would
take that batch apart, strip it of evil stuff and feed the response
to the initial request and the follow-up requests to the browser as
it asks for them.
since both proxys will be written in perl i would like to minimize
the conversions if there is a way to do it.
TIA
-heinrich
--
Heinrich Langos <heinrich@null.net>
pgp: http://wh9.tu-dresden.de/~heinrich/pub_pgp_key.asc
_________________________________________________________________
|o| The reason we come up with new versions is not to fix bugs. |o|
|o| It's absolutely not. It's the stupidest reason to buy a new |o|
|o| version I ever heard. -- Bill Gates, Microsoft Corporation |o|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~