Subject: | HTTP proxy improvements & bugs |
Hello
Some of my local parameters:
This is perl, v5.8.0 built for i386-linux-thread-multi
Linux aqua 2.4.21-rc1 #2 Mon May 12 08:03:26 CEST 2003 i686 unknown
What to improve on HTTP::Proxy (using ver. 0.9):
1. Constant ERROR must not have -1 value, because it includes all
the other log constants.
2. It will be very useful if the callback methods would have access to
$conn object (HTTP::Daemon::ClientConn resp. IO::Socket::INET). There
are many other useful informations, e.g. peerhost() etc.
3. HTTP::Proxy should log remote client's IP address too (peerhost())
4. add a feature of transparent proxying
5. add a feature of setting timeout on the HTTP::Daemon connection,
because many child process will hang on "read(4, " (tested using strace -p
<pid_of_child_process>) - reader / writer problem. I think, it occurs
when there is wrong HTTP communication on the side of remote server or
host. I hope that it is not due to added feature of transparent proxy.
6. optionally syslog support, although I've added it using inherited
class forn HTTP::Proxy
Here I include some diff of Proxy.pm ver 0.9 which adds points 1 and 4:
27c27
< use constant ERROR => 32;
---
Show quoted text
> use constant ERROR => -1;
34c34
< use constant ALL => 255;
---
Show quoted text> use constant ALL => 31;
425,431d424
< # by Martin Zdila
< unless ( defined $req->uri->scheme ) {
< # print "Transparent :-)\n";
< $req->uri->scheme('http');
< $req->uri->host($req->header('Host'));
< }
<
747c740
< if ($self->{response}->headers->header('Content-Type') || "" ) !~
---
Show quoted text> if $self->{response}->headers->header('Content-Type') !~
Thanks for HTTP::Proxy :)