Skip Menu |

This queue is for tickets about the HTTP-Proxy CPAN distribution.

Report information
The Basics
Id: 4063
Status: resolved
Priority: 0/
Queue: HTTP-Proxy

People
Owner: Nobody in particular
Requestors: zdila [...] antik.sk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.09
Fixed in: (no value)



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 :)
RT-Send-CC: book [...] cpan.org
[guest - Fri Oct 10 05:01:04 2003]: Here a late answer : Show quoted text
> 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.
-1 ensures that ERROR logs are always printed, whatever the value of logmask is. Show quoted text
> 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.
As from version 0.12, you can use $self->proxy->client_socket() to access the socket connected to the client. Show quoted text
> 3. HTTP::Proxy should log remote client's IP address too (peerhost())
It does now. Show quoted text
> 4. add a feature of transparent proxying
It's a in the TODO, but with low priority. Show quoted text
> 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.
I've never encoutered this (and I use HTTP::Proxy daily). I'll had some tests for slow servers, to make sure the proxy client timeouts, and see what happens. Show quoted text
> 6. optionally syslog support, although I've added it using inherited > class forn HTTP::Proxy
Log::Dispatch does that better than I could. I'll think about adding such an option to the log() method.