Description
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.
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);
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.