You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Alan M. Carroll (JIRA)" <ji...@apache.org> on 2014/08/19 23:39:18 UTC

[jira] [Resolved] (TS-3018) Client Request's default port can't be changed after scheme was changed

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

Alan M. Carroll resolved TS-3018.
---------------------------------

    Resolution: Fixed

We consider this a duplicate of TS-2933.

> Client Request's default port can't be changed after scheme was changed
> -----------------------------------------------------------------------
>
>                 Key: TS-3018
>                 URL: https://issues.apache.org/jira/browse/TS-3018
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>            Reporter: kang li
>            Assignee: Alan M. Carroll
>             Fix For: 5.1.0
>
>
> If I received a client request with scheme http and there are no port set in Host header or absolute URI in http request. Then I change the scheme to https. But when in url remap, it still get the port as 80 which indicated by the previous scheme.
> {code}
> 1475   } else if (0 != (m_host_mime = const_cast<HTTPHdr*>(this)->get_host_port_values(0, &m_host_length, &port_ptr, 0))) {
> 1476     if (port_ptr) {
> 1477       m_port = 0;
> 1478       for ( ; is_digit(*port_ptr) ; ++port_ptr )
> 1479         m_port = m_port * 10 + *port_ptr - '0';
> 1480       m_port_in_header = (0 != m_port);
> 1481     }
> 1482     m_port = url_canonicalize_port(url->m_url_impl->m_url_type, m_port);
> {code} 
> That seems the m_port was not reset to 0 when it second time try to get the port by url type (which was reset in UrlSchemeSet). So it always get the port in the initial time.



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