You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2015/09/03 04:39:05 UTC

[01/13] trafficserver git commit: TS-3825 epic plugin does not compile on OmniOS

Repository: trafficserver
Updated Branches:
  refs/heads/5.3.x 62f1753fa -> b77fff574


TS-3825 epic plugin does not compile on OmniOS

(cherry picked from commit 4019b970816f33716943e6a38fb4c9b2d70c8bfe)


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/9f213dc4
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/9f213dc4
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/9f213dc4

Branch: refs/heads/5.3.x
Commit: 9f213dc4834467e74e7232d80cbba5f209dd69ec
Parents: 62f1753
Author: Leif Hedstrom <zw...@apache.org>
Authored: Wed Aug 5 20:50:32 2015 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Sep 2 10:49:08 2015 -0600

----------------------------------------------------------------------
 plugins/experimental/epic/epic.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9f213dc4/plugins/experimental/epic/epic.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/epic/epic.cc b/plugins/experimental/epic/epic.cc
index 291502e..990a2c9 100644
--- a/plugins/experimental/epic/epic.cc
+++ b/plugins/experimental/epic/epic.cc
@@ -300,8 +300,9 @@ epic_flush_stats(TSCont /* contp */, TSEvent /* event */, void * /* edata */)
 void
 TSPluginInit(int argc, const char *argv[])
 {
-  static const struct option longopts[] = {
-    {"directory", required_argument, NULL, 'd'}, {"period", required_argument, NULL, 'p'}, {NULL, 0, NULL, 0}};
+  static const struct option longopts[] = {{const_cast<char *>("directory"), required_argument, NULL, 'd'},
+                                           {const_cast<char *>("period"), required_argument, NULL, 'p'},
+                                           {NULL, 0, NULL, 0}};
 
   TSPluginRegistrationInfo info;
 


[09/13] trafficserver git commit: TS-3788: Update CHANGES and clang-format

Posted by so...@apache.org.
TS-3788: Update CHANGES and clang-format


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4060f77a
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4060f77a
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4060f77a

Branch: refs/heads/5.3.x
Commit: 4060f77a64fc74a8e6d7af2301e36ac5aecb01e4
Parents: f0f22ce
Author: Phil Sorber <so...@apache.org>
Authored: Wed Sep 2 13:26:27 2015 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Sep 2 20:06:19 2015 -0600

----------------------------------------------------------------------
 CHANGES                         | 2 ++
 iocore/net/SSLNetVConnection.cc | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4060f77a/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 8d22d93..3dbff50 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.3.2
 
+  *) [TS-3788] SNI Callbacks stall after TS-3667 fix.
+
   *) [TS-3618] Crashes in traffic_cop on shutdown / restart.
 
   *) [TS-3823] Fix ASAN build support.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4060f77a/iocore/net/SSLNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index f6bd6b3..276ac25 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -1052,7 +1052,7 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
       // No data at the moment, hang tight
       SSLDebugVC(this, "SSL handshake: EAGAIN");
       return SSL_HANDSHAKE_WANT_READ;
