Re: [Karrigell-main] client address patch.
Brought to you by:
quentel
From: Pierre Q. <que...@wa...> - 2003-10-01 20:43:25
|
To be more generic, perhaps it would be even more useful to introduce a variable REQUEST_HANDLER which is the current instance of karrigellRequestHandler. Then you can find the IP address by : REQUEST_HANDLER.client_address[0] and if you need the client port : REQUEST_HANDLER.client_address[1] You can take advantage of all the attributes of this instance (server, connection, etc). I think it's better not to add too many names in the user's namespace Would this be ok for what you need ? What do the others think ? Cheers, Pierre ----- Original Message ----- From: "Gabriele Giorgetti" <gab...@te...> To: <kar...@li...> Sent: Wednesday, October 01, 2003 4:00 PM Subject: [Karrigell-main] client address patch. > Hi, I was in the need to get the client's ip address with Karrigell. > > So here is a patch that makes Karrigell log the client's ip address; > also the CLIENT_IP variable is set in the namespace. > > Cheers. > > > > |