You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Noah Levitt <nl...@archive.org> on 2014/02/04 02:32:43 UTC
default ports in host header
Someone asked in 2011 how to trim default ports from the Host request
header. The answer from that time refers to deprecated code.
http://httpcomponents.10934.n7.nabble.com/Trimming-port-80-in-request-Host-header-td7402.html
What is the right way to do it now? This is the code I have at the
moment - https://github.com/internetarchive/heritrix3/pull/37/files
Btw browsers trim the default ports. Maybe httpcomponents should do
that by default?
Noah
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org
Re: default ports in host header
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2014-02-03 at 17:32 -0800, Noah Levitt wrote:
> Someone asked in 2011 how to trim default ports from the Host request
> header. The answer from that time refers to deprecated code.
> http://httpcomponents.10934.n7.nabble.com/Trimming-port-80-in-request-Host-header-td7402.html
>
> What is the right way to do it now? This is the code I have at the
> moment - https://github.com/internetarchive/heritrix3/pull/37/files
>
> Btw browsers trim the default ports. Maybe httpcomponents should do
> that by default?
>
> Noah
>
Why do you want to rewrite the 'Host' header in the first place. Why
can't you just use default (no explicit port) in the request URL?
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org