-    } else if (retval < 0)  {
+    } else if (retval < 0) {
       // An error, make us go away
       SSLDebugVC(this, "SSL handshake error: read_retval=%d", retval);
       return EVENT_ERROR;


[03/13] trafficserver git commit: TS-3824 Fix #include of pcre for a couple of plugins

Posted by so...@apache.org.
TS-3824 Fix #include of pcre for a couple of plugins

(cherry picked from commit 0c28aa665ddf633171884a9ca0a90e89ade71ce5)
(cherry picked from commit 8939a3c68691137751fa11687b4b891505d8e510)


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fde5ff38
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fde5ff38
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fde5ff38

Branch: refs/heads/5.3.x
Commit: fde5ff38112daf2cf9794638968a72a346f04c0e
Parents: 957f28c
Author: Leif Hedstrom <zw...@apache.org>
Authored: Wed Aug 5 20:18:09 2015 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Sep 2 11:06:36 2015 -0600

----------------------------------------------------------------------
 plugins/experimental/geoip_acl/acl.h   | 5 +++++
 plugins/experimental/url_sig/url_sig.c | 1 +
 plugins/experimental/url_sig/url_sig.h | 1 -
 plugins/header_rewrite/regex_helper.h  | 6 ++++++
 4 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fde5ff38/plugins/experimental/geoip_acl/acl.h
----------------------------------------------------------------------
diff --git a/plugins/experimental/geoip_acl/acl.h b/plugins/experimental/geoip_acl/acl.h
index 81c35cf..e9be954 100644
--- a/plugins/experimental/geoip_acl/acl.h
+++ b/plugins/experimental/geoip_acl/acl.h
@@ -21,7 +21,12 @@
 
 #include <ts/ts.h>
 #include <ts/remap.h>
+
+#ifdef HAVE_PCRE_PCRE_H
+#include <pcre/pcre.h>
+#else
 #include <pcre.h>
+#endif
 
 #include <string>
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fde5ff38/plugins/experimental/url_sig/url_sig.c
----------------------------------------------------------------------
diff --git a/plugins/experimental/url_sig/url_sig.c b/plugins/experimental/url_sig/url_sig.c
index 43fdef0..672f2c5 100644
--- a/plugins/experimental/url_sig/url_sig.c
+++ b/plugins/experimental/url_sig/url_sig.c
@@ -16,6 +16,7 @@
   limitations under the License.
  */
 
+#include "ts/ink_defs.h"
 #include "url_sig.h"
 
 #include <stdio.h>

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fde5ff38/plugins/experimental/url_sig/url_sig.h
----------------------------------------------------------------------
diff --git a/plugins/experimental/url_sig/url_sig.h b/plugins/experimental/url_sig/url_sig.h
index 45fe462..d27ddf2 100644
--- a/plugins/experimental/url_sig/url_sig.h
+++ b/plugins/experimental/url_sig/url_sig.h
@@ -19,7 +19,6 @@
 #ifndef URL_SIG_H_
 #define URL_SIG_H_
 
-#define VERSION "1.0"
 /* in the query string that we add to sign the url: */
 #define CIP_QSTRING "C" /* C=24.0.33.12 designates the client IP address */
 #define EXP_QSTRING "E" /* E=1356128799 means expires at (seconds since Unix epoch) */

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fde5ff38/plugins/header_rewrite/regex_helper.h
----------------------------------------------------------------------
diff --git a/plugins/header_rewrite/regex_helper.h b/plugins/header_rewrite/regex_helper.h
index 45b061c..6be153a 100644
--- a/plugins/header_rewrite/regex_helper.h
+++ b/plugins/header_rewrite/regex_helper.h
@@ -18,7 +18,13 @@
 #ifndef REGEX_HELPER_H
 #define REGEX_HELPER_H
 
+#include "ts/ink_defs.h"
+
+#ifdef HAVE_PCRE_PCRE_H
+#include <pcre/pcre.h>
+#else
 #include <pcre.h>
+#endif
 
 #include <string>
 


[08/13] trafficserver git commit: TS-3788: SNI Callbacks stall after TS-3667 fix

Posted by so...@apache.org.
TS-3788: SNI Callbacks stall after TS-3667 fix

(cherry picked from commit ed48c9053c80372413b631be7946b7d30728e9e3)

Conflicts:
	iocore/net/SSLNetVConnection.cc


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f0f22ce1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f0f22ce1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f0f22ce1

Branch: refs/heads/5.3.x
Commit: f0f22ce1ac11bb41d09203b6017b2449e237f690
Parents: c022285
Author: shinrich <sh...@yahoo-inc.com>
Authored: Wed Jul 22 15:06:54 2015 -0500
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Sep 2 20:05:18 2015 -0600

----------------------------------------------------------------------
 iocore/net/SSLNetVConnection.cc | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f0f22ce1/iocore/net/SSLNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 436b3cf..f6bd6b3 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -949,23 +949,14 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
     return EVENT_DONE;
   }
 
-  // All the pre-accept hooks have completed, proceed with the actual accept.
+  int retval = 1; // Initialze with a non-error value
 
+  // All the pre-accept hooks have completed, proceed with the actual accept.
   if (BIO_eof(SSL_get_rbio(this->ssl))) { // No more data in the buffer
     // Read from socket to fill in the BIO buffer with the
     // raw handshake data before calling the ssl accept calls.
-    int retval = this->read_raw_data();
-    if (retval < 0) {
-      if (retval == -EAGAIN) {
-        // No data at the moment, hang tight
-        SSLDebugVC(this, "SSL handshake: EAGAIN");
-        return SSL_HANDSHAKE_WANT_READ;
-      } else {
-        // An error, make us go away
-        SSLDebugVC(this, "SSL handshake error: read_retval=%d", retval);
-        return EVENT_ERROR;
-      }
-    } else if (retval == 0) {
+    retval = this->read_raw_data();
+    if (retval == 0) {
       // EOF, go away, we stopped in the handshake
       SSLDebugVC(this, "SSL handshake error: EOF");
       return EVENT_ERROR;
@@ -1057,6 +1048,15 @@ SSLNetVConnection::sslServerHandShakeEvent(int &err)
     return SSL_HANDSHAKE_WANT_WRITE;
 
   case SSL_ERROR_WANT_READ:
+    if (retval == -EAGAIN) {
+      // No data at the moment, hang tight
+      SSLDebugVC(this, "SSL handshake: EAGAIN");
+      return SSL_HANDSHAKE_WANT_READ;
+    } else if (retval < 0)  {
+      // An error, make us go away
+      SSLDebugVC(this, "SSL handshake error: read_retval=%d", retval);
+      return EVENT_ERROR;
+    }
     return SSL_HANDSHAKE_WANT_READ;
 
 // This value is only defined in openssl has been patched to


[06/13] trafficserver git commit: TS-3823: Update CHANGES

Posted by so...@apache.org.
TS-3823: Update CHANGES


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/ce9e335f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/ce9e335f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/ce9e335f

Branch: refs/heads/5.3.x
Commit: ce9e335fb0b503791fc10535ddcfad50f19d0ba1
Parents: c9ac053
Author: Phil Sorber <so...@apache.org>
Authored: Wed Sep 2 11:50:33 2015 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Sep 2 11:50:33 2015 -0600

----------------------------------------------------------------------
 CHANGES | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce9e335f/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index e263b07..63ed0e7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.3.2
 
+  *) [TS-3823] Fix ASAN build support.
+
   *) [TS-3824] Fix #include of pcre for a couple of plugins.
 
   *) [TS-3825] epic plugin does not compile on OmniOS.


