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

Oleg Kalnichevski resolved HTTPCLIENT-1496.
-------------------------------------------

    Resolution: Not a Problem

> HttpRequestInterceptors do not have easy access to the scheme, host or port 
> of the request.
> -------------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1496
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1496
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 4.3.3
>            Reporter: Matt Inger
>
> When writing an HttpRequestInterceptor, there are some cases where it is 
> necessary to have access to the absolute URL of the request being 
> intercepted.  This is required in order to get data like the scheme 
> (http/https) and the host name in some situations.
> However, due to the nature of how the requests are wrapped in HttpClient 4.3, 
> all instances of HttpUriRequest are wrapped with an HttpRequestWrapper, and 
> converted into a relative request.
> At that point, you cannot retrieve the scheme, hostname or port of the 
> original request without casting to an HttpRequestWrapper, and unwrapping the 
> original request from it.
> It would be helpful if there was a way to easily retrieve this information 
> from the HttpRequestWrapper.  Even more helpful would be some mechanism (a 
> new method on HttpRequest perhaps) to retrieve all these pieces of data 
> without having an instanceof and a cast.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to