[trafficserver] branch master updated: Fixed typo in cachekey plugin documentation

2017-10-04 Thread maskit
This is an automated email from the ASF dual-hosted git repository.

maskit 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 782d4f6  Fixed typo in cachekey plugin documentation
782d4f6 is described below

commit 782d4f6ac3ba64b4122c63905b8c9b3d1c804178
Author: Jonathan G 
AuthorDate: Wed Oct 4 13:14:57 2017 -0600

Fixed typo in cachekey plugin documentation
---
 doc/admin-guide/plugins/cachekey.en.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/admin-guide/plugins/cachekey.en.rst 
b/doc/admin-guide/plugins/cachekey.en.rst
index 39f7c55..b36e6ee 100644
--- a/doc/admin-guide/plugins/cachekey.en.rst
+++ b/doc/admin-guide/plugins/cachekey.en.rst
@@ -167,7 +167,7 @@ All parameters are optional, and if not used, their default 
values are as mentio
 
 Cache key elements separator
 
-* ``--separator=`` - the cache key is constructed by extracting 
elements from HTTP URI and headers or by using the UA classifiers and they are 
appended during the key construction and separated by ``/`` (by default). This 
options allows to override the dafault separator to any string (including an 
empty string)
+* ``--separator=`` - the cache key is constructed by extracting 
elements from HTTP URI and headers or by using the UA classifiers and they are 
appended during the key construction and separated by ``/`` (by default). This 
options allows to override the default separator to any string (including an 
empty string).
 
 
 Detailed examples and troubleshooting

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" '].


[trafficserver] 01/01: Merge branch 'master' into quic-latest

2017-10-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 3362d2b2597073979cde2ebd3ae18c31bd154287
Merge: b0df673 ed6dda0
Author: Leif Hedstrom 
AuthorDate: Wed Oct 4 14:23:09 2017 -0700

Merge branch 'master' into quic-latest

* master:
  Added std::make_unique for C++11
  Fix runtime undefined symbol error in multiplexer plugin.

 plugins/experimental/multiplexer/dispatch.cc   |  5 +--
 plugins/experimental/multiplexer/dispatch.h|  3 +-
 plugins/experimental/multiplexer/fetcher.h |  2 +-
 .../pluginTest/multiplexer/gold/multiplexer.gold   |  1 +
 .../pluginTest/multiplexer/multiplexer.test.py | 52 ++
 5 files changed, 58 insertions(+), 5 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" .


[trafficserver] branch quic-latest updated (b0df673 -> 3362d2b)

2017-10-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a change to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from b0df673  Print hq and quic to Via header
 add 1c724e6  Fix runtime undefined symbol error in multiplexer plugin.
 add ed6dda0  Added std::make_unique for C++11
 new 3362d2b  Merge branch 'master' into quic-latest

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 plugins/experimental/multiplexer/dispatch.cc   |  5 ++--
 plugins/experimental/multiplexer/dispatch.h|  3 +-
 plugins/experimental/multiplexer/fetcher.h |  2 +-
 .../pluginTest/multiplexer/gold/multiplexer.gold   |  1 +
 .../multiplexer.test.py}   | 34 +++---
 5 files changed, 16 insertions(+), 29 deletions(-)
 create mode 100644 
tests/gold_tests/pluginTest/multiplexer/gold/multiplexer.gold
 copy tests/gold_tests/pluginTest/{header_rewrite/header_rewrite.test.py => 
multiplexer/multiplexer.test.py} (61%)

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" '].


[trafficserver] branch master updated: Added std::make_unique for C++11

2017-10-04 Thread bcall
This is an automated email from the ASF dual-hosted git repository.

bcall 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 ed6dda0  Added std::make_unique for C++11
ed6dda0 is described below

commit ed6dda01e5ab0f87bae96c1014066c950a2bfad4
Author: Bryan Call 
AuthorDate: Tue Oct 3 17:17:41 2017 -0700

Added std::make_unique for C++11

(cherry picked from commit c4c3bd9c213b63d03108653761be90f52ac55c33)
---
 lib/ts/Makefile.am  |  1 +
 lib/ts/ink_memory.h |  4 
 lib/ts/ink_std_compat.h | 37 +
 3 files changed, 42 insertions(+)

diff --git a/lib/ts/Makefile.am b/lib/ts/Makefile.am
index 9a1cdc8..efd87d5 100644
--- a/lib/ts/Makefile.am
+++ b/lib/ts/Makefile.am
@@ -132,6 +132,7 @@ libtsutil_la_SOURCES = \
   ink_sock.h \
   ink_sprintf.cc \
   ink_sprintf.h \
+   ink_std_compat.h \
   ink_stack_trace.cc \
   ink_stack_trace.h \
   ink_string.cc \
diff --git a/lib/ts/ink_memory.h b/lib/ts/ink_memory.h
index f8aa037..cd4c7a1 100644
--- a/lib/ts/ink_memory.h
+++ b/lib/ts/ink_memory.h
@@ -32,6 +32,10 @@
 #include "ts/string_view.h"
 #include "ts/ink_config.h"
 
+#ifdef __cplusplus
+#include "ink_std_compat.h"
+#endif
+
 #if HAVE_UNISTD_H
 #include 
 #endif