[02/13] trafficserver git commit: TS-3825: Update CHANGES

Posted by so...@apache.org.
TS-3825: Update CHANGES


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/957f28c1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/957f28c1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/957f28c1

Branch: refs/heads/5.3.x
Commit: 957f28c1c7b96e3bc7a49d114febfd90cc5e08f7
Parents: 9f213dc
Author: Phil Sorber <so...@apache.org>
Authored: Wed Sep 2 11:00:30 2015 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Sep 2 11:00:30 2015 -0600

----------------------------------------------------------------------
 CHANGES | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/957f28c1/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index d7262b9..1a258b8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.3.2
 
+  *) [TS-3825] epic plugin does not compile on OmniOS.
+
   *) [TS-3720] Revert "TS-3237: Don't segregate DNS results by port."
 
   *) [TS-3622] Add a bound to read_while_writer retries with a config setting.


[07/13] trafficserver git commit: TS-3618: crashes in traffic_cop on shutdown

Posted by so...@apache.org.
TS-3618: crashes in traffic_cop on shutdown

(cherry picked from commit edc8fbc923a62111c15965499d9b2b91a212fc57)
(cherry picked from commit 3ea9ccc302557a308549fc23cb0d078cbcd9ec1d)

Conflicts:
	CHANGES


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/c022285f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c022285f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c022285f

Branch: refs/heads/5.3.x
Commit: c022285f985c01a40dd14f92ec783250e54d2b48
Parents: ce9e335
Author: Brian Geffon <br...@apache.org>
Authored: Wed May 20 18:25:45 2015 -0700
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Sep 2 20:05:08 2015 -0600

----------------------------------------------------------------------
 CHANGES                        | 2 ++
 cmd/traffic_cop/traffic_cop.cc | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c022285f/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 63ed0e7..8d22d93 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.3.2
 
+  *) [TS-3618] Crashes in traffic_cop on shutdown / restart.
+
   *) [TS-3823] Fix ASAN build support.
 
   *) [TS-3824] Fix #include of pcre for a couple of plugins.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c022285f/cmd/traffic_cop/traffic_cop.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_cop/traffic_cop.cc b/cmd/traffic_cop/traffic_cop.cc
index 20b73b9..9665dde 100644
--- a/cmd/traffic_cop/traffic_cop.cc
+++ b/cmd/traffic_cop/traffic_cop.cc
@@ -270,7 +270,7 @@ sig_term(int signum)
     child_status = status;
   }
   cop_log_trace("Leaving sig_term(%d), exiting traffic_cop\n", signum);
-  exit(0);
+  _exit(0);
 }
 
 static void


[05/13] trafficserver git commit: TS-3823: * ASAN makes us forget to add -ldl on the LIBS * Fix tests for -lpthread, and undo some of TS-3308. This retains the support for ASAN in a cleaner way

Posted by so...@apache.org.
TS-3823:
 * ASAN makes us forget to add -ldl on the LIBS
 * Fix tests for -lpthread, and undo some of TS-3308. This retains the support for ASAN in a cleaner way

(cherry picked from commit a0a74505e279b69a5ca5a6eb7fa7a3a97136fe90)
(cherry picked from commit b4dea28aaed390f1def4248a79361099cbb0b717)
(cherry picked from commit fe64607f236ca8bb4a0911eb8ad1d5c17ba90b81)


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/c9ac053a
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c9ac053a
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c9ac053a

Branch: refs/heads/5.3.x
Commit: c9ac053a052c1077f859bbac3f9287507358b131
Parents: 4185ea7
Author: Leif Hedstrom <zw...@apache.org>
Authored: Wed Aug 5 13:54:38 2015 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Sep 2 11:33:40 2015 -0600

----------------------------------------------------------------------
 cmd/traffic_crashlog/Makefile.am |  2 +-
 cmd/traffic_layout/Makefile.am   |  2 +-
 cmd/traffic_manager/Makefile.am  |  2 +-
 configure.ac                     | 11 +++++++----
 proxy/Makefile.am                |  6 ++----
 5 files changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c9ac053a/cmd/traffic_crashlog/Makefile.am
