This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/7.1.x by this push:
     new b9b7ff9  Fix TSHttpTxnEffectiveUrlStringGet to correctly set the port 
when it is non-standard.
b9b7ff9 is described below

commit b9b7ff9bb9885be11747b95ea83c68916cacf629
Author: Alan M. Carroll <a...@apache.org>
AuthorDate: Mon Jan 28 16:31:10 2019 -0600

    Fix TSHttpTxnEffectiveUrlStringGet to correctly set the port when it is 
non-standard.
    
    (cherry picked from commit b9f29f0c096e95a621f022c6c30694fd949bd811)
---
 proxy/hdrs/HTTP.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/proxy/hdrs/HTTP.cc b/proxy/hdrs/HTTP.cc
index cb32ed7..6566dab 100644
--- a/proxy/hdrs/HTTP.cc
+++ b/proxy/hdrs/HTTP.cc
@@ -1699,6 +1699,7 @@ class UrlPrintHack
         ink_assert(nullptr == ui->m_ptr_port); // shouldn't be set if not in 
URL.
         ui->m_ptr_port    = m_port_buff;
         ui->m_len_port    = snprintf(m_port_buff, sizeof(m_port_buff), "%d", 
hdr->m_port);
+        ui->m_port        = hdr->m_port;
         m_port_modified_p = true;
       } else {
         m_port_modified_p = false;
@@ -1722,6 +1723,7 @@ class UrlPrintHack
       if (m_port_modified_p) {
         ui->m_len_port = 0;
         ui->m_ptr_port = nullptr;
+        ui->m_port     = 0;
       }
       if (m_host_modified_p) {
         ui->m_len_host = 0;

Reply via email to