You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Asankha C. Perera (JIRA)" <ji...@apache.org> on 2006/11/20 15:01:04 UTC

[jira] Created: (HTTPCORE-15) Provide a way to access IP Address of the remote client making a request

Provide a way to access IP Address of the remote client making a request
------------------------------------------------------------------------

                 Key: HTTPCORE-15
                 URL: http://issues.apache.org/jira/browse/HTTPCORE-15
             Project: HttpComponents Core
          Issue Type: New Feature
          Components: HttpCore
            Reporter: Asankha C. Perera
            Priority: Minor


Currently the API does not provide a way for implementations to find out the remote IP address of a request

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Resolved: (HTTPCORE-15) Provide a way to access IP Address of the remote client making a request

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HTTPCORE-15?page=all ]

Oleg Kalnichevski resolved HTTPCORE-15.
---------------------------------------

    Fix Version/s: 4.0-alpha3
       Resolution: Fixed

Applied changes as suggested by Roland

Oleg

> Provide a way to access IP Address of the remote client making a request
> ------------------------------------------------------------------------
>
>                 Key: HTTPCORE-15
>                 URL: http://issues.apache.org/jira/browse/HTTPCORE-15
>             Project: HttpComponents Core
>          Issue Type: New Feature
>          Components: HttpCore
>    Affects Versions: 4.0-alpha3
>            Reporter: Asankha C. Perera
>         Assigned To: Oleg Kalnichevski
>            Priority: Minor
>             Fix For: 4.0-alpha3
>
>         Attachments: httpsocketconn.patch
>
>
> Currently the API does not provide a way for implementations to find out the remote IP address of a request

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Updated: (HTTPCORE-15) Provide a way to access IP Address of the remote client making a request

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HTTPCORE-15?page=all ]

Oleg Kalnichevski updated HTTPCORE-15:
--------------------------------------

    Affects Version/s: 4.0-alpha3
             Assignee: Oleg Kalnichevski

> Provide a way to access IP Address of the remote client making a request
> ------------------------------------------------------------------------
>
>                 Key: HTTPCORE-15
>                 URL: http://issues.apache.org/jira/browse/HTTPCORE-15
>             Project: HttpComponents Core
>          Issue Type: New Feature
>          Components: HttpCore
>    Affects Versions: 4.0-alpha3
>            Reporter: Asankha C. Perera
>         Assigned To: Oleg Kalnichevski
>            Priority: Minor
>
> Currently the API does not provide a way for implementations to find out the remote IP address of a request

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Commented: (HTTPCORE-15) Provide a way to access IP Address of the remote client making a request

Posted by "Roland Weber (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HTTPCORE-15?page=comments#action_12451401 ] 
            
Roland Weber commented on HTTPCORE-15:
--------------------------------------

Hi Oleg,

from a strictly traditional IO viewpoint, the bind() method in the new interface looks very much out of place.
The requirement is to get access to the (remote) IP address, a purely read-only operation. We wanted to
keep the connection interfaces in core minimal, and I don't see the point of that bind() method here. Drop
the bind() and rename the interface to HttpInetConnection, because it's providing access to InetAdresses?
(I know, Java sockets are always tied to Inet addresses, unlike sockets in C :-)

cheers,
  Roland


> Provide a way to access IP Address of the remote client making a request
> ------------------------------------------------------------------------
>
>                 Key: HTTPCORE-15
>                 URL: http://issues.apache.org/jira/browse/HTTPCORE-15
>             Project: HttpComponents Core
>          Issue Type: New Feature
>          Components: HttpCore
>    Affects Versions: 4.0-alpha3
>            Reporter: Asankha C. Perera
>         Assigned To: Oleg Kalnichevski
>            Priority: Minor
>         Attachments: httpsocketconn.patch
>
>
> Currently the API does not provide a way for implementations to find out the remote IP address of a request

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Commented: (HTTPCORE-15) Provide a way to access IP Address of the remote client making a request

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HTTPCORE-15?page=comments#action_12451510 ] 
            
Asankha C. Perera commented on HTTPCORE-15:
-------------------------------------------

Hi Oleg, Roland

Thanks for the quick review of the issue.. and apologies for my delayed response due to the time difference :)

I am not familiar with the internals of the HttpCore or the other related API's to comment on what would be best from an implementation point of view.. but due to a requirement to know the remote IP address of a request for Synapse - which in turn uses Axis2 - that uses your library - I was able to hack a few lines to get this done for right now, but filed this issue to get it fixed in a later version of HttpCore.

Hence my view here is as a user, and I only want to be able to know the remote IP of a request, and am fine as long as I could get it :)

thanks
asankha

> Provide a way to access IP Address of the remote client making a request
> ------------------------------------------------------------------------
>
>                 Key: HTTPCORE-15
>                 URL: http://issues.apache.org/jira/browse/HTTPCORE-15
>             Project: HttpComponents Core
>          Issue Type: New Feature
>          Components: HttpCore
>    Affects Versions: 4.0-alpha3
>            Reporter: Asankha C. Perera
>         Assigned To: Oleg Kalnichevski
>            Priority: Minor
>         Attachments: httpsocketconn.patch
>
>
> Currently the API does not provide a way for implementations to find out the remote IP address of a request

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Updated: (HTTPCORE-15) Provide a way to access IP Address of the remote client making a request

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HTTPCORE-15?page=all ]

Oleg Kalnichevski updated HTTPCORE-15:
--------------------------------------

    Attachment: httpsocketconn.patch

Folks, how about this fix? Please let me know what you think

Oleg