----------------------------------------------------------------------
diff --git a/cmd/traffic_crashlog/Makefile.am b/cmd/traffic_crashlog/Makefile.am
index 558b801..3621521 100644
--- a/cmd/traffic_crashlog/Makefile.am
+++ b/cmd/traffic_crashlog/Makefile.am
@@ -44,4 +44,4 @@ traffic_crashlog_LDADD = \
   $(top_builddir)/proxy/shared/libUglyLogStubs.a \
   $(top_builddir)/mgmt/api/libtsmgmt.la \
   $(top_builddir)/lib/ts/libtsutil.la \
-  @LIBTCL@ @HWLOC_LIBS@ @LIBPTHREAD@
+  @LIBTCL@ @HWLOC_LIBS@

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c9ac053a/cmd/traffic_layout/Makefile.am
----------------------------------------------------------------------
diff --git a/cmd/traffic_layout/Makefile.am b/cmd/traffic_layout/Makefile.am
index 571a42a..15a24a9 100644
--- a/cmd/traffic_layout/Makefile.am
+++ b/cmd/traffic_layout/Makefile.am
@@ -40,4 +40,4 @@ traffic_layout_LDADD = \
   $(top_builddir)/iocore/eventsystem/libinkevent.a \
   $(top_builddir)/proxy/shared/libUglyLogStubs.a \
   $(top_builddir)/lib/ts/libtsutil.la \
-  @LIBTCL@ @HWLOC_LIBS@ @LIBPTHREAD@
+  @LIBTCL@ @HWLOC_LIBS@

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c9ac053a/cmd/traffic_manager/Makefile.am
----------------------------------------------------------------------
diff --git a/cmd/traffic_manager/Makefile.am b/cmd/traffic_manager/Makefile.am
index 4f634e4..521c45f 100644
--- a/cmd/traffic_manager/Makefile.am
+++ b/cmd/traffic_manager/Makefile.am
@@ -60,7 +60,7 @@ traffic_manager_LDADD = \
   $(top_builddir)/proxy/shared/liberror.a \
   $(top_builddir)/proxy/shared/libdiagsconfig.a \
   $(LIBUNWIND_LIBS) \
-  @LIBRESOLV@ @LIBEXPAT@ @LIBPCRE@ @LIBTCL@ @LIBCAP@ @HWLOC_LIBS@ @LIBPTHREAD@ \
+  @LIBRESOLV@ @LIBEXPAT@ @LIBPCRE@ @LIBTCL@ @LIBCAP@ @HWLOC_LIBS@ \
   -lm
 
 # Must do it this way or the dependencies aren't detected.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c9ac053a/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index e8d3ac9..fe2af20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1097,15 +1097,18 @@ fi
 
 AC_SEARCH_LIBS([exc_capture_context], [exc], [], [])
 AC_SEARCH_LIBS([MLD_demangle_string], [mld], [], [])
-AC_SEARCH_LIBS([dlopen], [dl], [], [])
 AC_SEARCH_LIBS([socket], [socket], [], [])
 AC_SEARCH_LIBS([gethostbyname], [nsl], [], [])
 AC_SEARCH_LIBS([clock_gettime], [rt], [], [])
 AC_SEARCH_LIBS([clock_gettime], [posix4], [], [])
 
-dnl Linux has pthread symbol stubss in both libc ad libpthread, so it's important to test
-dnl specifically for pthread_create() here.
-AC_SEARCH_LIBS([pthread_create], [pthread],[AC_SUBST([LIBPTHREAD],["-lpthread"])], [])
+dnl We check for dlsym here instead of e.g. dlopen() because ASAN hijacks the latter.
+AC_SEARCH_LIBS([dlsym], [dl], [], [])
+
+dnl Linux has pthread symbol stubss in both libc and libpthread, so it's important to test
+dnl specifically for pthread_yield() here. In addition, ASAN hijacks pthread_create() so
+dnl we can't use that anymore.
+AC_SEARCH_LIBS([pthread_yield], [pthread], [], [])
 
 dnl XXX The following check incorrectly causes the build to succeed
 dnl on Darwin. We should be using AC_SEARCH_LIBS, but rest_init is

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c9ac053a/proxy/Makefile.am
----------------------------------------------------------------------
diff --git a/proxy/Makefile.am b/proxy/Makefile.am
index ce5041f..505fc56 100644
--- a/proxy/Makefile.am
+++ b/proxy/Makefile.am
@@ -239,7 +239,6 @@ traffic_server_LDADD = \
   @LIBPROFILER@ \
   @SPDYLAY_LIBS@ \
   @OPENSSL_LIBS@ \
-  @LIBPTHREAD@ \
   -lm
 
 if BUILD_LUAJIT
@@ -261,7 +260,7 @@ traffic_logcat_LDADD = \
   $(top_builddir)/iocore/eventsystem/libinkevent.a \
   $(top_builddir)/lib/ts/libtsutil.la \
   @LIBRESOLV@ @LIBPCRE@ @LIBTCL@ @HWLOC_LIBS@\
