hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1513) Trim default ports (80 and 443) in host header
Date Wed, 28 May 2014 13:11:02 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14011072#comment-14011072

Oleg Kalnichevski commented on HTTPCLIENT-1513:

Just out of curiosity If you do not want port in the request URI why do you put it there in
the first place? 

Besides, one can already customize the way Host request header is generated by replacing RequestTargetHost
interceptor with a custom one or by adding another interceptor to rewrite the value generated
by the framework.


> Trim default ports (80 and 443) in host header
> ----------------------------------------------
>                 Key: HTTPCLIENT-1513
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1513
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 4.3.3
>            Reporter: pavan
> When a HTTP request is made using HTTP components and the request url contains a default
port (80 for http and 443 for https)
> http://example.com:80/something
> https://example.com:443/something
> Seems like the host header is taken from the URL authority(host:port) part. There by
the host header includes the ports 80 and 443. According to HTTP spec if no port is specified
in the host header it defaults 80 or 443 (based on http or https).
> When i am accessing maps.googleapi.com if the host header contains the default port 443
the server is rejecting the request. I  understand that the server should accept such host
headers. But still it will be good if we can trim out the default ports or at least provide
a property to trim out default ports.

This message was sent by Atlassian JIRA

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

View raw message