hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ram (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1682) HttpClient should allow NO port
Date Sun, 30 Aug 2015 08:13:45 GMT

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

Ram commented on HTTPCLIENT-1682:

The port addition is done by the default HttpRoutePlanner.

> HttpClient should allow NO port
> -------------------------------
>                 Key: HTTPCLIENT-1682
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1682
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>            Reporter: Nathan Hazout
> I've noticed that the CNN RSS (rss.cnn.com/rss/edition.rss) worked on some applications
but not on mine.
> Looking deeper, I saw that CNN rejects HTTP requests with
> Host: rss.cnn.com:80
> But accepts requests with
> Host: rss.cnn.com
> Even though 80 is the default port, it only accepts requests with NO port.
> According to the HTTP standards, this is a valid request (even if, granted, strange).
Also, I've noticed that major browsers (tested on chrome) strip out the port from the request
when it is 80.
> However, using HttpClient, setting no port still forces port 80 into the headers.
> Shouldn't HttpClient let the developer set no port all all?
> I'm not saying to automatically strip out the port like Chrome does, but maybe let the
developer decide - if he sets no port, then don't set a port for him automatically?

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