[ 
https://issues.apache.org/jira/browse/HTTPCORE-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Roland Weber closed HTTPCORE-111.
---------------------------------

    Resolution: Invalid

I'd guess the getRemoteAddress() is the one that returned null after the 
connection is closed.

cheers,
  Roland


> Provide method to get remote_ip, URI and status
> -----------------------------------------------
>
>                 Key: HTTPCORE-111
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-111
>             Project: HttpComponents Core
>          Issue Type: New Feature
>          Components: HttpCore NIO
>    Affects Versions: 4.0-alpha5
>         Environment: Ubuntu Linux
>            Reporter: Hubert Sieh
>            Priority: Minor
>
> Following your example for the basic, non-blocking HTTP server, I am trying 
> to simulate the info that you would get from the standard apache httpd 
> daemon, e.g.  remote IP, URI and return code that is typically found in 
> access.log.
> First, I tried getting this information from the EventLogger/EventListener
>             if (conn instanceof DefaultNHttpServerConnection)
>             {
>               DefaultNHttpServerConnection d = (DefaultNHttpServerConnection) 
> conn;
>               logger.info("connection from " + 
> d.getRemoteAddress().getHostAddress());
>               logger.info("requested: " + 
> d.getHttpRequest().getRequestLine().getUri());
>               logger.info("responded: " + 
> d.getHttpResponse().getStatusLine().getStatusCode());
>             }
> ... but this causes some IO/Exception
> Second, I tried logging this from the handle method in your 
> HttpRequestHandler, but I do not see how I can get the remote IP address.
> Seems like I can get the remote IP from the eventlistener, but not the URI 
> and status code.
> Or I can get the URI and status code from the httprequesthandler, but not the 
> remote IP.
> Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to