-  @LIBEXPAT@ @LIBPROFILER@ @LIBPTHREAD@ -lm
+  @LIBEXPAT@ @LIBPROFILER@ -lm
 
 traffic_logstats_SOURCES = logstats.cc
 traffic_logstats_LDADD = \
@@ -274,7 +273,7 @@ traffic_logstats_LDADD = \
   $(top_builddir)/iocore/eventsystem/libinkevent.a \
   $(top_builddir)/lib/ts/libtsutil.la \
   @LIBRESOLV@ @LIBPCRE@ @LIBTCL@ @HWLOC_LIBS@ \
-  @LIBEXPAT@ @LIBPROFILER@ @LIBPTHREAD@ -lm
+  @LIBEXPAT@ @LIBPROFILER@ -lm
 
 traffic_sac_SOURCES = \
   sac.cc \
@@ -339,7 +338,6 @@ traffic_sac_LDADD = \
   @LIBPROFILER@ \
   @SPDYLAY_LIBS@ \
   @OPENSSL_LIBS@ \
-  @LIBPTHREAD@ \
   -lm
 
 if BUILD_TESTS


[13/13] trafficserver git commit: TS-3658: Update CHANGES

Posted by so...@apache.org.
TS-3658: Update CHANGES


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/b77fff57
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/b77fff57
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/b77fff57

Branch: refs/heads/5.3.x
Commit: b77fff5746991f4ae61c4048b22faf1ba4a2f4ba
Parents: 044fdba
Author: Phil Sorber <so...@apache.org>
Authored: Wed Sep 2 20:19:47 2015 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Sep 2 20:19:47 2015 -0600

----------------------------------------------------------------------
 CHANGES | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b77fff57/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index de1ce38..ea7c90b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.3.2
 
+  *) [TS-3658] ASAN triggers when using the escalate.so plugin.
+
   *) [TS-3486] Crashes due to race condition on server sessions moving between threads.
 
   *) [TS-3788] SNI Callbacks stall after TS-3667 fix.


[11/13] trafficserver git commit: TS-3486: Update CHANGES

Posted by so...@apache.org.
TS-3486: Update CHANGES


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6cf09155
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6cf09155
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6cf09155

Branch: refs/heads/5.3.x
Commit: 6cf09155441765c6388fda924a46598499cbbb95
Parents: 7e0fafd
Author: Phil Sorber <so...@apache.org>
Authored: Wed Sep 2 20:04:13 2015 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Sep 2 20:06:24 2015 -0600

----------------------------------------------------------------------
 CHANGES | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6cf09155/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 3dbff50..de1ce38 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.3.2
 
+  *) [TS-3486] Crashes due to race condition on server sessions moving between threads.
+
   *) [TS-3788] SNI Callbacks stall after TS-3667 fix.
 
   *) [TS-3618] Crashes in traffic_cop on shutdown / restart.


[04/13] trafficserver git commit: TS-3824: Update CHANGES

Posted by so...@apache.org.
TS-3824: Update CHANGES


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4185ea75
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4185ea75
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4185ea75

Branch: refs/heads/5.3.x
Commit: 4185ea75a83bfbb0468c55048c3163a66dc0e22e
Parents: fde5ff3
Author: Phil Sorber <so...@apache.org>
Authored: Wed Sep 2 11:08:17 2015 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Sep 2 11:08:17 2015 -0600

----------------------------------------------------------------------
 CHANGES | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4185ea75/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 1a258b8..e263b07 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.3.2
 
+  *) [TS-3824] Fix #include of pcre for a couple of plugins.
+
   *) [TS-3825] epic plugin does not compile on OmniOS.
 
   *) [TS-3720] Revert "TS-3237: Don't segregate DNS results by port."


[10/13] trafficserver git commit: TS-3486: Crashes due to race condition on server sessions moving between threads. This closes #235

Posted by so...@apache.org.
TS-3486: Crashes due to race condition on server sessions moving between threads. This closes #235

(cherry picked from commit a638d97019e1b3ef4e6ec53b93d81a96885cbb6e)
(cherry picked from commit 1a160e13e4931fbaa522339c99abfad1ce9d638c)

Conflicts:
	proxy/http/HttpSessionManager.cc


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/7e0fafd0
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/7e0fafd0
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/7e0fafd0

Branch: refs/heads/5.3.x
Commit: 7e0fafd0584cefa7b088a1b522235e9b4b81ed15
Parents: 4060f77
Author: shinrich <sh...@yahoo-inc.com>
Authored: Fri Jun 26 13:11:40 2015 -0500
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Sep 2 20:06:24 2015 -0600

----------------------------------------------------------------------
 iocore/net/UnixNetVConnection.cc |  4 ++-
 proxy/http/HttpServerSession.cc  |  1 -
 proxy/http/HttpSessionManager.cc | 59 +++++++++++++++++++----------------
 proxy/http/HttpSessionManager.h  | 15 ++++-----
 4 files changed, 43 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7e0fafd0/iocore/net/UnixNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index 2e44010..2359ca2 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -244,7 +244,7 @@ read_from_net(NetHandler *nh, UnixNetVConnection *vc, EThread *thread)
 
   MUTEX_TRY_LOCK_FOR(lock, s->vio.mutex, thread, s->vio._cont);
 
