You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2019/01/29 03:09:18 UTC

[trafficserver] branch master updated: Fix TSHttpTxnEffectiveUrlStringGet to correctly set the port when it is non-standard.

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

amc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


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

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

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

diff --git a/proxy/hdrs/HTTP.cc b/proxy/hdrs/HTTP.cc
index dabbc4e..dabd584 100644
--- a/proxy/hdrs/HTTP.cc
+++ b/proxy/hdrs/HTTP.cc
@@ -1689,6 +1689,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;
@@ -1712,6 +1713,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;