diff --git a/lib/ts/ink_std_compat.h b/lib/ts/ink_std_compat.h
new file mode 100644
index 000..ca972a6
--- /dev/null
+++ b/lib/ts/ink_std_compat.h
@@ -0,0 +1,37 @@
+/** @file
+
+  Compatibility with future versions of the C++ standard library
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ */
+
+#pragma once
+
+#if __cplusplus < 201402L
+#include 
+namespace std
+{
+template 
+std::unique_ptr
+make_unique(Args &&... args)
+{
+  return std::unique_ptr(new T(std::forward(args)...));
+}
+}
+#endif

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" '].


[trafficserver] branch quic-latest updated: Print hq and quic to Via header

2017-10-04 Thread maskit
This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
 new b0df673  Print hq and quic to Via header
b0df673 is described below

commit b0df673a64bcd9df284f48886ed388272679a1ca
Author: Masakazu Kitajo 
AuthorDate: Wed Oct 4 13:00:08 2017 -0700

Print hq and quic to Via header
---
 iocore/net/P_QUICNetVConnection.h |  3 +++
 iocore/net/QUICNetVConnection.cc  | 29 +
 lib/ts/ink_inet.cc|  1 +
 lib/ts/ink_inet.h |  1 +
 proxy/hq/HQClientSession.cc   | 13 +
 proxy/hq/HQClientSession.h|  3 +++
 6 files changed, 50 insertions(+)

diff --git a/iocore/net/P_QUICNetVConnection.h 
b/iocore/net/P_QUICNetVConnection.h
index 82b89fc..4c0ed6a 100644
--- a/iocore/net/P_QUICNetVConnection.h
+++ b/iocore/net/P_QUICNetVConnection.h
@@ -166,6 +166,9 @@ public:
   virtual void net_read_io(NetHandler *nh, EThread *lthread) override;
   virtual int64_t load_buffer_and_write(int64_t towrite, MIOBufferAccessor 
, int64_t _written, int ) override;
 
+  int populate_protocol(ts::StringView *results, int n) const override;
+  const char *protocol_contains(ts::StringView tag) const override;
+
   // QUICNetVConnection
   void registerNextProtocolSet(SSLNextProtocolSet *s);
 
diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index 5962e96..5261450 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -576,6 +576,35 @@ QUICNetVConnection::load_buffer_and_write(int64_t towrite, 
MIOBufferAccessor 
   return 0;
 }
 
+int
+QUICNetVConnection::populate_protocol(ts::StringView *results, int n) const
+{
+  int retval = 0;
+  if (n > retval) {
+results[retval] = IP_PROTO_TAG_QUIC;
+if (results[retval]) {
+  ++retval;
+}
+if (n > retval) {
+  retval += super::populate_protocol(results + retval, n - retval);
+}
+  }
+  return retval;
+}
+
+const char *
+QUICNetVConnection::protocol_contains(ts::StringView prefix) const
+{
+  const char *retval = nullptr;
+  ts::StringView tag = IP_PROTO_TAG_QUIC;
+  if (prefix.size() <= tag.size() && strncmp(tag.ptr(), prefix.ptr(), 
prefix.size()) == 0) {
+retval = tag.ptr();
+  } else {
+retval = super::protocol_contains(prefix);
+  }
+  return retval;
+}
+
 void
 QUICNetVConnection::registerNextProtocolSet(SSLNextProtocolSet *s)
 {
diff --git a/lib/ts/ink_inet.cc b/lib/ts/ink_inet.cc
index 2467916..188519a 100644
--- a/lib/ts/ink_inet.cc
+++ b/lib/ts/ink_inet.cc
@@ -36,6 +36,7 @@ const ts::StringView IP_PROTO_TAG_IPV4("ipv4", 
ts::StringView::literal);
 const ts::StringView IP_PROTO_TAG_IPV6("ipv6", ts::StringView::literal);
 const ts::StringView IP_PROTO_TAG_UDP("udp", ts::StringView::literal);
 const ts::StringView IP_PROTO_TAG_TCP("tcp", ts::StringView::literal);
+const ts::StringView IP_PROTO_TAG_QUIC("quic", ts::StringView::literal);
 const ts::StringView IP_PROTO_TAG_TLS_1_0("tls/1.0", ts::StringView::literal);
 const ts::StringView IP_PROTO_TAG_TLS_1_1("tls/1.1", ts::StringView::literal);
 const ts::StringView IP_PROTO_TAG_TLS_1_2("tls/1.2", ts::StringView::literal);
diff --git a/lib/ts/ink_inet.h b/lib/ts/ink_inet.h
index bca32a0..585eaca 100644
--- a/lib/ts/ink_inet.h
+++ b/lib/ts/ink_inet.h
@@ -50,6 +50,7 @@ extern const ts::StringView IP_PROTO_TAG_IPV4;
 extern const ts::StringView IP_PROTO_TAG_IPV6;
 extern const ts::StringView IP_PROTO_TAG_UDP;
 extern const ts::StringView IP_PROTO_TAG_TCP;
+extern const ts::StringView IP_PROTO_TAG_QUIC;
 extern const ts::StringView IP_PROTO_TAG_TLS_1_0;
 extern const ts::StringView IP_PROTO_TAG_TLS_1_1;
 extern const ts::StringView IP_PROTO_TAG_TLS_1_2;
diff --git a/proxy/hq/HQClientSession.cc b/proxy/hq/HQClientSession.cc
index 27d1961..ce4d6cc 100644
--- a/proxy/hq/HQClientSession.cc
+++ b/proxy/hq/HQClientSession.cc
@@ -124,6 +124,19 @@ HQClientSession::release(ProxyClientTransaction *trans)
   return;
 }
 