-  if (!lock.is_locked() || lock.get_mutex() != s->vio.mutex.m_ptr) {
+  if (!lock.is_locked()) {
     read_reschedule(nh, vc);
     return;
   }
@@ -632,9 +632,11 @@ UnixNetVConnection::do_io_close(int alerrno /* = -1 */)
   read.vio.buffer.clear();
   read.vio.nbytes = 0;
   read.vio.op = VIO::NONE;
+  read.vio._cont = NULL;
   write.vio.buffer.clear();
   write.vio.nbytes = 0;
   write.vio.op = VIO::NONE;
+  write.vio._cont = NULL;
 
   EThread *t = this_ethread();
   bool close_inline = !recursion && nh->mutex->thread_holding == t;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7e0fafd0/proxy/http/HttpServerSession.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpServerSession.cc b/proxy/http/HttpServerSession.cc
index 5b71cfe..7acaa5e 100644
--- a/proxy/http/HttpServerSession.cc
+++ b/proxy/http/HttpServerSession.cc
@@ -170,7 +170,6 @@ HttpServerSession::release()
 
   HSMresult_t r = httpSessionManager.release_session(this);
 
-
   if (r == HSM_RETRY) {
     // Session could not be put in the session manager
     //  due to lock contention

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7e0fafd0/proxy/http/HttpSessionManager.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSessionManager.cc b/proxy/http/HttpSessionManager.cc
index 611e781..c3a1676 100644
--- a/proxy/http/HttpSessionManager.cc
+++ b/proxy/http/HttpSessionManager.cc
@@ -74,11 +74,11 @@ ServerSessionPool::match(HttpServerSession *ss, sockaddr const *addr, INK_MD5 co
          (TS_SERVER_SESSION_SHARING_MATCH_HOST == match_style || ats_ip_addr_port_eq(ss->server_ip, addr));
 }
 
-HttpServerSession *
-ServerSessionPool::acquireSession(sockaddr const *addr, INK_MD5 const &hostname_hash, TSServerSessionSharingMatchType match_style)
+HSMresult_t
+ServerSessionPool::acquireSession(sockaddr const *addr, INK_MD5 const &hostname_hash, TSServerSessionSharingMatchType match_style,
+                                  HttpServerSession *&to_return)
 {
-  HttpServerSession *zret = NULL;
-
+  HSMresult_t zret = HSM_NOT_FOUND;
   if (TS_SERVER_SESSION_SHARING_MATCH_HOST == match_style) {
     // This is broken out because only in this case do we check the host hash first.
     HostHashTable::Location loc = m_host_pool.find(hostname_hash);
@@ -86,9 +86,9 @@ ServerSessionPool::acquireSession(sockaddr const *addr, INK_MD5 const &hostname_
     while (loc && port != ats_ip_port_cast(loc->server_ip))
       ++loc; // scan for matching port.
     if (loc) {
-      zret = loc;
+      to_return = loc;
       m_host_pool.remove(loc);
-      m_ip_pool.remove(m_ip_pool.find(zret));
+      m_ip_pool.remove(m_ip_pool.find(loc));
     }
   } else if (TS_SERVER_SESSION_SHARING_MATCH_NONE != match_style) { // matching is not disabled.
     IPHashTable::Location loc = m_ip_pool.find(addr);
@@ -100,9 +100,9 @@ ServerSessionPool::acquireSession(sockaddr const *addr, INK_MD5 const &hostname_
         ++loc;
     }
     if (loc) {
-      zret = loc;
+      to_return = loc;
       m_ip_pool.remove(loc);
-      m_host_pool.remove(m_host_pool.find(zret));
+      m_host_pool.remove(m_host_pool.find(loc));
     }
   }
   return zret;
@@ -238,6 +238,7 @@ HttpSessionManager::acquire_session(Continuation * /* cont ATS_UNUSED */, sockad
   TSServerSessionSharingMatchType match_style =
     static_cast<TSServerSessionSharingMatchType>(sm->t_state.txn_conf->server_session_sharing_match);
   INK_MD5 hostname_hash;
+  HSMresult_t retval = HSM_NOT_FOUND;
 
   ink_code_md5((unsigned char *)hostname, strlen(hostname), (unsigned char *)&hostname_hash);
 
@@ -265,28 +266,32 @@ HttpSessionManager::acquire_session(Continuation * /* cont ATS_UNUSED */, sockad
   // Now check to see if we have a connection in our shared connection pool
   EThread *ethread = this_ethread();
 
-  if (TS_SERVER_SESSION_SHARING_POOL_THREAD == sm->t_state.txn_conf->server_session_sharing_pool) {
-    to_return = ethread->server_session_pool->acquireSession(ip, hostname_hash, match_style);
-  } else {
-    MUTEX_TRY_LOCK(lock, m_g_pool->mutex, ethread);
-    if (lock.is_locked()) {
-      to_return = m_g_pool->acquireSession(ip, hostname_hash, match_style);
-      Debug("http_ss", "[acquire session] pool search %s", to_return ? "successful" : "failed");
+  ProxyMutex *pool_mutex = (TS_SERVER_SESSION_SHARING_POOL_THREAD == sm->t_state.txn_conf->server_session_sharing_pool) ?
+                             ethread->server_session_pool->mutex :
+                             m_g_pool->mutex;
+  MUTEX_TRY_LOCK(lock, pool_mutex, ethread);
+  if (lock.is_locked()) {
+    if (TS_SERVER_SESSION_SHARING_POOL_THREAD == sm->t_state.txn_conf->server_session_sharing_pool) {
+      retval = ethread->server_session_pool->acquireSession(ip, hostname_hash, match_style, to_return);
+      Debug("http_ss", "[acquire session] thread pool search %s", to_return ? "successful" : "failed");
     } else {
-      Debug("http_ss", "[acquire session] could not acquire session due to lock contention");
-      return HSM_RETRY;
+      retval = m_g_pool->acquireSession(ip, hostname_hash, match_style, to_return);
+      Debug("http_ss", "[acquire session] global pool search %s", to_return ? "successful" : "failed");
     }
+    if (to_return) {
+      Debug("http_ss", "[%" PRId64 "] [acquire session] return session from shared pool", to_return->con_id);
+      to_return->state = HSS_ACTIVE;
+      // Holding the pool lock and the sm lock
+      // the attach_server_session will issue the do_io_read under the sm lock
+      // Must be careful to transfer the lock for the read vio because
+      // the server VC may be moving between threads TS-3266
+      sm->attach_server_session(to_return);
+      retval = HSM_DONE;
+    }
+  } else {
+    retval = HSM_RETRY;
   }
-
-  if (to_return) {
-    Debug("http_ss", "[%" PRId64 "] [acquire session] "
-                     "return session from shared pool",
-          to_return->con_id);
-    to_return->state = HSS_ACTIVE;
-    sm->attach_server_session(to_return);
-    return HSM_DONE;
-  }
-  return HSM_NOT_FOUND;
+  return retval;
 }
 
 HSMresult_t

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7e0fafd0/proxy/http/HttpSessionManager.h
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSessionManager.h b/proxy/http/HttpSessionManager.h
index 07462bb..8d82756 100644
--- a/proxy/http/HttpSessionManager.h
+++ b/proxy/http/HttpSessionManager.h
@@ -43,6 +43,12 @@ class HttpSM;
 
 void initialize_thread_for_http_sessions(EThread *thread, int thread_index);
 
+enum HSMresult_t {
+  HSM_DONE,
+  HSM_RETRY,
+  HSM_NOT_FOUND,
+};
+
 /** A pool of server sessions.
 
     This is a continuation so that it can get callbacks from the server sessions.
@@ -126,7 +132,8 @@ public:
 
       @return A pointer to the session or @c NULL if not matching session was found.
   */
-  HttpServerSession *acquireSession(sockaddr const *addr, INK_MD5 const &host_hash, TSServerSessionSharingMatchType match_style);
+  HSMresult_t acquireSession(sockaddr const *addr, INK_MD5 const &host_hash, TSServerSessionSharingMatchType match_style,
+                             HttpServerSession *&server_session);
   /** Release a session to to pool.
    */
   void releaseSession(HttpServerSession *ss);
@@ -140,12 +147,6 @@ public:
   HostHashTable m_host_pool;
 };
 
-enum HSMresult_t {
-  HSM_DONE,
-  HSM_RETRY,
-  HSM_NOT_FOUND,
-};
-
 class HttpSessionManager
 {
 public:


[12/13] trafficserver git commit: TS-3658 ASAN triggers when using the escalate.so plugin

Posted by so...@apache.org.
TS-3658 ASAN triggers when using the escalate.so plugin

(cherry picked from commit 9e8800c5f648e4902c522087e88d9ea806a1de4f)

Conflicts:
	proxy/http/HttpSM.cc


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/044fdba0
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/044fdba0
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/044fdba0

Branch: refs/heads/5.3.x
Commit: 044fdba0625578a53067a2a39c29ba2cf591bafd
Parents: 6cf0915
Author: Leif Hedstrom <zw...@apache.org>
Authored: Wed Aug 5 20:08:52 2015 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Sep 2 20:12:41 2015 -0600

----------------------------------------------------------------------
 proxy/http/HttpSM.cc | 48 ++++++++++++++++++++---------------------------
 1 file changed, 20 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/044fdba0/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 0d40dd0..9a91206 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -7495,37 +7495,33 @@ HttpSM::redirect_request(const char *redirect_url, const int redirect_len)
 
     if (host != NULL) {
       int port = clientUrl.port_get();
-      char buf[host_len + 7];
-
       int redirectSchemeLen;
       const char *redirectScheme = clientUrl.scheme_get(&redirectSchemeLen);
+
       if (redirectScheme == NULL) {
         clientUrl.scheme_set(scheme_str, scheme_len);
-        DebugSM("http_redirect", "[HttpSM::redirect_request] hsot without scheme %s", buf);
+        DebugSM("http_redirect", "[HttpSM::redirect_request] URL without scheme %.*s", redirectSchemeLen, redirectScheme);
       }
 
       if (noPortInHost) {
         int redirectSchemeIdx = clientUrl.scheme_get_wksidx();
-
         bool defaultPort =
           (((redirectSchemeIdx == URL_WKSIDX_HTTP) && (port == 80)) || ((redirectSchemeIdx == URL_WKSIDX_HTTPS) && (port == 443)));
 
-        if (!defaultPort)
+        if (!defaultPort) {
           noPortInHost = false;
+        }
       }
 
-      ink_strlcpy(buf, host, host_len + 1);
-
       if (!noPortInHost) {
-        char port_buf[6]; // handle upto 5 digit port
-        buf[host_len++] = ':';
+        char buf[host_len + 7]; // 5 + 1 + 1 ("12345" + ':' + '\0')
 
-        host_len += ink_small_itoa(port, port_buf, sizeof(port_buf));
-        ink_strlcat(buf, port_buf, sizeof(buf));
+        host_len = snprintf(buf, host_len + 7, "%.*s:%d", host_len, host, port);
+        t_state.hdr_info.client_request.value_set(MIME_FIELD_HOST, MIME_LEN_HOST, buf, host_len);
+      } else {
+        t_state.hdr_info.client_request.value_set(MIME_FIELD_HOST, MIME_LEN_HOST, host, host_len);
       }
-
       t_state.hdr_info.client_request.m_target_cached = false;
-      t_state.hdr_info.client_request.value_set(MIME_FIELD_HOST, MIME_LEN_HOST, buf, host_len);
     } else {
       // the client request didn't have a host, so use the current origin host
       if (valid_origHost) {
@@ -7533,18 +7529,15 @@ HttpSM::redirect_request(const char *redirect_url, const int redirect_len)
 
         // the client request didn't have a host, so use the current origin host
         DebugSM("http_redirect", "[HttpSM::redirect_request] keeping client request host %s://%s", next_hop_scheme, origHost);
-        char *origHost1 = strtok_r(origHost, ":", &saveptr);
-        if (origHost1 == NULL) {
+        char *origHostNoPort = strtok_r(origHost, ":", &saveptr);
+
+        if (origHostNoPort == NULL) {
           goto LhostError;
         }
-        origHost_len = strlen(origHost1);
-        int origHostPort_len = origHost_len;
-        char buf[origHostPort_len + 7];
-        ink_strlcpy(buf, origHost1, origHost_len + 1);
 
+        host_len = strlen(origHostNoPort);
         if (noPortInHost) {
           int redirectSchemeIdx = t_state.next_hop_scheme;
-
           bool defaultPort = (((redirectSchemeIdx == URL_WKSIDX_HTTP) && (origPort == 80)) ||
                               ((redirectSchemeIdx == URL_WKSIDX_HTTPS) && (origPort == 443)));
 
@@ -7553,19 +7546,18 @@ HttpSM::redirect_request(const char *redirect_url, const int redirect_len)
         }
 
         if (!noPortInHost) {
-          char port_buf[6]; // handle upto 5 digit port
-          buf[origHostPort_len++] = ':';
-          origHostPort_len += ink_small_itoa(origPort, port_buf, sizeof(port_buf));
-          ink_strlcat(buf, port_buf, sizeof(buf));
+          char buf[host_len + 7]; // 5 + 1 + 1 ("12345" + ':' + '\0')
+
+          host_len = snprintf(buf, host_len + 7, "%s:%d", origHostNoPort, origPort);
+          t_state.hdr_info.client_request.value_set(MIME_FIELD_HOST, MIME_LEN_HOST, buf, host_len);
+        } else {
+          t_state.hdr_info.client_request.value_set(MIME_FIELD_HOST, MIME_LEN_HOST, origHostNoPort, host_len);
         }
 
+        // Cleanup of state etc.
         url_nuke_proxy_stuff(clientUrl.m_url_impl);
         url_nuke_proxy_stuff(t_state.hdr_info.client_request.m_url_cached.m_url_impl);
         t_state.hdr_info.client_request.method_set(origMethod, origMethod_len);
-        if (noPortInHost)
-          t_state.hdr_info.client_request.value_set(MIME_FIELD_HOST, MIME_LEN_HOST, buf, origHost_len);
-        else
-          t_state.hdr_info.client_request.value_set(MIME_FIELD_HOST, MIME_LEN_HOST, buf, origHostPort_len);
         t_state.hdr_info.client_request.m_target_cached = false;
         clientUrl.scheme_set(scheme_str, scheme_len);
       } else {