Skip Menu |
 

This queue is for tickets about the RPC-XML CPAN distribution.

Report information
The Basics
Id: 34557
Status: resolved
Priority: 0/
Queue: RPC-XML

People
Owner: rjray [...] blackperl.com
Requestors: rjray [...] blackperl.com
Cc: gburger [...] cs.up.ac.za
kevin [...] weblab.com
oliver [...] linux-kernel.at
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: 0.60

Attachments


CC: gburger [...] cs.up.ac.za,kevin [...] weblab.com,oliver [...] linux-kernel.at
Subject: Make the client IP and/or connection information available to server
Download (untitled) / with headers
text/plain 413b
Per request from multiple sources: The server should have access to the basic connection information of the client that has sent the request currently in the dispatch pipeline. See the attached patch from Oliver Falk. This information should somehow be associated with the request, not the server object, for multi-threaded server scenarios. Also, try to see how to make it work for Apache and Net::Server cases.
Subject: Client Address with RPC::XML::Server.eml
X-Mozilla-Status: 0003 X-Mozilla-Status2: 00000000 Return-Path: <oliver@linux-kernel.at> X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on shell.rawbw.com X-Spam-Level: X-Spam-Status: No, score=0.1 required=7.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from mail0.rawbw.com (mail0.rawbw.com [198.144.192.41]) by shell.rawbw.com (8.11.6p2/8.11.6) with ESMTP id k1EFAT888465 for <rjray@shell.rawbw.com>; Tue, 14 Feb 2006 07:10:29 -0800 (PST) Received: from mail.linux-kernel.at (pils.linux-kernel.at [213.129.242.82]) by mail0.rawbw.com (8.11.6p2/8.11.6) with ESMTP id k1EFASX68980 for <rjray@blackperl.com>; Tue, 14 Feb 2006 07:10:28 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (authenticated bits=0) by mail.linux-kernel.at (8.13.5/8.13.5) with ESMTP id k1EFAKWu026527 for <rjray@blackperl.com>; Tue, 14 Feb 2006 16:10:21 +0100 Message-ID: <43F1F2E6.1080503@linux-kernel.at> Date: Tue, 14 Feb 2006 16:10:30 +0100 From: Oliver Falk <oliver@linux-kernel.at> User-Agent: Thunderbird 1.5 (X11/20060128) MIME-Version: 1.0 To: rjray@blackperl.com Subject: Client Address with RPC::XML::Server Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88/1289/Tue Feb 14 15:36:44 2006 on pils.linux-kernel.at X-Virus-Status: Clean X-lkernAT-MailScanner-Information: Please contact the ISP for more information X-lkernAT-MailScanner: Found to be clean X-lkernAT-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=not spam, ALL_TRUSTED -1.44) X-MailScanner-From: oliver@linux-kernel.at Hi Randy! To be able to retrieve the ip and port of a client within a rpc method, I would suggest the following: --- ./lib/RPC/XML/Server.pm.orig 2006-02-14 16:08:38.000000000 +0100 +++ ./lib/RPC/XML/Server.pm 2006-02-14 16:08:46.000000000 +0100 @@ -1223,7 +1223,8 @@ $timeout = $self->{__daemon}->timeout(1); while (! $exit_now) { - $conn = $self->{__daemon}->accept; + ($conn, $peer_addr) = $self->{__daemon}->accept; + $self->{peer_addr} = $peer_addr if $peer_addr; last if $exit_now; next unless $conn; Please investigate and think about patching it in... It's really a big problem, that you cannot get the IP from the connecting client... Best, Oliver
Download (untitled) / with headers
text/plain 237b
Alas, I couldn't just put this one down, so now it's in the repo and will go out with 0.60. The interface was a little tricky, so as to not cause problems in forking or threading situations (not to mention Apache), but I think it's good.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.