> Provide a way to access IP Address of the remote client making a request
> ------------------------------------------------------------------------
>
>                 Key: HTTPCORE-15
>                 URL: http://issues.apache.org/jira/browse/HTTPCORE-15
>             Project: HttpComponents Core
>          Issue Type: New Feature
>          Components: HttpCore
>    Affects Versions: 4.0-alpha3
>            Reporter: Asankha C. Perera
>         Assigned To: Oleg Kalnichevski
>            Priority: Minor
>         Attachments: httpsocketconn.patch
>
>
> Currently the API does not provide a way for implementations to find out the remote IP address of a request

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Commented: (HTTPCORE-15) Provide a way to access IP Address of the remote client making a request

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HTTPCORE-15?page=comments#action_12451341 ] 
            
Oleg Kalnichevski commented on HTTPCORE-15:
-------------------------------------------

My initial plan was to expose local and remote end points as abstract java.net.SocketAddress, but I just relaized this is a Java 1.4 specific class. 

This requirement is reasonable, so we have got to find a solution for it. Keeping end point information in the HttpContext might be one way. Another way may be providing these details through an optional interface: HttpSocketConnection or some such

Asankha, what it your take?

Oleg

> Provide a way to access IP Address of the remote client making a request
> ------------------------------------------------------------------------
>
>                 Key: HTTPCORE-15
>                 URL: http://issues.apache.org/jira/browse/HTTPCORE-15
>             Project: HttpComponents Core
>          Issue Type: New Feature
>          Components: HttpCore
>    Affects Versions: 4.0-alpha3
>            Reporter: Asankha C. Perera
>         Assigned To: Oleg Kalnichevski
>            Priority: Minor
>
> Currently the API does not provide a way for implementations to find out the remote IP address of a request

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Commented: (HTTPCORE-15) Provide a way to access IP Address of the remote client making a request

Posted by "Roland Weber (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HTTPCORE-15?page=comments#action_12451707 ] 
            
Roland Weber commented on HTTPCORE-15:
--------------------------------------

Hi Oleg,

I thought we agreed to define general purpose connection interfaces in HttpConn and keep the interfaces in HttpCore down to the absolute minimum?
Otherwise, I'd have to mention that I see "open" as a common function shared by all socket based connections... much more so than "bind".

Sorry, I can't commit to to work on a patch at this time. It might be as simple as removing the method from the interface and changing some types to
implementation classes. But then again it might be more problematic, and I might have to wade through some NIO code to see what repercussions
that change brings with it.

cheers,
  Roland


> Provide a way to access IP Address of the remote client making a request
> ------------------------------------------------------------------------
>
>                 Key: HTTPCORE-15
>                 URL: http://issues.apache.org/jira/browse/HTTPCORE-15
>             Project: HttpComponents Core
>          Issue Type: New Feature
>          Components: HttpCore
>    Affects Versions: 4.0-alpha3
>            Reporter: Asankha C. Perera
>         Assigned To: Oleg Kalnichevski
>            Priority: Minor
>         Attachments: httpsocketconn.patch
>
>
> Currently the API does not provide a way for implementations to find out the remote IP address of a request

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Commented: (HTTPCORE-15) Provide a way to access IP Address of the remote client making a request

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HTTPCORE-15?page=comments#action_12451584 ] 
            
Oleg Kalnichevski commented on HTTPCORE-15:
-------------------------------------------

Asankha,

Thanks for your feedback. We will go with the optional interface option, then

Roland,

This is another case where we have to agree to disagree :-) I personally see ability to bind to an arbitrary socket as a common function shared by all socket based connections, which should be captured in a public interface of some sort. However, since this effectively boils down to a matter of taste I am fine with doing it your way. Will you have time to put together a new patch?

Oleg

> Provide a way to access IP Address of the remote client making a request
> ------------------------------------------------------------------------
>
>                 Key: HTTPCORE-15
>                 URL: http://issues.apache.org/jira/browse/HTTPCORE-15
>             Project: HttpComponents Core
>          Issue Type: New Feature
>          Components: HttpCore
>    Affects Versions: 4.0-alpha3
>            Reporter: Asankha C. Perera
>         Assigned To: Oleg Kalnichevski
>            Priority: Minor
>         Attachments: httpsocketconn.patch
>
>
> Currently the API does not provide a way for implementations to find out the remote IP address of a request

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Commented: (HTTPCORE-15) Provide a way to access IP Address of the remote client making a request

Posted by "Roland Weber (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HTTPCORE-15?page=comments#action_12451330 ] 
            
Roland Weber commented on HTTPCORE-15:
--------------------------------------

Hello Asankha, Oleg,

I don't see how we could address this in the HttpCore API. We don't want to reintroduce network layer dependencies now that we finally managed to shrink the connection interfaces to a minimum. We could add something to the implementation classes, but I am in disfavor of lifting this requirement to the core API level.
IMHO IP addresses should be confined to connection implementations. Maybe in the HttpConn API, but not in HttpCore.

The way traditional application servers handle this is that the web server plugin registers the remote IP address and forwards it as meta data with the request. Maybe we can change the server connection implementation to add the IP address to the HttpContext? I'm not sure how that fits with the NIO stuff though.

cheers,
  Roland


> Provide a way to access IP Address of the remote client making a request
> ------------------------------------------------------------------------
>
>                 Key: HTTPCORE-15
>                 URL: http://issues.apache.org/jira/browse/HTTPCORE-15
>             Project: HttpComponents Core
>          Issue Type: New Feature
>          Components: HttpCore
>    Affects Versions: 4.0-alpha3
>            Reporter: Asankha C. Perera
>         Assigned To: Oleg Kalnichevski
>            Priority: Minor
>
> Currently the API does not provide a way for implementations to find out the remote IP address of a request

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org