+int
+HQClientSession::populate_protocol(ts::StringView *result, int size) const
+{
+  int retval = 0;
+  if (size > retval) {
+result[retval++] = IP_PROTO_TAG_HTTP_QUIC;
+if (size > retval) {
+  retval += super::populate_protocol(result + retval, size - retval);
+}
+  }
+  return retval;
+}
+
 void
 HQClientSession::add_transaction(HQClientTransaction *trans)
 {
diff --git a/proxy/hq/HQClientSession.h b/proxy/hq/HQClientSession.h
index b3a4ce4..0eaecc8 100644
--- a/proxy/hq/HQClientSession.h
+++ b/proxy/hq/HQClientSession.h
@@ -29,6 +29,8 @@
 class HQClientSession : public ProxyClientSession
 {
 public:
+  typedef ProxyClientSession super; ///< Parent type.
+
   HQClientSession(NetVConnection *vc);
   ~HQClientSession();
 
@@ -48,6 +50,7 @@ public:
   int get_transact_count() const override;
   const char *get_protocol_string() 

[trafficserver] branch quic-latest updated: Prefix the verbose handshake dump with v_

2017-10-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
 new f90c319  Prefix the verbose handshake dump with v_
f90c319 is described below

commit f90c3197dc48a7c34023bfa459873d79016e8585
Author: Leif Hedstrom 
AuthorDate: Wed Oct 4 12:47:40 2017 -0700

Prefix the verbose handshake dump with v_
---
 iocore/net/quic/QUICHandshake.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iocore/net/quic/QUICHandshake.cc b/iocore/net/quic/QUICHandshake.cc
index 9dbbc5f..3a61698 100644
--- a/iocore/net/quic/QUICHandshake.cc
+++ b/iocore/net/quic/QUICHandshake.cc
@@ -29,7 +29,7 @@
 #include "QUICConfig.h"
 #include "P_SSLNextProtocolSet.h"
 
-static constexpr char dump_tag[] = "quic_handshake_dump_pkt";
+static constexpr char dump_tag[] = "v_quic_handshake_dump_pkt";
 
 #define I_WANNA_DUMP_THIS_BUF(buf, len)
\
   {
\

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" '].


[trafficserver] branch quic-latest updated: Implemented HQClientTransaction::get_transaction_id

2017-10-04 Thread bcall
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
 new 72dc8c3  Implemented HQClientTransaction::get_transaction_id
72dc8c3 is described below

commit 72dc8c3a1c758cef3dec3869c889c281dc867cad
Author: Bryan Call 
AuthorDate: Wed Oct 4 12:06:31 2017 -0700

Implemented HQClientTransaction::get_transaction_id
---
 iocore/net/quic/QUICApplication.h | 10 --
 iocore/net/quic/QUICStream.cc |  2 +-
 iocore/net/quic/QUICStream.h  | 14 +++---
 proxy/hq/HQClientTransaction.cc   |  4 +---
 4 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/iocore/net/quic/QUICApplication.h 
b/iocore/net/quic/QUICApplication.h
index 20059d7..8094a4e 100644
--- a/iocore/net/quic/QUICApplication.h
+++ b/iocore/net/quic/QUICApplication.h
@@ -26,9 +26,9 @@
 #include "../../eventsystem/I_EventSystem.h"
 #include "../../eventsystem/I_IOBuffer.h"
 #include "QUICTypes.h"
+#include "QUICStream.h"
 
 class QUICConnection;
-class QUICStream;
 class QUICApplication;
 
 /**
@@ -48,6 +48,12 @@ public:
   IOBufferReader *get_read_buffer_reader();
   void shutdown();
 
+  int
+  get_transaction_id() const
+  {
+return _stream->id();
+  }
+
 private:
   QUICStream *_stream = nullptr;
 
@@ -62,7 +68,7 @@ private:
 };
 
 /**
- * @brief Abstruct QUIC Application Class
+ * @brief Abstract QUIC Application Class
  * @detail Every quic application must inherits this class
  */
 class QUICApplication : public Continuation
diff --git a/iocore/net/quic/QUICStream.cc b/iocore/net/quic/QUICStream.cc
index dd41ff3..a6fd600 100644
--- a/iocore/net/quic/QUICStream.cc
+++ b/iocore/net/quic/QUICStream.cc
@@ -65,7 +65,7 @@ QUICStream::init_flow_control_params(uint32_t 
recv_max_stream_data, uint32_t sen
 }
 
 QUICStreamId
-QUICStream::id()
+QUICStream::id() const
 {
   return this->_id;
 }
diff --git a/iocore/net/quic/QUICStream.h b/iocore/net/quic/QUICStream.h
index bdb78ae..a916ead 100644
--- a/iocore/net/quic/QUICStream.h
+++ b/iocore/net/quic/QUICStream.h
@@ -51,7 +51,7 @@ public:
   void init_flow_control_params(uint32_t recv_max_stream_data, uint32_t 
send_max_stream_data);
   int main_event_handler(int event, void *data);
 
-  QUICStreamId id();
+  QUICStreamId id() const;
   QUICOffset final_offset();
 
   // Implement VConnection interface.
@@ -91,20 +91,20 @@ private:
 
   Event *_send_tracked_event(Event *event, int send_event, VIO *vio);
 
-  bool _fin;
+  bool _fin   = false;
   QUICStreamId _id= 0;
   QUICOffset _recv_offset = 0;
   QUICOffset _send_offset = 0;
 
-  QUICRemoteStreamFlowController *_remote_flow_controller;
-  QUICLocalStreamFlowController *_local_flow_controller;
-  uint64_t _flow_control_buffer_size = 1024;
+  QUICRemoteStreamFlowController *_remote_flow_controller = nullptr;
+  QUICLocalStreamFlowController *_local_flow_controller   = nullptr;
+  uint64_t _flow_control_buffer_size  = 1024;
 
   VIO _read_vio;
   VIO _write_vio;
 
-  Event *_read_event;
-  Event *_write_event;
+  Event *_read_event  = nullptr;
+  Event *_write_event = nullptr;
 
   // Fragments of received STREAM frame (offset is unmatched)
   // TODO: Consider to replace with ts/RbTree.h or other data structure
diff --git a/proxy/hq/HQClientTransaction.cc b/proxy/hq/HQClientTransaction.cc
index 9f41461..8c168d5 100644
--- a/proxy/hq/HQClientTransaction.cc
+++ b/proxy/hq/HQClientTransaction.cc
@@ -279,7 +279,5 @@ HQClientTransaction::transaction_done()
 int
 HQClientTransaction::get_transaction_id() const
 {
-  // TODO: not implemented
-  ink_release_assert(false);
-  return 0;
+  return this->_stream_io->get_transaction_id();
 }

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" '].


[trafficserver] branch master updated: Fix runtime undefined symbol error in multiplexer plugin.

2017-10-04 Thread amc
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 1c724e6  Fix runtime undefined symbol error in multiplexer plugin.
1c724e6 is described below

commit 1c724e6f5db9634e09822feb9552474794410314
Author: Alan M. Carroll 
AuthorDate: Sat Sep 30 13:34:23 2017 -0500

Fix runtime undefined symbol error in multiplexer plugin.
---
 plugins/experimental/multiplexer/dispatch.cc   |  5 +--
 plugins/experimental/multiplexer/dispatch.h|  3 +-
 plugins/experimental/multiplexer/fetcher.h |  2 +-
 .../pluginTest/multiplexer/gold/multiplexer.gold   |  1 +
 .../pluginTest/multiplexer/multiplexer.test.py | 52 ++
 5 files changed, 58 insertions(+), 5 deletions(-)

diff --git a/plugins/experimental/multiplexer/dispatch.cc 
b/plugins/experimental/multiplexer/dispatch.cc
index bdbd606..88cfe5b 100644
--- a/plugins/experimental/multiplexer/dispatch.cc
+++ b/plugins/experimental/multiplexer/dispatch.cc
@@ -33,7 +33,7 @@
 
 extern Statistics statistics;
 
-extern size_t timeout;
+size_t timeout;
 
 Request::Request(const std::string , const TSMBuffer b, const TSMLoc l) : 
host(h), length(0), io(new ats::io::IO())
 {
@@ -52,12 +52,11 @@ Request::Request(const std::string , const TSMBuffer b, 
const TSMLoc l) : host
   assert(TSHttpHdrLengthGet(b, l) >= length);
 }
 
-Request::Request(const Request ) : host(r.host), length(r.length), 
io(const_cast(r).io.release())
+Request::Request(Request &) : host(std::move(that.host)), 
length(that.length), io(std::move(that.io))
 {
   assert(!host.empty());
   assert(length > 0);
   assert(io.get() != nullptr);
-  assert(r.io.get() != nullptr);
 }
 
 Request &
diff --git a/plugins/experimental/multiplexer/dispatch.h 
b/plugins/experimental/multiplexer/dispatch.h
index 678fa58..7c6912d 100644
--- a/plugins/experimental/multiplexer/dispatch.h
+++ b/plugins/experimental/multiplexer/dispatch.h
@@ -54,7 +54,8 @@ struct Request {
   std::unique_ptr io;
 
   Request(const std::string &, const TSMBuffer, const TSMLoc);
-  Request(const Request &);
+  Request(const Request &) = delete;
+  Request(Request &&);
   Request =(const Request &);
 };
 
diff --git a/plugins/experimental/multiplexer/fetcher.h 
b/plugins/experimental/multiplexer/fetcher.h
index 4c88553..08dbe74 100644
--- a/plugins/experimental/multiplexer/fetcher.h
+++ b/plugins/experimental/multiplexer/fetcher.h
@@ -289,7 +289,7 @@ get(const std::string , io::IO *const i, const int64_t l, 
const T , const in
   }
   TSVConn vconn = TSHttpConnect(reinterpret_cast());
   assert(vconn != NULL);
-  TSCont contp = TSContCreate(Transaction::handle, NULL);
+  TSCont contp = TSContCreate(Transaction::handle, TSMutexCreate());
   assert(contp != NULL);
   Transaction *transaction = new Transaction(vconn, contp, i, l, t);
   TSContDataSet(contp, transaction);
diff --git a/tests/gold_tests/pluginTest/multiplexer/gold/multiplexer.gold 
b/tests/gold_tests/pluginTest/multiplexer/gold/multiplexer.gold
new file mode 100644
index 000..3957294
--- /dev/null
+++ b/tests/gold_tests/pluginTest/multiplexer/gold/multiplexer.gold
@@ -0,0 +1 @@
+``DIAG: (multiplexer)``
diff --git a/tests/gold_tests/pluginTest/multiplexer/multiplexer.test.py 
b/tests/gold_tests/pluginTest/multiplexer/multiplexer.test.py
new file mode 100644
index 000..3614f3c
--- /dev/null
+++ b/tests/gold_tests/pluginTest/multiplexer/multiplexer.test.py
@@ -0,0 +1,52 @@
+'''
+'''
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+import os
+Test.Summary = '''
+Test experimental/multiplexer.
+'''
+# need Curl
+Test.SkipUnless(
+Condition.HasProgram("curl", "Curl need to be installed on system for this 
test to work")
+)
+Test.ContinueOnFail = False
+# Define default ATS
+ts = Test.MakeATSProcess("ts")
+server = Test.MakeOriginServer("server")
+
+request_header = {"headers": "GET / HTTP/1.1\r\nHost: 
www.example.com\r\n\r\n", "timestamp": "1469733493.993", "body": ""}
+response_header = {"headers": "HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n", 
"timestamp": "1469733493.993", 

[trafficserver] branch quic-latest updated: Stubbed out get_transaction_id for now to get QUIC to build

2017-10-04 Thread bcall
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
 new e470016  Stubbed out get_transaction_id for now to get QUIC to build
e470016 is described below

commit e47001634c272861187f033537e7f321e8dfa9d0
Author: Bryan Call 
AuthorDate: Wed Oct 4 11:13:37 2017 -0700

Stubbed out get_transaction_id for now to get QUIC to build
---
 proxy/hq/HQClientTransaction.cc | 8 
 proxy/hq/HQClientTransaction.h  | 1 +
 2 files changed, 9 insertions(+)

diff --git a/proxy/hq/HQClientTransaction.cc b/proxy/hq/HQClientTransaction.cc
index 4cb6283..9f41461 100644
--- a/proxy/hq/HQClientTransaction.cc
+++ b/proxy/hq/HQClientTransaction.cc
@@ -275,3 +275,11 @@ HQClientTransaction::transaction_done()
   // TODO: start closing transaction
   return;
 }
+
+int
+HQClientTransaction::get_transaction_id() const
+{
+  // TODO: not implemented
+  ink_release_assert(false);
+  return 0;
+}
diff --git a/proxy/hq/HQClientTransaction.h b/proxy/hq/HQClientTransaction.h
index fc56a5e..cad8b6c 100644
--- a/proxy/hq/HQClientTransaction.h
+++ b/proxy/hq/HQClientTransaction.h
@@ -50,6 +50,7 @@ public:
   void do_io_shutdown(ShutdownHowTo_t howto) override;
   void reenable(VIO *vio) override;
   void release(IOBufferReader *r) override;
+  int get_transaction_id() const override;
 
   // HQClientTransaction specific methods
   int main_event_handler(int event, void *edata);

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" '].


[trafficserver] branch quic-latest updated: Use std:max instead of internal max macro that was removed

2017-10-04 Thread bcall
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
 new 57d68dc  Use std:max instead of internal max macro that was removed
57d68dc is described below

commit 57d68dc00c9aad4f70cb9596c6d5b750d23242da
Author: Bryan Call 
AuthorDate: Wed Oct 4 10:52:31 2017 -0700

Use std:max instead of internal max macro that was removed
---
 iocore/net/quic/QUICCrypto.cc   |  2 +-
 iocore/net/quic/QUICLossDetector.cc | 10 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/iocore/net/quic/QUICCrypto.cc b/iocore/net/quic/QUICCrypto.cc
index 02872e7..1cfc2d6 100644
--- a/iocore/net/quic/QUICCrypto.cc
+++ b/iocore/net/quic/QUICCrypto.cc
@@ -166,7 +166,7 @@ QUICCrypto::setup_session()
 
   size_t secret_len = EVP_MD_size(this->_digest);
   size_t key_len= _get_aead_key_len(this->_aead);
-  size_t iv_len = max(static_cast(8), 
_get_aead_nonce_len(this->_aead));
+  size_t iv_len = std::max(static_cast(8), 
_get_aead_nonce_len(this->_aead));
 
   int r = 0;
 
diff --git a/iocore/net/quic/QUICLossDetector.cc 
b/iocore/net/quic/QUICLossDetector.cc
index 503b477..ff9f98a 100644
--- a/iocore/net/quic/QUICLossDetector.cc
+++ b/iocore/net/quic/QUICLossDetector.cc
@@ -104,10 +104,10 @@ QUICLossDetector::_detect_lost_packets(QUICPacketNumber 
largest_acked_packet_num
   uint32_t delay_until_lost = UINT32_MAX;
 
   if (this->_time_reordering_fraction != INFINITY) {
-delay_until_lost = (1 + this->_time_reordering_fraction) * 
max(this->_latest_rtt, this->_smoothed_rtt);
+delay_until_lost = (1 + this->_time_reordering_fraction) * 
std::max(this->_latest_rtt, this->_smoothed_rtt);
   } else if (largest_acked_packet_number == this->_largest_sent_packet) {
 // Early retransmit alarm.
-delay_until_lost = 9 / 8 * max(this->_latest_rtt, this->_smoothed_rtt);
+delay_until_lost = 9 / 8 * std::max(this->_latest_rtt, 
this->_smoothed_rtt);
   }
   for (auto  : this->_sent_packets) {
 if (unacked.first >= largest_acked_packet_number) {
@@ -284,7 +284,7 @@ QUICLossDetector::_set_loss_detection_alarm()
 } else {
   alarm_duration = 2 * this->_smoothed_rtt;
 }
-alarm_duration = max(alarm_duration, this->_MIN_TLP_TIMEOUT);
+alarm_duration = std::max(alarm_duration, this->_MIN_TLP_TIMEOUT);
 alarm_duration = alarm_duration * (1 << this->_handshake_count);
 Debug(tag, "Handshake retransmission alarm will be set");
   } else if (this->_loss_time != 0) {
@@ -298,12 +298,12 @@ QUICLossDetector::_set_loss_detection_alarm()
 } else {
   alarm_duration = this->_MIN_TLP_TIMEOUT;
 }
-alarm_duration = max(alarm_duration, 2 * this->_smoothed_rtt);
+alarm_duration = std::max(alarm_duration, 2 * this->_smoothed_rtt);
 Debug(tag, "TLP alarm will be set");
   } else {
 // RTO alarm
 alarm_duration = this->_smoothed_rtt + 4 * this->_rttvar;
-alarm_duration = max(alarm_duration, this->_MIN_RTO_TIMEOUT);
+alarm_duration = std::max(alarm_duration, this->_MIN_RTO_TIMEOUT);
 alarm_duration = alarm_duration * (1 << this->_rto_count);
 Debug(tag, "RTO alarm will be set");
   }

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" '].


[trafficserver] 01/01: Merge branch 'master' into quic-latest

2017-10-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit b44224fd97b289a97a1bdb09aa6bed80f2d9a360
Merge: 8cc22df 22af898
Author: Leif Hedstrom 
AuthorDate: Wed Oct 4 10:27:50 2017 -0700

Merge branch 'master' into quic-latest

* master: (149 commits)
  ESI: Make maximum file count runtime configurable.
  Add support for Forwarded HTTP header tag (RFC7239).
  UDPNet: Yet another timing fix for test_UDPnet.
  Support dynamic registration to StatPages.
  Cleanup: fix rollback to use elevating file operations.
  Update s3auth test, removed cpp file and added the Catch main define in 
the unit test file
  BufferWriter: Add data() method for access to the internal buffer for API 
consistency with std:string and ts::string_view.
  Ignoring unit tests
  Make sure all files in the sandbox are readable
  Test: Fix timing issues with txn and double tests. Also tweak test_UDPNet 
to report errors better and use a less common port.
  Preserve Accept-Encoding header for H2 Server Push promise.
  Tests: Clean up file extensions in lib/ts unit tests.
  Update document
  add new TLS milestones
  Doc: Clean up comments in null_transform example plugin.
  Add string literal support to ts::string_view.
  Replace proxy.config.http.normalize_ae_gzip with normalize_ae w/ Brotli 
support Issue # 2100
  Cleanup: Fix traffic_manager so its checks run if WCCP is enabled.
  Doc: Minor fixups for duplicated milestones and stat typo.
  YTSATS-1464: Support set-redirect with READ_REQUEST_PRE_REMAP_HOOK
  ...

 .gitignore |   3 +
 Makefile.am|   4 +-
 ci/jenkins/bin/autest.sh   |  35 +-
 ci/jenkins/bin/github.sh   |   2 +-
 ci/jenkins/bin/regression.sh   |   2 +-
 cmd/traffic_cop/traffic_cop.cc |  51 +-
 cmd/traffic_crashlog/traffic_crashlog.cc   |   7 +-
 cmd/traffic_ctl/traffic_ctl.cc |   3 +
 cmd/traffic_layout/traffic_layout.cc   |  32 +-
 cmd/traffic_manager/Makefile.am|  23 +-
 cmd/traffic_manager/metrics.cc |   2 +-
 cmd/traffic_manager/traffic_manager.cc |  66 +-
 cmd/traffic_top/traffic_top.cc |   1 +
 configure.ac   |  41 +-
 doc/Makefile.am|   7 +-
 .../transparent-forward-proxying.en.rst|   3 +
 doc/admin-guide/files/records.config.en.rst| 104 ++-
 doc/admin-guide/files/ssl_multicert.config.en.rst  |  11 +
 doc/admin-guide/logging/formatting.en.rst  |  27 +-
 .../monitoring/statistics/core/general.en.rst  |   5 +
 doc/admin-guide/plugins/cachekey.en.rst|  52 ++
 doc/admin-guide/plugins/gzip.en.rst|   4 +-
 doc/admin-guide/plugins/header_rewrite.en.rst  |   5 +
 doc/admin-guide/plugins/ts_lua.en.rst  |   9 +-
 doc/appendices/command-line/traffic_ctl.en.rst |   2 +
 doc/conf.py|   5 +
 .../api/functions/TSContSchedule.en.rst|   2 +-
 .../api/functions/TSHttpArgs.en.rst|  76 ++
 .../api/functions/TSHttpOverridableConfig.en.rst   |   3 +-
 ...rFieldCreate.en.rst => TSHttpTxnAborted.en.rst} |  20 +-
 .../api/functions/TSHttpTxnMilestoneGet.en.rst |  16 +-
 .../api/functions/TSMimeHdrFieldAppend.en.rst  |  21 +-
 .../api/functions/TSMimeHdrFieldCreate.en.rst  |  18 +-
 .../api/functions/TSUuidCreate.en.rst  |   5 +-
 .../api/types/TSOverridableConfigKey.en.rst|   2 +-
 .../cache-architecture/data-structures.en.rst  |   2 +-
 .../plugins/adding-statistics.en.rst   |   4 +-
 .../plugins/example-plugins/index.en.rst   |   6 +-
 .../plugins/http-transformations/index.en.rst  |   2 +-
 doc/ext/traffic-server.py  |  17 +-
 doc/static/languages.json  |   4 +-
 example/Makefile.am|  38 +-
 example/null_transform/null_transform.c|  13 +-
 .../server_transform.c}|  98 +--
 .../session-1.c => session_hooks/session_hooks.c}  |  50 +-
 example/ssl-preaccept/ats-util.h   |  64 --
 .../ssl_preaccept.cc}  |  37 +-
 .../ssl_preaccept.config   |   0
 example/{ssl-sni/ssl-sni.cc => ssl_sni/ssl_sni.cc} |  42 +-
 example/{ssl-sni => ssl_sni}/ssl_sni.config|   0
 .../ssl_sni_whitelist.cc}  |  26 +-
 .../ssl_sni_whitelist.config   |   0
 example/statistic/statistic.cc |  18 +-
 example/{thread-1 => 

[trafficserver] branch quic-latest updated (8cc22df -> b44224f)

2017-10-04 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a change to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 8cc22df  Fix #2494 Generate Stateless Reset Token with a configurable 
value
 add 2519add  Added constructor for ats_scoped_str of std::string and 
string_view
 add 244288f  cachekey/cacheurl key string compatibility enhancements.
 add f941be8  Doc: Adding 
proxy.config.ssl.server.multicert.exit_on_load_fail information
 add 30b2b9f  Add state information
 add 1c135f6  Fix the wrong pop in Http2DependencyTree deactive
 add 2d1abee  TS-4976: Regularize plugins - server_transform.
 add 14233c0  Doc: Fix LaTex paper size options to work and not generate a 
warning.
 add 10ab755  Doc: Fix warning for footnote in cache arch docs.
 add 395a742  Doc: Add documentation for MIME header plugin API functions.
 add 84bc7ab  Add null pointer check to server response set status
 add a0aca6f  Fix clang-format
 add 05f2822  Add missing checks for request url
 add 813f2f8  Doc: Session and transaction arg functions.
 add c9213ae  Doc: Provide better explanation of HSTS example in 
header_rewrite.
 add 79a4045  Test: IpMap update More tests from Larry. conversion to Catch 
unit test framework.
 add 8177554  Update TSContSchedule.en.rst
 add 27cec04  New layout structure with std string & basic string view
 add 56839d0  Regularize the debug message with rcv_headers_frame
 add 8733de6  Bump docs version to 7.1.x
 add 49b4eee  cqtq,cqtn,cqtd,cqtt timestamp blog format to be INT again
 add 84865cc  Cleanup / correct buffer sizes for UUIDs
 add beac658  Stop looping refreshing stale hostDB records
 add b0c492f  Removing the old record when the DNS lookup failed with 
NXDOMAIN
 add 9b1d720  Add initializer list for constructor
 add 60fa5c1  Fixes, I think, coverity issues 1379288
 add 42e56e9  Coverity 1379271: Dereference null return
 add 30c2c35  Added traffic_runroot feature to generate sandbox for 
programs to run
 add a50aaf1  Remove the wrong entry from priority queue and insert the new 
node into queue
 add 35e5995  coverity 1379269: dereference after null check
 add c746df2  Fix traffic_layout to not add messages to --json
 add 7c05be8  Session ticket resumption needs consistent CA-certificate 
version
 add 01494e0  Coverity 1379270 Out-of-bounds write
 add 4836218  Doc: Adding proxy.config.http2.accept_no_activity_timeout and 
proxy.config.http2.no_activity_timeout_in information
 add ee9477d  Add check on Environment input to validate it exists
 add 90d8eee  TS-4976: Regularize plugins - session_hooks (nee session-1).
 add e115703  Metalink Plugin: Must not destroy the Transform Contp, only 
shutdown write on it while received WRITE_COMPLETE
 add 9270d4f  make hostdb.round_robin_max_count configurable
 add 4849f95  Clean up DNS macros 1. using const int instead of macros. 2. 
The only limit of DNS response is MAX_DNS_PACKET_LEN based on which other 
limits can be calculated.
 add f33e6b1  Adding three connection modes for DNS queries: UDP_ONLY, 
TCP_RETRY, TCP_ONLY
 add fddd7d8  Clean up Diags
 add 7f3df8c  Fix the queue when reprioritize
 add 87ab525  Change from SHA1 to SHA512
 add 023cc7f  Make swap() in Vec.h a member function of Vec class
 add ea354cc  Doc: Adding API documentation for TSHttpTxnAborted
 add b4dd48b  Redirect test for ATS
 add 0005909  Removes DES-CBC3-SHA from the default cipher list
 add a4cae55  corrects HTTP status 0 to 302 on redirect
 add 7530f77  Issue #2269: self detection.
 add fe996a8  Optimize NetHandler & PollCont and reduce the redundant code
 add 6395adc  Avoid closing the last netvc if accept_till_done is set
 add 0eeedac  TS-4976: Regularize plugins - ssl_preaccept.
 add 25a0de4  Out-of-bounds while get port from host field
 add f6f41f2  Fix map_with_refer to work and add tests for it.
 add a32f7ed  Correctly Handle EVENT_NONE in UnixNetVConnection::acceptEvent
 add d31adce  Resign server.pem for autests to 10 years
 add b4128c5  Coverity 1379933:  Control flow issues  (DEADCODE)
 add a197ef5  microDNS
 add eb601a3  update README.md
 add a7be6ec  Format python code with autopep8
 add dc6e7ea  Coverity CID 1380022: FORWARD_NULL
 add 048815a  Optimize acceptFastEvent(): Replace the dup code of 
UnixNetVConnection::acceptEvent by calling it directly
 add fa7190b  Add 'BufferWriter' class for constructing strings/sequences 
of characters.
 add 2aed3f6  Fix coverity issues 1379739 - 1379741
 add 103ef38  Fix coverity issues 1379739
 add 3bcc7ce  Unit tests for AWS Signature Version 4
 add 7dc2033  clarifies traffic_ctl dependency on traffic_manager
 add 9a645fe  Test: fix body factory gold files to ignore irrelevant 
headers.
 add 

[trafficserver] branch quic-latest updated: Fix #2494 Generate Stateless Reset Token with a configurable value

2017-10-04 Thread maskit
This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
 new 8cc22df  Fix #2494 Generate Stateless Reset Token with a configurable 
value
8cc22df is described below

commit 8cc22df1355e37b46c6665ecd7d2970aee464215
Author: Zizhong Zhang 
AuthorDate: Tue Oct 3 17:38:13 2017 -0700

Fix #2494 Generate Stateless Reset Token with a configurable value
---
 iocore/net/QUICNetVConnection.cc | 8 ++--
 iocore/net/QUICPacketHandler.cc  | 6 +-
 iocore/net/quic/QUICConfig.cc| 7 +++
 iocore/net/quic/QUICConfig.h | 2 ++
 4 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index aff162a..5962e96 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -35,6 +35,7 @@
 
 #include "P_SSLNextProtocolSet.h"
 
+#include "QUICConfig.h"
 #include "QUICDebugNames.h"
 #include "QUICEvents.h"
 #include "QUICConfig.h"
@@ -92,7 +93,10 @@ void
 QUICNetVConnection::start(SSL_CTX *ssl_ctx)
 {
   // Version 0x0001 uses stream 0 for cryptographic handshake with TLS 
1.3, but newer version may not
-  this->_token.gen_token(_quic_connection_id ^ id);
+  {
+QUICConfig::scoped_config params;
+this->_token.gen_token(_quic_connection_id ^ params->server_id());
+  }
 
   this->_handshake_handler = new QUICHandshake(this, ssl_ctx, this->_token);
   this->_application_map   = new QUICApplicationMap();
@@ -689,7 +693,7 @@ QUICNetVConnection::_state_common_receive_packet()
 break;
   case QUICPacketType::CLIENT_CLEARTEXT:
 // FIXME Just ignore for now but it has to be acked (GitHub#2609)
-   break;
+break;
   default:
 error = QUICErrorUPtr(new 
QUICConnectionError(QUICErrorClass::QUIC_TRANSPORT, 
QUICErrorCode::INTERNAL_ERROR));
 break;
diff --git a/iocore/net/QUICPacketHandler.cc b/iocore/net/QUICPacketHandler.cc
index 641dba2..2c8dfb9 100644
--- a/iocore/net/QUICPacketHandler.cc
+++ b/iocore/net/QUICPacketHandler.cc
@@ -22,6 +22,7 @@
 #include "ts/ink_config.h"
 #include "P_Net.h"
 
+#include "QUICConfig.h"
 #include "QUICPacket.h"
 #include "QUICDebugNames.h"
 #include "QUICEvents.h"
@@ -135,7 +136,10 @@ QUICPacketHandler::_recv_packet(int event, UDPPacket 
*udpPacket)
 // Send stateless reset if the packet is not a initial packet
 if (!QUICTypeUtil::hasLongHeader(reinterpret_cast(block->buf( {
   QUICStatelessToken token;
-  token.gen_token(cid);
+  {
+QUICConfig::scoped_config params;
+token.gen_token(cid ^ params->server_id());
+  }
   auto packet = QUICPacketFactory::create_stateless_reset_packet(cid, 
token);
   this->send_packet(*packet, udpPacket->getConnection(), con.addr, 1200);
   return;
diff --git a/iocore/net/quic/QUICConfig.cc b/iocore/net/quic/QUICConfig.cc
index d97ef54..38b6b13 100644
--- a/iocore/net/quic/QUICConfig.cc
+++ b/iocore/net/quic/QUICConfig.cc
@@ -34,6 +34,7 @@ void
 QUICConfigParams::initialize()
 {
   REC_EstablishStaticConfigInt32U(this->_no_activity_timeout_in, 
"proxy.config.quic.no_activity_timeout_in");
+  REC_EstablishStaticConfigInt32U(this->_server_id, 
"proxy.config.quic.server_id");
 }
 
 uint32_t
@@ -43,6 +44,12 @@ QUICConfigParams::no_activity_timeout_in() const
 }
 
 uint32_t
+QUICConfigParams::server_id() const
+{
+  return this->_server_id;
+}
+
+uint32_t
 QUICConfigParams::initial_max_data() const
 {
   return this->_initial_max_data;
diff --git a/iocore/net/quic/QUICConfig.h b/iocore/net/quic/QUICConfig.h
index b9ac7c2..05588ce 100644
--- a/iocore/net/quic/QUICConfig.h
+++ b/iocore/net/quic/QUICConfig.h
@@ -34,6 +34,7 @@ public:
   uint32_t initial_max_data() const;
   uint32_t initial_max_stream_data() const;
   uint32_t initial_max_stream_id() const;
+  uint32_t server_id() const;
 
 private:
   // FIXME Fill appropriate values
@@ -41,6 +42,7 @@ private:
   uint32_t _initial_max_data= 100; // in units of 1024 octets
   uint32_t _initial_max_stream_data = 2048;
   uint32_t _initial_max_stream_id   = 100;
+  uint32_t _server_id   = 0;
 };
 
 class QUICConfig

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" '].