[trafficserver] annotated tag 8.0.6 updated (bcc92ee -> 216f1de)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to annotated tag 8.0.6 in repository https://gitbox.apache.org/repos/asf/trafficserver.git. *** WARNING: tag 8.0.6 was modified! *** from bcc92ee (commit) to 216f1de (tag) tagging bcc92eeca744b07500d6dd3b6b9a222a968fe8fa (commit) replaces 8.0.6-rc0 by Bryan Call on Sat Feb 29 11:06:08 2020 -0800 - Log - Release Candidate 8.0.6 -BEGIN PGP SIGNATURE- iQIcBAABAgAGBQJeWrYgAAoJEE0VQRC4RQjs6L8P/jdkyAsB5jPnIh9Urrq1r5tQ qB37taa49jkZeBChurdmUfU+XSbncJVMpO38RkZo8/dqy4Xn0FGxh/AUDCCJ+HpB S5JEsD7yJDSqbUUmNKq1vFEVGGSCWx4vW7Mq+JAj2VMEEOyRF9Qxf7zGdkbtdxfj nbXnjo4RFLa2eIuB6jMAjtrJgNIPOxD5y/TVmNCAb6lA9cGCkV0/v0iV+Q2RK/k7 2rd/h4fQX+E5p1ydwvF/F3/jVjzSvBvb49P6bEITHpZ/YrgHZeaIJ1/TVzbbbVtV BabRtTou55ZC6sizk20GrlcZJ1NbBtNSXvmk7sGl9zRfw1JMSTqhyVCZ//B4sDiG De1vgBpeVcLxmo60MCA0wM5W/2N9Ur87UZdjqdftNOpjGpwKh8V1RrUB2wsxDkOh POLU5zGJWoGs7s8QcSOCuoIurzRjrXbhPlhfKsgCi6V9kyK2SnpmVPIRgkCo8nEz 2l/EjkXyP9/QftVTEDQ9oSGm6vuT5XgkVn+rilgJVkxXzRnrQaph8ecWrUo9PVTk gNeTt8/zu+MN5LaeL+AwtG+i5cs1mMTrv9g4cxpqSlKoRMi3Aoeo8uoI9f4uKst3 EqS1ESOQeHejc71NOKSwKC5YGWdzr/rvXP2AW5tv9HzCirxNuna3N3tSNTXB04xO QTmmge/9zU/47TPj7Y7s =3h19 -END PGP SIGNATURE- --- No new revisions were added by this update. Summary of changes:
[trafficserver] annotated tag 8.0.6 updated (bcc92ee -> bcb14d9)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to annotated tag 8.0.6 in repository https://gitbox.apache.org/repos/asf/trafficserver.git. *** WARNING: tag 8.0.6 was modified! *** from bcc92ee (commit) to bcb14d9 (tag) tagging bcc92eeca744b07500d6dd3b6b9a222a968fe8fa (commit) replaces 8.0.6-rc0 by Bryan Call on Sat Feb 29 10:55:27 2020 -0800 - Log - Release Candidate 8.0.6 -BEGIN PGP SIGNATURE- iQIcBAABAgAGBQJeWrOfAAoJEE0VQRC4RQjsTxoQAJSl4jTYE3tOk1di17FweLDj 0CzZmrbGiNaMAh7XmotU+YUcCgFCKuymu52wk7FAS+o5tn+nJi8vE73WytA2fE+v FSvZ7GksnmTV/Yp27/Nkpdx2iIK10Xz7aeaaWod/iKstoFbZ98liFl20SBB6FOps BbHpit0WO4bf3egqgKVw93CAnJnkI4R2mCP28qTPk9BNerNdDNFoZuRLaSt7IVoD r5AoqFgcb0CZtJTFeKsW82RzZK248vA2FFzzoUs15V/IotuQwRCjpSpyVNAq49QY ilqtOg0047NS94CczCuXAQepUFuqQ+co+yDM3CvviRMlqHt/rPWz9K8SRauiSFbZ SzOuhbtnLTkTkvps8/OarwvZypVNLgI6Wb8spkZlhQ2RyqLznK0dncgpT6z9Q1me 0zD019feq5wOpnU+vm+xfeTpaata+xiF8nLvvDD568hWscI9uwz4kVxaikLDuPGa y35mb6Kn6Ya0yPpeIvuItW1LCGO3JAxPjmKWuLzvnn+1W35nIDwNdFF5zfdO5PYi JDxHpzbjm824uiDgVevuY4PYGWXqWiuZr5pguw7xva3CRmS8iGJDMIMuKL5+We8G u+KBkHCXbm4FAGtyrDZxVMxpduFkhgUFRJrDy63wJMm0Hnq/yNZlXNLC0oup9Vkj PXPyaNR1ZvgmfyCdAA16 =hgvD -END PGP SIGNATURE- --- No new revisions were added by this update. Summary of changes:
[trafficserver] branch master updated (4f25f3d -> 8274143)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 4f25f3d Fix port selection for ssl ipv6 add 8274143 Turn on debug for the bash script test_logstats_summary No new revisions were added by this update. Summary of changes: src/traffic_logstats/tests/test_logstats_summary | 1 + 1 file changed, 1 insertion(+)
[trafficserver] annotated tag 7.1.9-rc2 updated (61e631a -> 96c3e02)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to annotated tag 7.1.9-rc2 in repository https://gitbox.apache.org/repos/asf/trafficserver.git. *** WARNING: tag 7.1.9-rc2 was modified! *** from 61e631a (commit) to 96c3e02 (tag) tagging 61e631ac4e12ad283fc796b01ec56fb5442d3e62 (commit) replaces 7.1.9-rc1 by Bryan Call on Wed Feb 26 13:42:25 2020 -0800 - Log - Release Candidate 7.1.9-rc2 -BEGIN PGP SIGNATURE- iQIcBAABAgAGBQJeVuZBAAoJEE0VQRC4RQjsV68QAJFtjfKd3d01g2Wkq79pJWCX xUDuS5ET8zLGqyTjIJGpzjrp/CCdne0WEpgasi2YNTPDubK2wy9DDosYK7f9Of7q BSKr0tUTO1yH49e194ktUjCEmuQSs2RNe6u0+q15/Htc88MgB8zGsi1qxsxJ7wOD FpbtyuRu8oR0dDRdnL58J23qSVz4EhhfhZ3SmL1hQc2rItGOOvNTnnLPUExCUVyJ ubQiAEgWkzaPMJUBT6hbnkJc5ywaJYyK5c+t9fsf1RKp2zFmR0O3lXC41PTqUHAP HqpN52fF0s4ua9rk86XiPu8Vkw99OsRZtkbQqpuOfD/Bhh/eTx0Ulib16XkScGVj ivcWmD4JP3zdRO1CuoAr916myVRRoSZ8P3w2iFmNeWn+Ri41Zy8VoV83iBi2i4ZS 9bjJnCndPwUXkXJN6YIccj+90YyBREQeoqA/BIo5kuXLgzoabPKMk49r07Slyrj6 r4C1O2pLUuE6KJx9KrL/VoL1j/wrS1JOzPHGWCsbZmPLUorUFp0XBALDoV5o1MNq iu48tLsBa3sfW1nThndTXRxI+E3GCx+LBg1IglSuQVbUM/jrwD61TMZklfr2+ucM oQDqolRx3W8XFMs8cPBvKj4fzgH/9wTsa8+kBBkV/4tmuLcswvgtL3AAtw64eSX0 YKXI89231r7v4rAxl+tt =vzx9 -END PGP SIGNATURE- --- No new revisions were added by this update. Summary of changes:
[trafficserver] branch 7.1.x updated: Updated Changelog
This is an automated email from the ASF dual-hosted git repository. bcall 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 61e631a Updated Changelog 61e631a is described below commit 61e631ac4e12ad283fc796b01ec56fb5442d3e62 Author: Bryan Call AuthorDate: Wed Feb 26 13:40:37 2020 -0800 Updated Changelog --- CHANGELOG-7.1.9 | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG-7.1.9 b/CHANGELOG-7.1.9 index 0195f9f..33c0410 100644 --- a/CHANGELOG-7.1.9 +++ b/CHANGELOG-7.1.9 @@ -3,3 +3,4 @@ Changes with Apache Traffic Server 7.1.9 #6395 - Fixed how we handle unknown schemes #6399 - Fix chunked processing #6418 - Handle final delayed chunk size + #6456 - Fix to handle 304 response without timeout
[trafficserver] branch 7.1.x updated: Fix to handle 304 response without timeout
This is an automated email from the ASF dual-hosted git repository. bcall 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 4c1006a Fix to handle 304 response without timeout 4c1006a is described below commit 4c1006a59c14501d25777b69a72d015b44e3ce1a Author: Susan Hinrichs AuthorDate: Wed Feb 26 16:05:20 2020 + Fix to handle 304 response without timeout --- proxy/http2/Http2Stream.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc index aa86876..5bf21b1 100644 --- a/proxy/http2/Http2Stream.cc +++ b/proxy/http2/Http2Stream.cc @@ -578,6 +578,7 @@ Http2Stream::update_write_request(IOBufferReader *buf_reader, int64_t write_len, return; } + int send_event = (write_vio.ntodo() == bytes_avail || is_done) ? VC_EVENT_WRITE_COMPLETE : VC_EVENT_WRITE_READY; // Process the new data if (!this->response_header_done) { // Still parsing the response_header @@ -602,7 +603,7 @@ Http2Stream::update_write_request(IOBufferReader *buf_reader, int64_t write_len, // If there is additional data, send it along in a data frame. Or if this was header only // make sure to send the end of stream - if (this->response_is_data_available()) { + if (this->response_is_data_available() || send_event == VC_EVENT_WRITE_COMPLETE) { this->send_response_body(call_update); } break;
[trafficserver] branch master updated (17c48bf -> 63018c1)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 17c48bf traffic_dump post_process.py add 63018c1 SSLNetVConnection, fixed/removed assert when running debug build No new revisions were added by this update. Summary of changes: iocore/net/SSLNetVConnection.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
[trafficserver] branch master updated (2df57f9 -> 19a8ac9)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 2df57f9 Avoid a weird name collision between HRW and tscore (#6446) add 19a8ac9 Revert "Disable the chunked_encoding test" No new revisions were added by this update. Summary of changes: tests/gold_tests/chunked_encoding/chunked_encoding.test.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
[trafficserver] branch master updated: Move log line length configuration to records.config docs.
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 a10526d Move log line length configuration to records.config docs. a10526d is described below commit a10526d9a0f634066e65e24cb285b1ff10724e71 Author: bneradt AuthorDate: Mon Feb 17 16:36:19 2020 + Move log line length configuration to records.config docs. --- doc/admin-guide/files/records.config.en.rst | 37 + doc/admin-guide/logging/formatting.en.rst | 35 ++- 2 files changed, 44 insertions(+), 28 deletions(-) diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst index dc8fdfa..a415b56 100644 --- a/doc/admin-guide/files/records.config.en.rst +++ b/doc/admin-guide/files/records.config.en.rst @@ -2916,6 +2916,43 @@ Logging Configuration :file:`logging.yaml` configuration file. If this is a relative path, |TS| loads it relative to the ``SYSCONFDIR`` directory. +.. ts:cv:: CONFIG proxy.config.log.max_line_size INT 9216 + :units: bytes + + This controls the maximum line length for ``ASCII`` formatted log entries. + This applies to ``ASCII_PIPE`` and ``ASCII`` file logs, *unless* + :ts:cv:`proxy.config.log.ascii_buffer_size` is also specified and the value + of ``ascii_buffer_size`` is larger than ``max_line_size``: in that case, + ``max_line_size`` only applies to ``ASCII_PIPE`` logs while + ``ascii_buffer_size`` will apply to ``ASCII`` (non-pipe) log files. + +.. ts:cv:: CONFIG proxy.config.log.ascii_buffer_size INT 36864 + :units: bytes + + This controls the maximum line length for ``ASCII`` formatted log entries + that are non-pipe log files. If this value is smaller than + :ts:cv:`proxy.config.log.max_line_size`, then the latter will be used for + both ``ASCII`` and ``ASCII_PIPE`` log files. If both ``max_line_size`` and + ``ascii_buffer_size`` are set, then ``max_line_size`` will be used for + ``ASCII_PIPE`` logs while ``ascii_buffer_size`` will be used for ``ASCII`` + (non-pipe) log files. This all might seem complicated, but just keep in + mind that the intention of ``ascii_buffer_size`` is to simply provide a way + for the user to configure different ``ASCII`` and ``ASCII_PIPE`` maximum + line lengths. + +.. ts:cv:: CONFIG proxy.config.log.log_buffer_size INT 9216 + :reloadable: + :units: bytes + + This is an orthogonal mechanism from :ts:cv:`proxy.config.log.max_line_size` + and :ts:cv:`proxy.config.log.ascii_buffer_size` for limiting line length + size by constraining the log entry buffer to a particular amount of memory. + Unlike the above two configurations, ``log_buffer_size`` applies to both + binary and ``ASCII`` log file entries. For ``ASCII`` log files, if a maximum + log size is set via both the above mechanisms and by ``log_buffer_size``, + then the smaller of the two configurations will be applied to the line + length. + Diagnostic Logging Configuration diff --git a/doc/admin-guide/logging/formatting.en.rst b/doc/admin-guide/logging/formatting.en.rst index 9f095ab..8fa5edd 100644 --- a/doc/admin-guide/logging/formatting.en.rst +++ b/doc/admin-guide/logging/formatting.en.rst @@ -800,34 +800,13 @@ cquuh Client Request Unmapped URL host from the client request. Line Length === -The maximum line size for a log entry can be configured via the following parameters: - -- :ts:cv:`proxy.config.log.max_line_size`: This controls the maximum line - length for ASCII formatted log entries. This applies to ``ASCII_PIPE`` and - ``ASCII`` file logs, *unless* :ts:cv:`proxy.config.log.ascii_buffer_size` is - also specified and the value of :ts:cv:`ascii_buffer_size` is larger than - :ts:cv:`max_line_size`: in that case, :ts:cv:`max_line_size` only applies to - ``ASCII_PIPE`` logs while :ts:cv:`ascii_buffer_size` will apply to ``ASCII`` - (non-pipe) log files. - -- :ts:cv:`proxy.config.log.ascii_buffer_size`: This controls the maximum line - length for ASCII formatted log entries that are non-pipe log files. If this - value is smaller than :ts:cv:`proxy.config.log.max_line_size`, then the - latter will be used for both ``ASCII`` and ``ASCII_PIPE`` log files. If both - :ts:cv:`max_line_size` and :ts:cv:`ascii_buffer_size` are set, then - :ts:cv:`max_line_size` will be used for ``ASCII_PIPE`` logs while - :ts:cv:`ascii_buffer_size` will be used for ``ASCII`` (non-pipe) log files. - This all might seem complicated, but just keep in mind that the intention of - :ts:cv:`ascii_buffer_size` is to simply provide a way for the user to - configure different ``ASCII`` and ``ASCII_PIPE`` maximum line lengths. - -- :ts:cv:`proxy.config.log.log_buffer_size`: This is an orthogonal mechanism - for limiting line length size
[trafficserver] branch master updated: Cleaned up smuggle-client
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 ac5b1a5 Cleaned up smuggle-client ac5b1a5 is described below commit ac5b1a578eab7d66c57f5b67bbcc33686b7fa8c6 Author: Bryan Call AuthorDate: Thu Feb 20 09:39:06 2020 -0800 Cleaned up smuggle-client Removed unused variables Added printf and asserts to give more information about what failed --- tests/gold_tests/chunked_encoding/smuggle-client.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/tests/gold_tests/chunked_encoding/smuggle-client.c b/tests/gold_tests/chunked_encoding/smuggle-client.c index c064571..928db41 100644 --- a/tests/gold_tests/chunked_encoding/smuggle-client.c +++ b/tests/gold_tests/chunked_encoding/smuggle-client.c @@ -32,6 +32,7 @@ #include #include #include +#include const char *req_and_post_buf = "GET / HTTP/1.1\r\nConnection: close\r\nHost: foo.com\r\nTransfer-Encoding: chunked\r\nContent-Length: 301\r\n\r\n0\r\n\r\nPOST " @@ -47,9 +48,7 @@ main(int argc, char *argv[]) { struct addrinfo hints; struct addrinfo *result, *rp; - int sfd, s, j; - size_t len; - ssize_t nread; + int sfd, s; if (argc < 3) { fprintf(stderr, "Usage: %s \n", argv[0]); @@ -58,9 +57,15 @@ main(int argc, char *argv[]) const char *target = argv[1]; const char *target_port = argv[2]; + printf("using address: %s and port: %s\n", target, target_port); - /* Obtain address(es) matching host/port */ +#if OPENSSL_VERSION_NUMBER < 0x1010L + SSL_library_init(); +#else + OPENSSL_init_ssl(0, NULL); +#endif + /* Obtain address(es) matching host/port */ memset(, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */ hints.ai_socktype = SOCK_STREAM; /* Datagram socket */ @@ -94,12 +99,13 @@ main(int argc, char *argv[]) } SSL_CTX *client_ctx = SSL_CTX_new(SSLv23_client_method()); - SSL *ssl= SSL_new(client_ctx); + assert(client_ctx != NULL); + SSL *ssl = SSL_new(client_ctx); + assert(ssl != NULL); SSL_set_fd(ssl, sfd); - int ret = SSL_connect(ssl); - int read_count = 0; - int write_count = 1; + int ret = SSL_connect(ssl); + assert(ret == 1); printf("Send request\n"); if ((ret = SSL_write(ssl, req_and_post_buf, strlen(req_and_post_buf))) <= 0) {
[trafficserver] branch master updated (87e7906 -> 4f84c27)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 87e7906 Another option to fix potential HTTP/2 vio stall add 4f84c27 Cleaned up ssl-port No new revisions were added by this update. Summary of changes: tests/gold_tests/tls/ssl-post.c | 12 1 file changed, 4 insertions(+), 8 deletions(-)
[trafficserver] branch master updated (0f1f028 -> a558db5)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 0f1f028 Reset captive_action.cancelled during open read retry to prevent assert add a558db5 Disable the chunked_encoding test No new revisions were added by this update. Summary of changes: tests/gold_tests/chunked_encoding/chunked_encoding.test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
[trafficserver] branch master updated (a71a815 -> aa903d9)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from a71a815 Export headers for internal YAML-CPP library. This allows plugins to use the library in the same way and version as the TS core. add aa903d9 Fixed encoding test to work with OpenSSL 1.0.2 No new revisions were added by this update. Summary of changes: tests/gold_tests/chunked_encoding/smuggle-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[trafficserver] branch master updated: Replace python with python3 in AuTest
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 6babe49 Replace python with python3 in AuTest 6babe49 is described below commit 6babe49d81a3f95e2bec139236167554fe993bd9 Author: Masaori Koshiba AuthorDate: Tue Feb 4 14:39:48 2020 +0900 Replace python with python3 in AuTest Ran below command ``` find . -name "*.py" | xargs sed -i '' s/"python "/"python3 "/g ``` --- tests/gold_tests/basic/deny0.test.py | 2 +- tests/gold_tests/body_factory/http204_response.test.py | 4 ++-- .../gold_tests/body_factory/http204_response_plugin.test.py | 2 +- tests/gold_tests/body_factory/http304_response.test.py | 2 +- tests/gold_tests/body_factory/http_head_no_origin.test.py| 2 +- tests/gold_tests/body_factory/http_with_origin.test.py | 6 +++--- tests/gold_tests/h2/httpbin.test.py | 2 +- tests/gold_tests/headers/domain-blacklist-30x.test.py| 12 ++-- .../headers/general-connection-failure-502.test.py | 2 +- tests/gold_tests/headers/http408.test.py | 2 +- tests/gold_tests/logging/all_headers.test.py | 2 +- tests/gold_tests/logging/new_log_flds.test.py| 2 +- .../pluginTest/combo_handler/combo_handler.test.py | 2 +- tests/gold_tests/pluginTest/xdebug/x_remap/x_remap.test.py | 2 +- tests/gold_tests/redirect/redirect.test.py | 8 tests/gold_tests/redirect/redirect_actions.test.py | 2 +- 16 files changed, 27 insertions(+), 27 deletions(-) diff --git a/tests/gold_tests/basic/deny0.test.py b/tests/gold_tests/basic/deny0.test.py index 54fbe99..4cacd14 100644 --- a/tests/gold_tests/basic/deny0.test.py +++ b/tests/gold_tests/basic/deny0.test.py @@ -63,7 +63,7 @@ def buildMetaTest(testName, requestString): tr.Processes.Default.StartBefore(dns) with open(os.path.join(data_path, tr.Name), 'w') as f: f.write(requestString) - tr.Processes.Default.Command = "python tcp_client.py 127.0.0.1 {0} {1} | head -1".format(ts.Variables.port, os.path.join(data_dirname, tr.Name)) + tr.Processes.Default.Command = "python3 tcp_client.py 127.0.0.1 {0} {1} | head -1".format(ts.Variables.port, os.path.join(data_dirname, tr.Name)) tr.ReturnCode = 0 tr.Processes.Default.Streams.stdout = gold_filepath tr.StillRunningAfter = ts diff --git a/tests/gold_tests/body_factory/http204_response.test.py b/tests/gold_tests/body_factory/http204_response.test.py index f7f21df..34e531b 100644 --- a/tests/gold_tests/body_factory/http204_response.test.py +++ b/tests/gold_tests/body_factory/http204_response.test.py @@ -76,7 +76,7 @@ defaultTr = Test.AddTestRun("Test domain {0}".format(DEFAULT_204_HOST)) defaultTr.Processes.Default.StartBefore(Test.Processes.ts) defaultTr.StillRunningAfter = ts -defaultTr.Processes.Default.Command = "python tcp_client.py 127.0.0.1 {0} {1} | grep -v '^Date: '| grep -v '^Server: ATS/'".\ +defaultTr.Processes.Default.Command = "python3 tcp_client.py 127.0.0.1 {0} {1} | grep -v '^Date: '| grep -v '^Server: ATS/'".\ format(ts.Variables.port, 'data/{0}_get.txt'.format(DEFAULT_204_HOST)) defaultTr.Processes.Default.TimeOut = 5 # seconds defaultTr.Processes.Default.ReturnCode = 0 @@ -86,7 +86,7 @@ defaultTr.Processes.Default.Streams.stdout = "gold/http-204.gold" customTemplateTr = Test.AddTestRun("Test domain {0}".format(CUSTOM_TEMPLATE_204_HOST)) customTemplateTr.StillRunningBefore = ts customTemplateTr.StillRunningAfter = ts -customTemplateTr.Processes.Default.Command = "python tcp_client.py 127.0.0.1 {0} {1} | grep -v '^Date: '| grep -v '^Server: ATS/'".\ +customTemplateTr.Processes.Default.Command = "python3 tcp_client.py 127.0.0.1 {0} {1} | grep -v '^Date: '| grep -v '^Server: ATS/'".\ format(ts.Variables.port, 'data/{0}_get.txt'.format(CUSTOM_TEMPLATE_204_HOST)) customTemplateTr.Processes.Default.TimeOut = 5 # seconds customTemplateTr.Processes.Default.ReturnCode = 0 diff --git a/tests/gold_tests/body_factory/http204_response_plugin.test.py b/tests/gold_tests/body_factory/http204_response_plugin.test.py index ffc692d..1890770 100644 --- a/tests/gold_tests/body_factory/http204_response_plugin.test.py +++ b/tests/gold_tests/body_factory/http204_response_plugin.test.py @@ -46,7 +46,7 @@ tr = Test.AddTestRun("Test domain {0}".format(CUSTOM_PLUGIN_204_HOST)) tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts -tr.Processes.Default.Command = "python tcp_client.py 127.0.0.1 {0} {1} | grep -v '^Date: '| grep -v '^Server: ATS/'".\ +tr.Processes.Default.Command = "p
[trafficserver] branch master updated: Set default encoding UTF-8 for AuTest on Linux
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 a96d0b2 Set default encoding UTF-8 for AuTest on Linux a96d0b2 is described below commit a96d0b26bd71e0c04fb524f6dc96724fdf8673ba Author: Masaori Koshiba AuthorDate: Tue Feb 4 10:49:02 2020 +0900 Set default encoding UTF-8 for AuTest on Linux --- ci/jenkins/bin/autest.sh | 11 +++ 1 file changed, 11 insertions(+) diff --git a/ci/jenkins/bin/autest.sh b/ci/jenkins/bin/autest.sh index 45a99ba..5efac22 100755 --- a/ci/jenkins/bin/autest.sh +++ b/ci/jenkins/bin/autest.sh @@ -18,6 +18,17 @@ set +x +# Set default encoding UTF-8 for AuTest +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 +echo "LC_ALL: $LC_ALL" +echo "LANG: $LANG" + +# Check python version & encoding +python3 --version +echo "python default encoding: " +python3 -c "import sys; print(sys.getdefaultencoding())" + INSTALL="${ATS_BUILD_BASEDIR}/install" URL="https://ci.trafficserver.apache.org/autest; JOB_ID=${ghprbPullId:-${ATS_BRANCH:-master}}
[trafficserver] annotated tag 7.1.9-rc1 updated (e646609 -> 04557f2)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to annotated tag 7.1.9-rc1 in repository https://gitbox.apache.org/repos/asf/trafficserver.git. *** WARNING: tag 7.1.9-rc1 was modified! *** from e646609 (commit) to 04557f2 (tag) tagging e6466094bc203613ce5c8a942cccdb33695447f8 (commit) replaces 7.1.9-rc0 by Bryan Call on Tue Feb 18 11:34:26 2020 -0800 - Log - Release Candidate 7.1.9-rc1 -BEGIN PGP SIGNATURE- iQIcBAABAgAGBQJeTDxCAAoJEE0VQRC4RQjsa9AP/jfhPHQGBq4m55DnX2uG3GjN iwHx51OaFgVkENN25EnPZNc99O6y7pFqLcaJfRx28f2JNe64Qay4KygivqvZJ7rw +pBL4cS6cy+TcRD/gW5x6VXhLWuQNm8qvSWmtbERDlK/ssLAJ/+qPOuKwCej93W1 Vd1UNredpy5ZR6/GddA1GSGZ1C0nbfaqlmJ/fThdDjWnVN7HIafVPTeLP7arJ2g8 yS/qO+JNDKtVNYdbPl/kF+Paz0Tgnb+1swu+/P8XWHz5+aE9gStAQ8EsKo3XXJYb K0tWgwQlqCLLRZIJoEf6dpRmbVDxwFFWG+7oSgfR35ZUPSJAXjBwqRcdiXAoUU0W EBj7BXIIYpZaH6RghUjvyGY+Px1Y+kASoRIJh7d2Uf65ZiOICWgxsyklXm1cE5Au 9ttHaEfCdZcNslPQYDQmaKdSAwGfoyAXx6bnQNLDeFknNbOpzFD/KGxSJVyob8z3 +WSZ7hKpUET8g1R6RCozyIge0kYr9HGJn4sJpYYzn8igfd2PcRIp4mDtF2A6JdGl 9QW9PqwUnBn1m5uCdvhpPQRwSaxJpf4WGhanC+VbGIqx9DHG8dSqXD/ZVQ7ytjpe K5CHyTA8NLBDjlBkBnI0XN0J/WGQl/pKpZ1R1hJpNOl3qTT4KH8neb42NguTiqJP ffcbmz8bzjB4cY+oaXcE =iqm7 -END PGP SIGNATURE- --- No new revisions were added by this update. Summary of changes:
[trafficserver] annotated tag 8.0.6-rc1 updated (bcc92ee -> 18baa5b)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to annotated tag 8.0.6-rc1 in repository https://gitbox.apache.org/repos/asf/trafficserver.git. *** WARNING: tag 8.0.6-rc1 was modified! *** from bcc92ee (commit) to 18baa5b (tag) tagging bcc92eeca744b07500d6dd3b6b9a222a968fe8fa (commit) replaces 8.0.6-rc0 by Bryan Call on Tue Feb 18 11:17:19 2020 -0800 - Log - Release Candidate 8.0.6-rc1 -BEGIN PGP SIGNATURE- iQIcBAABAgAGBQJeTDg/AAoJEE0VQRC4RQjseX0P/RMFYI4bzAfez5WfHmZ/JxmG 0KMCkyTc93WyvBeJ+mMusSXiZam9dfbDb4FC4DrekwA6Fn2mriY5h0ZI3lM5GeWm IlcgqPf7KZzzbCmB4k+/xV5vd61PwIVGNN4DJjmXIHe6pPqnNxaJjf0dwNMkFMFG G+HBi9lcJgDH3o0TazaOdJ/E52xagINakgxbnyiSKbh2DK6U5Q3Llg0/4LXQ6Jgd 6eQ6I9ZxmQ49N7Ka3W+ZghmWjL3+yWLKwMbkOdNNOILzigZgiRsLfTVuZAMaj4vN o2rkma8nnRpMQQeg72BE9efRmPhQWhL7FmlwoOKBQOcdt1aDfcvJw4Uz0RO9SjxC IW6Gn/hMtIKzsY0GuxGo1aSPNRtzR7wDFL1bTJ4+JaW72FRLzI7PchYBnb/aMw/L RdtWPRZn/KDKvMxocr1p9KaesAjxeVk+/0/+uPBBw/Ca3mi+nTRTJVHr4WNSGbGJ C2hTF7Zc6b9qUR5jq1eOEYPiRmAPGvK+fcrCJdJZ02rJjcjNJqbATHOT8OFbZguq 2lc6MNF/atKq5+XoWM6FrGeSeDaeHC7sjm0GH4uYBkkEjNef5qT/40qLAl27xmkB 8qtqvKUl3J0ppTuO4evfMz+lhfN3S3klcf3qyHYgxESvBGwaZZjLRQrx/9Izgco7 eqcMer2njYDUOMQ3RyGu =NmRU -END PGP SIGNATURE- --- No new revisions were added by this update. Summary of changes:
[trafficserver] branch 8.0.x updated: Updated Changelog
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.0.x by this push: new bcc92ee Updated Changelog bcc92ee is described below commit bcc92eeca744b07500d6dd3b6b9a222a968fe8fa Author: Bryan Call AuthorDate: Tue Feb 18 11:11:09 2020 -0800 Updated Changelog --- CHANGELOG-8.0.6 | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG-8.0.6 b/CHANGELOG-8.0.6 index da0fd60..6133c5c 100644 --- a/CHANGELOG-8.0.6 +++ b/CHANGELOG-8.0.6 @@ -40,3 +40,4 @@ Changes with Apache Traffic Server 8.0.6 #6389 - Fixed how we handle unknown schemes #6390 - Change header validation #6398 - Fix chunked processing + #6416 - Handle final delayed chunk size
[trafficserver] branch 7.1.x updated: Updated Changelog
This is an automated email from the ASF dual-hosted git repository. bcall 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 e646609 Updated Changelog e646609 is described below commit e6466094bc203613ce5c8a942cccdb33695447f8 Author: Bryan Call AuthorDate: Tue Feb 18 11:11:58 2020 -0800 Updated Changelog --- CHANGELOG-7.1.9 | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG-7.1.9 b/CHANGELOG-7.1.9 index 4d3355f..0195f9f 100644 --- a/CHANGELOG-7.1.9 +++ b/CHANGELOG-7.1.9 @@ -2,3 +2,4 @@ Changes with Apache Traffic Server 7.1.9 #6394 - Change header validation #6395 - Fixed how we handle unknown schemes #6399 - Fix chunked processing + #6418 - Handle final delayed chunk size
[trafficserver] branch 8.0.x updated: Handle final delayed chunk size
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.0.x by this push: new c5f761b Handle final delayed chunk size c5f761b is described below commit c5f761b690754e283822aa74106d2d6276d95e74 Author: Susan Hinrichs AuthorDate: Thu Feb 13 17:00:06 2020 + Handle final delayed chunk size --- iocore/eventsystem/I_VIO.h | 2 +- iocore/eventsystem/P_VIO.h | 2 +- proxy/http/HttpTransact.cc | 4 ++-- proxy/http/HttpTunnel.cc | 3 +-- proxy/http2/Http2Stream.cc | 8 proxy/http2/Http2Stream.h | 14 +- 6 files changed, 6 insertions(+), 27 deletions(-) diff --git a/iocore/eventsystem/I_VIO.h b/iocore/eventsystem/I_VIO.h index de7ab32..eacbc35 100644 --- a/iocore/eventsystem/I_VIO.h +++ b/iocore/eventsystem/I_VIO.h @@ -95,7 +95,7 @@ public: @return The number of bytes to be processed by the operation. */ - int64_t ntodo(); + int64_t ntodo() const; / // buffer settings // diff --git a/iocore/eventsystem/P_VIO.h b/iocore/eventsystem/P_VIO.h index e2bf54f..5c0d057 100644 --- a/iocore/eventsystem/P_VIO.h +++ b/iocore/eventsystem/P_VIO.h @@ -61,7 +61,7 @@ VIO::get_reader() return (buffer.reader()); } TS_INLINE int64_t -VIO::ntodo() +VIO::ntodo() const { return nbytes - ndone; } diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index c0ddf77..5629521 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -6839,12 +6839,12 @@ HttpTransact::handle_response_keep_alive_headers(State *s, HTTPVersion ver, HTTP } // Close the connection if client_info is not keep-alive. -// Otherwise, if we cannot trust the content length, we will close the connection +// Otherwise, if we cannot trust the content length and the client process chunked encoding, we will close the connection // unless we are going to use chunked encoding or the client issued // a PUSH request if (s->client_info.keep_alive != HTTP_KEEPALIVE) { ka_action = KA_DISABLED; -} else if (s->hdr_info.trust_response_cl == false && +} else if (s->hdr_info.trust_response_cl == false && s->state_machine->ua_txn->is_chunked_encoding_supported() && !(s->client_info.receive_chunked_response == true || (s->method == HTTP_WKSIDX_PUSH && s->client_info.keep_alive == HTTP_KEEPALIVE))) { ka_action = KA_CLOSE; diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc index bcdb695..404b4f3 100644 --- a/proxy/http/HttpTunnel.cc +++ b/proxy/http/HttpTunnel.cc @@ -839,8 +839,7 @@ HttpTunnel::producer_run(HttpTunnelProducer *p) // initialize a reader to chunked buffer start before writing to keep ref count chunked_buffer_start = p->chunked_handler.chunked_buffer->alloc_reader(); p->chunked_handler.chunked_buffer->write(p->buffer_start, p->chunked_handler.skip_bytes); -} -if (p->do_dechunking) { +} else if (p->do_dechunking) { // bz57413 Debug("http_tunnel", "[producer_run] do_dechunking p->chunked_handler.chunked_reader->read_avail() = %" PRId64 "", p->chunked_handler.chunked_reader->read_avail()); diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc index 4a3bd34..d1c37f6 100644 --- a/proxy/http2/Http2Stream.cc +++ b/proxy/http2/Http2Stream.cc @@ -613,10 +613,6 @@ Http2Stream::update_write_request(IOBufferReader *buf_reader, int64_t write_len, // make sure to send the end of stream is_done |= (write_vio.ntodo() + this->response_header.length_get()) == bytes_avail; if (this->response_is_data_available() || is_done) { -if (is_done) { - this->mark_body_done(); -} - this->send_response_body(call_update); } break; @@ -628,10 +624,6 @@ Http2Stream::update_write_request(IOBufferReader *buf_reader, int64_t write_len, break; } } else { -if (write_vio.ntodo() == bytes_avail || is_done) { - this->mark_body_done(); -} - this->send_response_body(call_update); } diff --git a/proxy/http2/Http2Stream.h b/proxy/http2/Http2Stream.h index 96cebb0..3be1057 100644 --- a/proxy/http2/Http2Stream.h +++ b/proxy/http2/Http2Stream.h @@ -67,18 +67,7 @@ public: bool is_body_done() const { -return body_done; - } - - void - mark_body_done() - { -body_done = true; -if (response_is_chunked()) { - ink_assert(chunked_handler.state == ChunkedHandler::CHUNK_READ_DONE || - chunked_handler.state == ChunkedHandler::CHUNK_READ_ERROR); - this->write_vio.nbytes = response_header.length_get() + chunked_handler.dechunked_size; -} +retur
[trafficserver] branch 7.1.x updated: Handle final delayed chunk size
This is an automated email from the ASF dual-hosted git repository. bcall 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 2fee129 Handle final delayed chunk size 2fee129 is described below commit 2fee129209c2a016aa8d56ea69fc214b9dc1de2c Author: Susan Hinrichs AuthorDate: Thu Feb 13 20:26:31 2020 + Handle final delayed chunk size --- iocore/eventsystem/I_VIO.h | 2 +- iocore/eventsystem/P_VIO.h | 2 +- proxy/http/HttpTransact.cc | 2 +- proxy/http2/Http2Stream.cc | 11 +-- proxy/http2/Http2Stream.h | 14 +- 5 files changed, 5 insertions(+), 26 deletions(-) diff --git a/iocore/eventsystem/I_VIO.h b/iocore/eventsystem/I_VIO.h index 7f44139..d49a6ef 100644 --- a/iocore/eventsystem/I_VIO.h +++ b/iocore/eventsystem/I_VIO.h @@ -96,7 +96,7 @@ public: @return The number of bytes to be processed by the operation. */ - int64_t ntodo(); + int64_t ntodo() const; / // buffer settings // diff --git a/iocore/eventsystem/P_VIO.h b/iocore/eventsystem/P_VIO.h index 8901c48..6f24832 100644 --- a/iocore/eventsystem/P_VIO.h +++ b/iocore/eventsystem/P_VIO.h @@ -65,7 +65,7 @@ VIO::get_reader() return (buffer.reader()); } TS_INLINE int64_t -VIO::ntodo() +VIO::ntodo() const { return nbytes - ndone; } diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index 156441d..0988507 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -7140,7 +7140,7 @@ HttpTransact::handle_response_keep_alive_headers(State *s, HTTPVersion ver, HTTP // a PUSH request if (s->client_info.keep_alive != HTTP_KEEPALIVE) { ka_action = KA_DISABLED; -} else if (s->hdr_info.trust_response_cl == false && +} else if (s->hdr_info.trust_response_cl == false && s->state_machine->ua_session->is_chunked_encoding_supported() && !(s->client_info.receive_chunked_response == true || (s->method == HTTP_WKSIDX_PUSH && s->client_info.keep_alive == HTTP_KEEPALIVE))) { ka_action = KA_CLOSE; diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc index 526a747..aa86876 100644 --- a/proxy/http2/Http2Stream.cc +++ b/proxy/http2/Http2Stream.cc @@ -602,12 +602,7 @@ Http2Stream::update_write_request(IOBufferReader *buf_reader, int64_t write_len, // If there is additional data, send it along in a data frame. Or if this was header only // make sure to send the end of stream - is_done |= (write_vio.ntodo() + this->response_header.length_get()) == bytes_avail; - if (this->response_is_data_available() || is_done) { -if (is_done) { - this->mark_body_done(); -} - + if (this->response_is_data_available()) { this->send_response_body(call_update); } break; @@ -619,10 +614,6 @@ Http2Stream::update_write_request(IOBufferReader *buf_reader, int64_t write_len, break; } } else { -if (write_vio.ntodo() == bytes_avail || is_done) { - this->mark_body_done(); -} - this->send_response_body(call_update); } diff --git a/proxy/http2/Http2Stream.h b/proxy/http2/Http2Stream.h index c67efb6..0704416 100644 --- a/proxy/http2/Http2Stream.h +++ b/proxy/http2/Http2Stream.h @@ -94,18 +94,7 @@ public: bool is_body_done() const { -return body_done; - } - - void - mark_body_done() - { -body_done = true; -if (response_is_chunked()) { - ink_assert(chunked_handler.state == ChunkedHandler::CHUNK_READ_DONE || - chunked_handler.state == ChunkedHandler::CHUNK_READ_ERROR); - this->write_vio.nbytes = response_header.length_get() + chunked_handler.dechunked_size; -} +return this->write_vio.ntodo() == 0; } void @@ -283,7 +272,6 @@ private: VIO write_vio; bool trailing_header = false; - bool body_done = false; bool chunked = false; // A brief disucssion of similar flags and state variables: _state, closed, terminate_stream
[trafficserver] annotated tag 7.1.9-rc0 updated (3418900 -> 40e494b)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to annotated tag 7.1.9-rc0 in repository https://gitbox.apache.org/repos/asf/trafficserver.git. *** WARNING: tag 7.1.9-rc0 was modified! *** from 3418900 (commit) to 40e494b (tag) tagging 34189005929714af8cc9ef697dfb939e0240199b (commit) replaces 7.1.8 by Bryan Call on Tue Feb 11 11:46:05 2020 -0800 - Log - Release Candidate 7.1.9-rc0 -BEGIN PGP SIGNATURE- iQIcBAABAgAGBQJeQwR9AAoJEE0VQRC4RQjsERYQAKWKWF3sBy4dbv+qwi/+JnQs cXVOv+fQcfvWGh2GHPuGt2TrEEAKySJRDMqkTlGTjFm4VVSUY5yIQlEaiMkGw47/ xGnxzuvpUJW9wF59PAp16sRtKwmdU2mxed8/whlxdknXgOzGDCjMfLyrfi1oh46H Js0cJOSZUPxvIUbCxmLTVjT7XJkkkz23tsYkhj4teQ8IWLPez5OZMjcxauZKRS6N 7+p/zBfM48Wts0ogdzDwzwaH/wZhh2Zb+cPcDWi4UbrUXOJhYxB38jhgNDtXOpO2 Zx4bncthoqKhwTRbBPjg2Ukm/NCXlHLC2smaicgmPbSduGbkZjEHsBXcB6LFhetj REikKBcvGJgoJxo71azcxdVR+SiHTVBQ9F8n2LJyhNs1M83KkoFT/exSs/IHzYSb +ISXyZUzZzzyYMEL5uwCT3lMoy3oB3KifXtkxaOzQ8OahIn4Xe3rSrooPPLHOBrW VxZ+6XluOCKvfoI/+dIuFn9vQ+44Gut70D80jCGyP1HtxdxTU2H2jdz55qvVuwdH 6QI+NChF5MouE8pQUUUVhLCJnIVFH+b0cg2+j9pYBnC3aHPOab7M+HktfJDjTARf 1z2ya9hkjmj9LK0yELPFcThRbi1hXG2WvTRmkyo1qBDZdgS1kNmTrhMFqSi4egS/ Eje38iLWKJ62piPCn+2/ =Bg5h -END PGP SIGNATURE- --- No new revisions were added by this update. Summary of changes:
[trafficserver] annotated tag 8.0.6-rc0 updated (21efb27 -> 4361be1)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to annotated tag 8.0.6-rc0 in repository https://gitbox.apache.org/repos/asf/trafficserver.git. *** WARNING: tag 8.0.6-rc0 was modified! *** from 21efb27 (commit) to 4361be1 (tag) tagging 21efb2785e557295df01e9be03f4b35b2a3fd83d (commit) replaces 8.0.5 by Bryan Call on Tue Feb 11 11:35:12 2020 -0800 - Log - Release Candidate 8.0.6-rc0 -BEGIN PGP SIGNATURE- iQIcBAABAgAGBQJeQwHwAAoJEE0VQRC4RQjsC8MP/A0UiYLqpmNVcHxdNfOP7njh LpU1zNsTT7DCvoUJ6NxNIj1D53VtlaK3NixrV7kFlOHW2crHdBx50FfmQfxWHLL+ LaNPMP6YKMPu04DDZg+TFrGjzJ7pz/wflq4BNNKgfYjBMDRljYhOWM4B0RaoisIm RA6JaKub/bGfUsz2FtGCyQMAMCfboEGq7a5aiDGW7IA0rOjPvCYDIvuCDfrljent /V2/G3BbAC0P53sOlPowNZky5fxImSNQMd6/MoL3Fq3diT9mXIChEoBt4ibRaCyw VUn6Xd1yY7whz44XnVEAVdeSBPGPx9a38uLxT+XT8xG5YTsMjUCedzkRGzRxbg5X dlF4lfROq2GRWnbF/BQU4K83s+O5bZk/b3NgKAXH5osMGGYnjCt0hEu4RjYH6GQt mudLTy6W8GeV7gVpqJZyUUbVmLEb9fVbcljFu89HJ4Yj88aH4uFD+jUcGygyBkzQ eHii9jVi4229FK6qFL4tSOz6QJlounQSj/xeH/9GNn2IbP0+kAb/26h+sv2t6YZl jATBRx07PS0mrERNYoVeRygL3wAkCEsg9UM+6oqINMg3X8CzZTBoUSbyZtq8j5WF E2NIKJ8fYbsbDUeHiqpvKVOuVEW4jKxx1yffg/iS/0mC/HZICh7s6Qci7RqYr9a9 WuWjvUHlKNdSJxLsxQSM =DrSA -END PGP SIGNATURE- --- No new revisions were added by this update. Summary of changes:
[trafficserver] tag 8.0.6-rc0 created (now 21efb27)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to tag 8.0.6-rc0 in repository https://gitbox.apache.org/repos/asf/trafficserver.git. at 21efb27 (commit) No new revisions were added by this update.
[trafficserver] 01/02: Updated Changelog
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 7.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit d7abb25bad974f7e257922d07ce2e0db4f173f85 Author: Bryan Call AuthorDate: Mon Feb 10 11:39:44 2020 -0800 Updated Changelog --- CHANGELOG-7.1.9 | 4 1 file changed, 4 insertions(+) diff --git a/CHANGELOG-7.1.9 b/CHANGELOG-7.1.9 new file mode 100644 index 000..4d3355f --- /dev/null +++ b/CHANGELOG-7.1.9 @@ -0,0 +1,4 @@ +Changes with Apache Traffic Server 7.1.9 + #6394 - Change header validation + #6395 - Fixed how we handle unknown schemes + #6399 - Fix chunked processing
[trafficserver] 02/02: Bumped version to 7.1.9
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 7.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 34189005929714af8cc9ef697dfb939e0240199b Author: Bryan Call AuthorDate: Mon Feb 10 11:43:36 2020 -0800 Bumped version to 7.1.9 --- STATUS | 1 + configure.ac | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/STATUS b/STATUS index aaed979..314ba4d 100644 --- a/STATUS +++ b/STATUS @@ -6,6 +6,7 @@ The current version of this file can be found at: * https://github.com/apache/trafficserver/blob/master/STATUS Release history: +7.1.9 : Released on Feb xxth, 2020 7.1.8 : Released on Aug 20th, 2019 7.1.7 : Released on Aug 13th, 2019 7.1.6 : Released on Jan 29th, 2019 diff --git a/configure.ac b/configure.ac index 131ed48..9e98f04 100644 --- a/configure.ac +++ b/configure.ac @@ -32,8 +32,8 @@ # Version number is calculated as MAJOR * 100 + MINOR * 1000 + MICRO # Version string is in the form of MAJOR.MINOR.MICRO[sufix] # -m4_define([TS_VERSION_S],[7.1.8]) -m4_define([TS_VERSION_N],[7001008]) +m4_define([TS_VERSION_S],[7.1.9]) +m4_define([TS_VERSION_N],[7001009]) AC_INIT([Apache Traffic Server], TS_VERSION_S(), [d...@trafficserver.apache.org], [trafficserver],[http://trafficserver.apache.org]) AC_PREREQ([2.59])
[trafficserver] branch 7.1.x updated (1d40746 -> 3418900)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch 7.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 1d40746 clang-format new d7abb25 Updated Changelog new 3418900 Bumped version to 7.1.9 The 2 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: CHANGELOG-7.1.9 | 4 STATUS | 1 + configure.ac| 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 CHANGELOG-7.1.9
[trafficserver] 02/02: Updated Changelog
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 21efb2785e557295df01e9be03f4b35b2a3fd83d Author: Bryan Call AuthorDate: Mon Feb 10 11:18:58 2020 -0800 Updated Changelog --- CHANGELOG-8.0.6 | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG-8.0.6 b/CHANGELOG-8.0.6 index cb89007..da0fd60 100644 --- a/CHANGELOG-8.0.6 +++ b/CHANGELOG-8.0.6 @@ -35,7 +35,6 @@ Changes with Apache Traffic Server 8.0.6 #6145 - Remove including sys/sysctl.h for Linux #6158 - Fixed build issues with hwloc 2.x API changes #6248 - Add support for the old lua formatted ease of use conventions and the numeric log rolling values - #6294 - Enhance Connection Collapse in ATS core - back port to 8.x #6308 - Fix clang-format-github CI job for 8.0.x branch #6312 - Set wrap after checking all the parents #6389 - Fixed how we handle unknown schemes
[trafficserver] 01/02: Revert "Enhance Connection Collapse in ATS core"
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 6ed35bcb8e042cb383aeca79863bdaaa8e4a828d Author: Bryan Call AuthorDate: Mon Feb 10 11:14:50 2020 -0800 Revert "Enhance Connection Collapse in ATS core" This reverts commit f76c4c77b09ca0675a82c2a0b50b0699bad8a43f. --- doc/admin-guide/files/records.config.en.rst | 9 - proxy/http/HttpCacheSM.cc | 55 - proxy/http/HttpSM.cc| 9 - proxy/http/HttpTransact.cc | 22 proxy/http/HttpTransact.h | 1 - 5 files changed, 20 insertions(+), 76 deletions(-) diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst index 0213466..3dc98a7 100644 --- a/doc/admin-guide/files/records.config.en.rst +++ b/doc/admin-guide/files/records.config.en.rst @@ -2181,9 +2181,6 @@ all the different user-agent versions of documents it encounters. The number of times to attempt a cache open write upon failure to get a write lock. -This config is ignored when :ts:cv:`proxy.config.http.cache.open_write_fail_action` is -set to ``5``. - .. ts:cv:: CONFIG proxy.config.http.cache.open_write_fail_action INT 0 :reloadable: :overridable: @@ -2206,12 +2203,6 @@ all the different user-agent versions of documents it encounters. :ts:cv:`proxy.config.http.cache.max_stale_age`. Otherwise, go to origin server. ``4`` Return a ``502`` error on either a cache miss or on a revalidation. - ``5`` Retry Cache Read on a Cache Write Lock failure. This option together - with `proxy.config.cache.enable_read_while_writer` configuration - allows to collapse concurrent requests without a need for any plugin. - Make sure to configure Read While Writer feature correctly following - the docs in Cache Basics section. Note that this option may result in - CACHE_LOOKUP_COMPLETE HOOK being called back more than once. = == Customizable User Response Pages diff --git a/proxy/http/HttpCacheSM.cc b/proxy/http/HttpCacheSM.cc index daf39c1..52190bc 100644 --- a/proxy/http/HttpCacheSM.cc +++ b/proxy/http/HttpCacheSM.cc @@ -175,8 +175,7 @@ HttpCacheSM::state_cache_open_write(int event, void *data) { STATE_ENTER(::state_cache_open_write, event); ink_assert(captive_action.cancelled == 0); - pending_action= nullptr; - bool read_retry_on_write_fail = false; + pending_action = nullptr; switch (event) { case CACHE_EVENT_OPEN_WRITE: @@ -188,26 +187,9 @@ HttpCacheSM::state_cache_open_write(int event, void *data) break; case CACHE_EVENT_OPEN_WRITE_FAILED: -if (master_sm->t_state.txn_conf->cache_open_write_fail_action == HttpTransact::CACHE_WL_FAIL_ACTION_READ_RETRY) { - // fall back to open_read_tries - // Note that when CACHE_WL_FAIL_ACTION_READ_RETRY is configured, max_cache_open_write_retries - // is automatically ignored. Make sure to not disable max_cache_open_read_retries - // with CACHE_WL_FAIL_ACTION_READ_RETRY as this results in proxy'ing to origin - // without write retries in both a cache miss or a cache refresh scenario. - if (open_write_tries <= master_sm->t_state.txn_conf->max_cache_open_write_retries) { -Debug("http_cache", "[%" PRId64 "] [state_cache_open_write] cache open write failure %d. read retry triggered", - master_sm->sm_id, open_write_tries); -open_read_tries = 0; -read_retry_on_write_fail = true; -// make sure it doesn't loop indefinitely -open_write_tries = master_sm->t_state.txn_conf->max_cache_open_write_retries + 1; - } -} -if (read_retry_on_write_fail || open_write_tries <= master_sm->t_state.txn_conf->max_cache_open_write_retries) { +if (open_write_tries <= master_sm->t_state.txn_conf->max_cache_open_write_retries) { // Retry open write; open_write_cb = false; - // reset captive_action since HttpSM cancelled it - captive_action.cancelled = 0; do_schedule_in(); } else { // The cache is hosed or full or something. @@ -222,27 +204,18 @@ HttpCacheSM::state_cache_open_write(int event, void *data) break; case EVENT_INTERVAL: -if (master_sm->t_state.txn_conf->cache_open_write_fail_action == HttpTransact::CACHE_WL_FAIL_ACTION_READ_RETRY) { - Debug("http_cache", -"[%" PRId64 "] [state_cache_open_write] cache open write failure %d. " -"falling back to read retry...", -master_sm->sm_id, open_write_tries); - open_read_cb = f
[trafficserver] branch 8.0.x updated (851a5c8 -> 21efb27)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 851a5c8 Updated Changelog new 6ed35bc Revert "Enhance Connection Collapse in ATS core" new 21efb27 Updated Changelog The 2 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: CHANGELOG-8.0.6 | 1 - doc/admin-guide/files/records.config.en.rst | 9 - proxy/http/HttpCacheSM.cc | 55 - proxy/http/HttpSM.cc| 9 - proxy/http/HttpTransact.cc | 22 proxy/http/HttpTransact.h | 1 - 6 files changed, 20 insertions(+), 77 deletions(-)
[trafficserver] branch 8.0.x updated: Updated Changelog
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.0.x by this push: new 851a5c8 Updated Changelog 851a5c8 is described below commit 851a5c81241bc8893890e98afe05e372cc458b46 Author: Bryan Call AuthorDate: Mon Feb 10 10:48:50 2020 -0800 Updated Changelog --- CHANGELOG-8.0.6 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG-8.0.6 b/CHANGELOG-8.0.6 index 0efc5f6..cb89007 100644 --- a/CHANGELOG-8.0.6 +++ b/CHANGELOG-8.0.6 @@ -35,6 +35,9 @@ Changes with Apache Traffic Server 8.0.6 #6145 - Remove including sys/sysctl.h for Linux #6158 - Fixed build issues with hwloc 2.x API changes #6248 - Add support for the old lua formatted ease of use conventions and the numeric log rolling values + #6294 - Enhance Connection Collapse in ATS core - back port to 8.x #6308 - Fix clang-format-github CI job for 8.0.x branch #6312 - Set wrap after checking all the parents + #6389 - Fixed how we handle unknown schemes #6390 - Change header validation + #6398 - Fix chunked processing
[trafficserver] branch 7.1.x updated: clang-format
This is an automated email from the ASF dual-hosted git repository. bcall 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 1d40746 clang-format 1d40746 is described below commit 1d40746c7bcd0bcd3ab64a58ba76a4a27926fbe4 Author: Bryan Call AuthorDate: Fri Feb 7 13:30:14 2020 -0800 clang-format --- proxy/hdrs/HdrTest.cc | 102 +- 1 file changed, 27 insertions(+), 75 deletions(-) diff --git a/proxy/hdrs/HdrTest.cc b/proxy/hdrs/HdrTest.cc index 0027c54..800600b 100644 --- a/proxy/hdrs/HdrTest.cc +++ b/proxy/hdrs/HdrTest.cc @@ -345,95 +345,47 @@ HdrTest::test_url() "cheese://bogosity", -"some.place", -"some.place/", -"http://some.place;, -"http://some.place/;, -"http://some.place/path;, -"http://some.place/path;params;, -"http://some.place/path;params?query;, -"http://some.place/path;params?query#fragment;, -"http://some.place/path?query#fragment;, -"http://some.place/path#fragment;, +"some.place", "some.place/", "http://some.place;, "http://some.place/;, "http://some.place/path;, +"http://some.place/path;params;, "http://some.place/path;params?query;, "http://some.place/path;params?query#fragment;, +"http://some.place/path?query#fragment;, "http://some.place/path#fragment;, -"some.place:80", -"some.place:80/", -"http://some.place:80;, -"http://some.place:80/;, +"some.place:80", "some.place:80/", "http://some.place:80;, "http://some.place:80/;, -"foo@some.place:80", -"foo@some.place:80/", -"http://foo@some.place:80;, -"http://foo@some.place:80/;, +"foo@some.place:80", "foo@some.place:80/", "http://foo@some.place:80;, "http://foo@some.place:80/;, -"foo:bar@some.place:80", -"foo:bar@some.place:80/", -"http://foo:bar@some.place:80;, -"http://foo:bar@some.place:80/;, +"foo:bar@some.place:80", "foo:bar@some.place:80/", "http://foo:bar@some.place:80;, "http://foo:bar@some.place:80/;, // Some address stuff -"http://172.16.28.101;, -"http://172.16.28.101:8080;, -"http://[::];, -"http://[::1];, -"http://[fc01:172:16:28::101];, -"http://[fc01:172:16:28::101]:80;, -"http://[fc01:172:16:28:BAAD:BEEF:DEAD:101];, -"http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]:8080;, -"http://172.16.28.101/some/path;, -"http://172.16.28.101:8080/some/path;, -"http://[::1]/some/path;, -"http://[fc01:172:16:28::101]/some/path;, -"http://[fc01:172:16:28::101]:80/some/path;, -"http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]/some/path;, -"http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]:8080/some/path;, -"http://172.16.28.101/;, -"http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]:8080/;, +"http://172.16.28.101;, "http://172.16.28.101:8080;, "http://[::];, "http://[::1];, "http://[fc01:172:16:28::101];, +"http://[fc01:172:16:28::101]:80;, "http://[fc01:172:16:28:BAAD:BEEF:DEAD:101];, +"http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]:8080;, "http://172.16.28.101/some/path;, "http://172.16.28.101:8080/some/path;, +"http://[::1]/some/path;, "http://[fc01:172:16:28::101]/some/path;, "http://[fc01:172:16:28::101]:80/some/path;, +"http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]/some/path;, "http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]:8080/some/path;, +"http://172.16.28.101/;, "http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]:8080/;, // "foo:@some.place", TODO - foo:@some.place is change to foo@some.place in the test -"foo:bar@some.place", -"foo:bar@some.place/", -"http://foo:bar@some.place;, -"http://foo:bar@some.place/;, -"http://foo:bar@[::1]:8080/;, -"http://foo@[::1];, - -"mms://sm02.tsqa.example.com/0102rally.asf", -"pnm://foo:bar@some.place:80/path;params?query#fragment", -"rtsp://foo:bar@some.place:80/path;params?query#fragment", -"rtspu://foo:bar@some.place:80/path;params?query#fragment", +"foo:bar@some.place", "foo:bar@some.place/", "http://foo:bar@some.place;, "http://foo:bar@some.place/;, +"http://foo:bar@[::1]:8080/;, "http://foo@[::1];, + +"mms://sm02.tsqa.example.com/0102rally.asf", "pnm://foo:bar@some.place:80/path;params?query#fragment", +"rtsp://foo:bar@some.plac
[trafficserver] branch 7.1.x updated: Change header validation
This is an automated email from the ASF dual-hosted git repository. bcall 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 805dd12 Change header validation 805dd12 is described below commit 805dd12dcbff171a1e9c27063e14bcddbfd61e2a Author: ZeddYu Lu AuthorDate: Tue Feb 4 11:20:13 2020 -0800 Change header validation (cherry picked from commit 5830bc72611e85e7a31098ce86710242f29076dc) Conflicts: proxy/hdrs/HTTP.cc --- proxy/hdrs/HTTP.cc | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/proxy/hdrs/HTTP.cc b/proxy/hdrs/HTTP.cc index 6566dab..b96ccf8 100644 --- a/proxy/hdrs/HTTP.cc +++ b/proxy/hdrs/HTTP.cc @@ -1120,19 +1120,17 @@ http_parser_parse_req(HTTPParser *parser, HdrHeap *heap, HTTPHdrImpl *hh, const end= real_end; parser->m_parsing_http = false; - -ParseResult ret = mime_parser_parse(>m_mime_parser, heap, hh->m_fields_impl, start, end, must_copy_strings, eof); -// If we're done with the main parse do some validation -if (ret == PARSE_RESULT_DONE) { - ret = validate_hdr_host(hh); // check HOST header -} -if (ret == PARSE_RESULT_DONE) { - ret = validate_hdr_content_length(heap, hh); -} -return ret; } - return mime_parser_parse(>m_mime_parser, heap, hh->m_fields_impl, start, end, must_copy_strings, eof); + ParseResult ret = mime_parser_parse(>m_mime_parser, heap, hh->m_fields_impl, start, end, must_copy_strings, eof); + // If we're done with the main parse do some validation + if (ret == PARSE_RESULT_DONE) { +ret = validate_hdr_host(hh); // check HOST header + } + if (ret == PARSE_RESULT_DONE) { +ret = validate_hdr_content_length(heap, hh); + } + return ret; } ParseResult @@ -1187,7 +1185,7 @@ validate_hdr_content_length(HdrHeap *heap, HTTPHdrImpl *hh) if (mime_hdr_field_find(hh->m_fields_impl, MIME_FIELD_TRANSFER_ENCODING, MIME_LEN_TRANSFER_ENCODING) != nullptr) { // Delete all Content-Length headers Debug("http", "Transfer-Encoding header and Content-Length headers the request, removing all Content-Length headers"); - mime_hdr_field_delete(heap, hh->m_fields_impl, content_length_field); + mime_hdr_field_delete(heap, hh->m_fields_impl, content_length_field, true); return PARSE_RESULT_DONE; }
[trafficserver] branch 7.1.x updated (6ef406c -> bc7d467)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch 7.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 6ef406c Fixed clang compile issue with override add bc7d467 Fixed how we handle uknown schemes No new revisions were added by this update. Summary of changes: proxy/hdrs/HdrTest.cc | 101 +++--- proxy/hdrs/URL.cc | 49 +--- 2 files changed, 108 insertions(+), 42 deletions(-)
[trafficserver] branch 7.1.x updated: Fixed clang compile issue with override
This is an automated email from the ASF dual-hosted git repository. bcall 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 6ef406c Fixed clang compile issue with override 6ef406c is described below commit 6ef406c5f8749a1be9b04246c70b10c977ea3ad6 Author: Bryan Call AuthorDate: Thu Feb 6 16:45:37 2020 -0800 Fixed clang compile issue with override --- proxy/http/Http1ClientSession.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/http/Http1ClientSession.h b/proxy/http/Http1ClientSession.h index 8f9e20b..c1420c7 100644 --- a/proxy/http/Http1ClientSession.h +++ b/proxy/http/Http1ClientSession.h @@ -169,7 +169,7 @@ public: } bool - is_chunked_encoding_supported() const override + is_chunked_encoding_supported() const { return true; }
[trafficserver] branch 7.1.x updated: Fix chunked processing
This is an automated email from the ASF dual-hosted git repository. bcall 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 3b6dc41 Fix chunked processing 3b6dc41 is described below commit 3b6dc411c2321d55003c6b7151211e3cd51ceb49 Author: Susan Hinrichs AuthorDate: Wed Feb 5 19:17:50 2020 + Fix chunked processing --- iocore/net/UnixNetVConnection.cc | 2 +- proxy/ProxyClientSession.h | 6 ++ proxy/ProxyClientTransaction.h | 6 ++ proxy/http/Http1ClientSession.h | 6 ++ proxy/http/HttpTransact.cc | 3 +- proxy/http/HttpTunnel.cc | 160 --- proxy/http/HttpTunnel.h | 1 + 7 files changed, 122 insertions(+), 62 deletions(-) diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc index a30200b..7cc2363 100644 --- a/iocore/net/UnixNetVConnection.cc +++ b/iocore/net/UnixNetVConnection.cc @@ -985,7 +985,7 @@ UnixNetVConnection::load_buffer_and_write(int64_t towrite, MIOBufferAccessor try_to_write = 0; while (niov < NET_MAX_IOV) { - int64_t wavail = towrite - total_written; + int64_t wavail = towrite - total_written - try_to_write; int64_t len= tmp_reader->block_read_avail(); // Check if we have done this block. diff --git a/proxy/ProxyClientSession.h b/proxy/ProxyClientSession.h index 22190e6..32100e3 100644 --- a/proxy/ProxyClientSession.h +++ b/proxy/ProxyClientSession.h @@ -65,6 +65,12 @@ public: virtual NetVConnection *get_netvc() const = 0; + virtual bool + is_chunked_encoding_supported() const + { +return false; + } + virtual int get_transact_count() const = 0; virtual const char *get_protocol_string() const = 0; diff --git a/proxy/ProxyClientTransaction.h b/proxy/ProxyClientTransaction.h index 5398c9e..1656700 100644 --- a/proxy/ProxyClientTransaction.h +++ b/proxy/ProxyClientTransaction.h @@ -244,6 +244,12 @@ public: return parent ? parent->populate_protocol(result, size) : 0; } + virtual bool + is_chunked_encoding_supported() const + { +return parent ? parent->is_chunked_encoding_supported() : false; + } + virtual const char * protocol_contains(ts::StringView tag_prefix) const { diff --git a/proxy/http/Http1ClientSession.h b/proxy/http/Http1ClientSession.h index 37a626e..8f9e20b 100644 --- a/proxy/http/Http1ClientSession.h +++ b/proxy/http/Http1ClientSession.h @@ -168,6 +168,12 @@ public: return "http"; } + bool + is_chunked_encoding_supported() const override + { +return true; + } + private: Http1ClientSession(Http1ClientSession &); diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index 073587d..156441d 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -7103,8 +7103,7 @@ HttpTransact::handle_response_keep_alive_headers(State *s, HTTPVersion ver, HTTP // check that the client is HTTP 1.1 and the conf allows chunking or the client // protocol unchunks before returning to the user agent (i.e. is http/2) if (s->client_info.http_version == HTTPVersion(1, 1) && -(s->txn_conf->chunking_enabled == 1 || - (s->state_machine->plugin_tag && (!strncmp(s->state_machine->plugin_tag, "http/2", 6 && +(s->txn_conf->chunking_enabled == 1 && s->state_machine->ua_session->is_chunked_encoding_supported()) && // if we're not sending a body, don't set a chunked header regardless of server response !is_response_body_precluded(s->hdr_info.client_response.status_get(), s->method) && // we do not need chunked encoding for internal error messages diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc index aa5d1a0..561c55e 100644 --- a/proxy/http/HttpTunnel.cc +++ b/proxy/http/HttpTunnel.cc @@ -899,11 +899,10 @@ HttpTunnel::producer_run(HttpTunnelProducer *p) consumer_n = (producer_n = INT64_MAX); } - // Do the IO on the consumers first so - // data doesn't disappear out from - // under the tunnel ink_release_assert(p->num_consumers > 0); - for (c = p->consumer_list.head; c;) { + // At least set up the consumer readers first so the data + // doesn't disappear out from under the tunnel + for (c = p->consumer_list.head; c; c = c->link.next) { // Create a reader for each consumer. The reader allows // us to implement skip bytes if (c->vc_type == HT_CACHE_WRITE) { @@ -934,45 +933,6 @@ HttpTunnel::producer_run(HttpTunnelProducer *p) ink_assert(c->skip_bytes <= c->buffer_reader->read_avail()); c->buffer_reader->consume(c->skip_bytes); } -int64_t c_write = consumer_n; - -// INKqa05109 - if we don't know the length leave
[trafficserver] branch 8.0.x updated: Fix chunked processing
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.0.x by this push: new 60e0a8c Fix chunked processing 60e0a8c is described below commit 60e0a8ce23d390b851873e020483d6f75e857158 Author: Susan Hinrichs AuthorDate: Wed Feb 5 19:15:36 2020 + Fix chunked processing --- iocore/net/UnixNetVConnection.cc | 2 +- proxy/http/HttpTransact.cc | 5 +- proxy/http/HttpTunnel.cc | 160 --- proxy/http/HttpTunnel.h | 1 + 4 files changed, 105 insertions(+), 63 deletions(-) diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc index 3d76002..135b0b5 100644 --- a/iocore/net/UnixNetVConnection.cc +++ b/iocore/net/UnixNetVConnection.cc @@ -933,7 +933,7 @@ UnixNetVConnection::load_buffer_and_write(int64_t towrite, MIOBufferAccessor try_to_write = 0; while (niov < NET_MAX_IOV) { - int64_t wavail = towrite - total_written; + int64_t wavail = towrite - total_written - try_to_write; int64_t len= tmp_reader->block_read_avail(); // Check if we have done this block. diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index e78fdd9..c0ddf77 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -6806,9 +6806,8 @@ HttpTransact::handle_response_keep_alive_headers(State *s, HTTPVersion ver, HTTP // check that the client is HTTP 1.1 and the conf allows chunking or the client // protocol unchunks before returning to the user agent (i.e. is http/2) -if (s->client_info.http_version == HTTPVersion(1, 1) && -(s->txn_conf->chunking_enabled == 1 || - (s->state_machine->plugin_tag && (!strncmp(s->state_machine->plugin_tag, "http/2", 6 && +if (s->client_info.http_version == HTTPVersion(1, 1) && s->txn_conf->chunking_enabled == 1 && +s->state_machine->ua_txn->is_chunked_encoding_supported() && // if we're not sending a body, don't set a chunked header regardless of server response !is_response_body_precluded(s->hdr_info.client_response.status_get(), s->method) && // we do not need chunked encoding for internal error messages diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc index 84634c3..bcdb695 100644 --- a/proxy/http/HttpTunnel.cc +++ b/proxy/http/HttpTunnel.cc @@ -871,10 +871,9 @@ HttpTunnel::producer_run(HttpTunnelProducer *p) consumer_n = (producer_n = INT64_MAX); } - // Do the IO on the consumers first so - // data doesn't disappear out from - // under the tunnel - for (c = p->consumer_list.head; c;) { + // At least set up the consumer readers first so the data + // doesn't disappear out from under the tunnel + for (c = p->consumer_list.head; c; c = c->link.next) { // Create a reader for each consumer. The reader allows // us to implement skip bytes if (c->vc_type == HT_CACHE_WRITE) { @@ -905,45 +904,6 @@ HttpTunnel::producer_run(HttpTunnelProducer *p) ink_assert(c->skip_bytes <= c->buffer_reader->read_avail()); c->buffer_reader->consume(c->skip_bytes); } -int64_t c_write = consumer_n; - -// INKqa05109 - if we don't know the length leave it at -// INT64_MAX or else the cache may bounce the write -// because it thinks the document is too big. INT64_MAX -// is a special case for the max document size code -// in the cache -if (c_write != INT64_MAX) { - c_write -= c->skip_bytes; -} -// Fix for problems with not chunked content being chunked and -// not sending the entire data. The content length grows when -// it is being chunked. -if (p->do_chunking == true) { - c_write = INT64_MAX; -} - -if (c_write == 0) { - // Nothing to do, call back the cleanup handlers - c->write_vio = nullptr; - consumer_handler(VC_EVENT_WRITE_COMPLETE, c); -} else { - // In the client half close case, all the data that will be sent - // from the client is already in the buffer. Go ahead and set - // the amount to read since we know it. We will forward the FIN - // to the server on VC_EVENT_WRITE_COMPLETE. - if (p->vc_type == HT_HTTP_CLIENT) { -ProxyClientTransaction *ua_vc = static_cast(p->vc); -if (ua_vc->get_half_close_flag()) { - c_write = c->buffer_reader->read_avail(); - p->alive = false; - p->handler_state = HTTP_SM_POST_SUCCESS; -} - } - c->write_vio = c->vc->do_io_write(this, c_write, c->buffer_reader); - ink_assert(c_write > 0); -} - -c = c-&g
[trafficserver] branch master updated (544d29b -> e281fd6)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 544d29b Free TSMgmtString after using it. add e281fd6 Ensure that extra data beyond the chunked body is not tunneled No new revisions were added by this update. Summary of changes: iocore/net/UnixNetVConnection.cc | 2 +- proxy/http/HttpTransact.cc | 1 + proxy/http/HttpTunnel.cc | 160 + proxy/http/HttpTunnel.h| 1 + .../gold_tests/chunked_encoding/case4.sh | 6 +- .../chunked_encoding/chunked_encoding.test.py | 30 +++- .../chunked_encoding/{server3.sh => server4.sh}| 0 tests/gold_tests/chunked_encoding/smuggle-client.c | 124 8 files changed, 259 insertions(+), 65 deletions(-) copy example/plugins/Makefile.am => tests/gold_tests/chunked_encoding/case4.sh (90%) copy tests/gold_tests/chunked_encoding/{server3.sh => server4.sh} (100%) create mode 100644 tests/gold_tests/chunked_encoding/smuggle-client.c
[trafficserver] branch 8.0.x updated: Updated Changelog
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.0.x by this push: new 9a5038c Updated Changelog 9a5038c is described below commit 9a5038c600325ffd9cb4a9b51975f50deed3c3f8 Author: Bryan Call AuthorDate: Tue Feb 4 18:20:00 2020 -0800 Updated Changelog --- CHANGELOG-8.0.6 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG-8.0.6 b/CHANGELOG-8.0.6 index bee956c..0efc5f6 100644 --- a/CHANGELOG-8.0.6 +++ b/CHANGELOG-8.0.6 @@ -1,6 +1,7 @@ Changes with Apache Traffic Server 8.0.6 #4042 - Fixed url_sig error when storing base64ed params in penultimate segment. #4117 - Add transform TSIOBuffer watermark APIs. + #4215 - HostStatus debug logging segfault fix. #4590 - Print thread name instead of thread id #4840 - resolve stack-use-after-scope in YamlLogConfig.cc #5078 - Fix directives for checking TS_USE_TLS_OCSP @@ -18,6 +19,7 @@ Changes with Apache Traffic Server 8.0.6 #5489 - gcc9: set default value for printing debug message #5497 - gcc9: sprintf and strncat fixes in plugins #5516 - Make code compilable with BoringSSL + #5636 - HTTP/2: ignore unknown settings #5823 - Avoid AWS auth v4 path/query param double encoding #5833 - Fix H2 internal counters #5887 - Fixed const issue with magick plugin @@ -32,3 +34,7 @@ Changes with Apache Traffic Server 8.0.6 #6113 - Patch to fix autest issues #6145 - Remove including sys/sysctl.h for Linux #6158 - Fixed build issues with hwloc 2.x API changes + #6248 - Add support for the old lua formatted ease of use conventions and the numeric log rolling values + #6308 - Fix clang-format-github CI job for 8.0.x branch + #6312 - Set wrap after checking all the parents + #6390 - Change header validation
[trafficserver] branch 8.0.x updated: Fixed how we handle uknown schemes
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.0.x by this push: new 6affb92 Fixed how we handle uknown schemes 6affb92 is described below commit 6affb92d8c85896e8b60abb9f684af8109280a0a Author: Bryan Call AuthorDate: Thu Jan 30 10:42:00 2020 -0800 Fixed how we handle uknown schemes (cherry picked from commit c20a369fa93b22b492e6aed8bee1da5fa4af1cab) --- proxy/hdrs/HdrTest.cc | 101 +++--- proxy/hdrs/URL.cc | 49 +--- 2 files changed, 108 insertions(+), 42 deletions(-) diff --git a/proxy/hdrs/HdrTest.cc b/proxy/hdrs/HdrTest.cc index 49107ca..8046e69 100644 --- a/proxy/hdrs/HdrTest.cc +++ b/proxy/hdrs/HdrTest.cc @@ -343,44 +343,100 @@ HdrTest::test_url() // Start with an easy one... "http://trafficserver.apache.org/index.html;, -// "cheese://bogosity", This fails, but it's not clear it should work... - -"some.place", "some.place/", "http://some.place;, "http://some.place/;, "http://some.place/path;, -"http://some.place/path;params;, "http://some.place/path;params?query;, "http://some.place/path;params?query#fragment;, -"http://some.place/path?query#fragment;, "http://some.place/path#fragment;, +"cheese://bogosity", + +"some.place", +"some.place/", +"http://some.place;, +"http://some.place/;, +"http://some.place/path;, +"http://some.place/path;params;, +"http://some.place/path;params?query;, +"http://some.place/path;params?query#fragment;, +"http://some.place/path?query#fragment;, +"http://some.place/path#fragment;, -"some.place:80", "some.place:80/", "http://some.place:80;, "http://some.place:80/;, +"some.place:80", +"some.place:80/", +"http://some.place:80;, +"http://some.place:80/;, -"foo@some.place:80", "foo@some.place:80/", "http://foo@some.place:80;, "http://foo@some.place:80/;, +"foo@some.place:80", +"foo@some.place:80/", +"http://foo@some.place:80;, +"http://foo@some.place:80/;, -"foo:bar@some.place:80", "foo:bar@some.place:80/", "http://foo:bar@some.place:80;, "http://foo:bar@some.place:80/;, +"foo:bar@some.place:80", +"foo:bar@some.place:80/", +"http://foo:bar@some.place:80;, +"http://foo:bar@some.place:80/;, // Some address stuff -"http://172.16.28.101;, "http://172.16.28.101:8080;, "http://[::];, "http://[::1];, "http://[fc01:172:16:28::101];, -"http://[fc01:172:16:28::101]:80;, "http://[fc01:172:16:28:BAAD:BEEF:DEAD:101];, -"http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]:8080;, "http://172.16.28.101/some/path;, "http://172.16.28.101:8080/some/path;, -"http://[::1]/some/path;, "http://[fc01:172:16:28::101]/some/path;, "http://[fc01:172:16:28::101]:80/some/path;, -"http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]/some/path;, "http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]:8080/some/path;, -"http://172.16.28.101/;, "http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]:8080/;, - -"foo:bar@some.place", "foo:bar@some.place/", "http://foo:bar@some.place;, "http://foo:bar@some.place/;, -"http://foo:bar@[::1]:8080/;, "http://foo@[::1];, - -"mms://sm02.tsqa.example.com/0102rally.asf", "pnm://foo:bar@some.place:80/path;params?query#fragment", -"rtsp://foo:bar@some.place:80/path;params?query#fragment", "rtspu://foo:bar@some.place:80/path;params?query#fragment", +"http://172.16.28.101;, +"http://172.16.28.101:8080;, +"http://[::];, +"http://[::1];, +"http://[fc01:172:16:28::101];, +"http://[fc01:172:16:28::101]:80;, +"http://[fc01:172:16:28:BAAD:BEEF:DEAD:101];, +"http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]:8080;, +"http://172.16.28.101/some/path;, +"http://172.16.28.101:8080/some/path;, +"http://[::1]/some/path;, +"http://[fc01:172:16:28::101]/some/path;, +"http://[fc01:172:16:28::101]:80/some/path;, +"http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]/some/path;, +"http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]:8080/some/path;, +"http://172.16.28.101/;, +"http://[fc01:172:16:28:BAAD:BEEF:DEAD:101]:8080/;, + +// "foo:@some.place", TODO - foo:@some.place is change to foo@some.place in the test +"foo:bar@some.place&q
[trafficserver] branch master updated (5830bc7 -> c20a369)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 5830bc7 Change header validation add c20a369 Fixed how we handle uknown schemes No new revisions were added by this update. Summary of changes: proxy/hdrs/HdrTest.cc | 101 +++--- proxy/hdrs/URL.cc | 49 +--- 2 files changed, 108 insertions(+), 42 deletions(-)
[trafficserver] branch 8.0.x updated: Change header validation
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.0.x by this push: new ea847ad Change header validation ea847ad is described below commit ea847adb40bd3f86eba5b604ad4b9025896f5d22 Author: ZeddYu Lu AuthorDate: Tue Feb 4 11:20:13 2020 -0800 Change header validation (cherry picked from commit 5830bc72611e85e7a31098ce86710242f29076dc) Conflicts: proxy/hdrs/HTTP.cc --- proxy/hdrs/HTTP.cc | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/proxy/hdrs/HTTP.cc b/proxy/hdrs/HTTP.cc index c30efbe..595ed62 100644 --- a/proxy/hdrs/HTTP.cc +++ b/proxy/hdrs/HTTP.cc @@ -1125,19 +1125,17 @@ http_parser_parse_req(HTTPParser *parser, HdrHeap *heap, HTTPHdrImpl *hh, const end= real_end; parser->m_parsing_http = false; - -ParseResult ret = mime_parser_parse(>m_mime_parser, heap, hh->m_fields_impl, start, end, must_copy_strings, eof); -// If we're done with the main parse do some validation -if (ret == PARSE_RESULT_DONE) { - ret = validate_hdr_host(hh); // check HOST header -} -if (ret == PARSE_RESULT_DONE) { - ret = validate_hdr_content_length(heap, hh); -} -return ret; } - return mime_parser_parse(>m_mime_parser, heap, hh->m_fields_impl, start, end, must_copy_strings, eof); + ParseResult ret = mime_parser_parse(>m_mime_parser, heap, hh->m_fields_impl, start, end, must_copy_strings, eof); + // If we're done with the main parse do some validation + if (ret == PARSE_RESULT_DONE) { +ret = validate_hdr_host(hh); // check HOST header + } + if (ret == PARSE_RESULT_DONE) { +ret = validate_hdr_content_length(heap, hh); + } + return ret; } ParseResult @@ -1189,7 +1187,7 @@ validate_hdr_content_length(HdrHeap *heap, HTTPHdrImpl *hh) if (mime_hdr_field_find(hh->m_fields_impl, MIME_FIELD_TRANSFER_ENCODING, MIME_LEN_TRANSFER_ENCODING) != nullptr) { // Delete all Content-Length headers Debug("http", "Transfer-Encoding header and Content-Length headers the request, removing all Content-Length headers"); - mime_hdr_field_delete(heap, hh->m_fields_impl, content_length_field); + mime_hdr_field_delete(heap, hh->m_fields_impl, content_length_field, true); return PARSE_RESULT_DONE; }
[trafficserver] branch master updated (5b3c526 -> 5830bc7)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 5b3c526 Change default connection match config value from ip to both add 5830bc7 Change header validation No new revisions were added by this update. Summary of changes: proxy/hdrs/HTTP.cc | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-)
[trafficserver] 02/02: Run dos2unix on all files in tree
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 3f3b54fe9be3dfedf4185b181602487aef27fd4e Author: Randall Meyer AuthorDate: Wed Nov 20 16:32:18 2019 +0800 Run dos2unix on all files in tree Intentionally ignorng files under lib/yamlcpp (since we just maintain a copy of their distro) (cherry picked from commit 994a2f04be6c28ffe7207c08480ad944690a0411) Additional files on 8.0.x to backport include/tscore/MT_hashtable.h tests/gold_tests/pluginTest/xdebug/x_remap/out.gold Conflicts: tests/gold_tests/pluginTest/regex_remap/gold/regex_remap_crash.gold tests/gold_tests/pluginTest/regex_remap/gold/regex_remap_smoke.gold tests/gold_tests/pluginTest/regex_revalidate/gold/regex_reval-hit.gold tests/gold_tests/pluginTest/regex_revalidate/gold/regex_reval-miss.gold tests/gold_tests/pluginTest/regex_revalidate/gold/regex_reval-stale.gold tests/gold_tests/pluginTest/slice/gold/slice_200.stdout.gold tests/gold_tests/pluginTest/slice/gold/slice_206.stdout.gold tests/gold_tests/pluginTest/slice/gold/slice_first.stdout.gold tests/gold_tests/pluginTest/slice/gold/slice_last.stderr.gold tests/gold_tests/pluginTest/slice/gold/slice_last.stdout.gold tests/gold_tests/pluginTest/slice/gold/slice_mid.stderr.gold tests/gold_tests/pluginTest/slice/gold/slice_mid.stdout.gold tests/gold_tests/pluginTest/slice/gold_error/crr.stdout.gold tests/gold_tests/pluginTest/slice/gold_error/etag.stdout.gold tests/gold_tests/pluginTest/slice/gold_error/lm.stdout.gold tests/gold_tests/pluginTest/slice/gold_error/non206.stdout.gold --- include/tscore/MT_hashtable.h | 882 ++--- .../data/www.customplugin204.test_get.txt | 4 +- .../data/www.customtemplate204.test_get.txt| 4 +- .../body_factory/data/www.default204.test_get.txt | 4 +- .../body_factory/data/www.default304.test_get.txt | 4 +- .../body_factory/data/www.example.test_get_200.txt | 6 +- .../body_factory/data/www.example.test_get_304.txt | 8 +- .../body_factory/data/www.example.test_head.txt| 6 +- .../data/www.example.test_head_200.txt | 6 +- .../headers/data/www.passthrough.test_get.txt | 4 +- .../headers/data/www.redirect0.test_get.txt| 4 +- .../headers/data/www.redirect301.test_get.txt | 4 +- .../headers/data/www.redirect302.test_get.txt | 4 +- .../headers/data/www.redirect307.test_get.txt | 4 +- .../headers/data/www.redirect308.test_get.txt | 4 +- .../headers/general-connection-failure-502.gold| 14 +- tests/gold_tests/pluginTest/url_sig/url_sig.gold | 30 +- .../gold_tests/pluginTest/xdebug/x_remap/out.gold | 58 +- tests/gold_tests/redirect/gold/redirect.gold | 6 +- 19 files changed, 528 insertions(+), 528 deletions(-) diff --git a/include/tscore/MT_hashtable.h b/include/tscore/MT_hashtable.h index bfbae79..2c24225 100644 --- a/include/tscore/MT_hashtable.h +++ b/include/tscore/MT_hashtable.h @@ -1,441 +1,441 @@ -/** @file - - A brief file description - - @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. - */ - -/ - - MT_hashtable.h - - Multithread Safe Hash table implementation - - - / -#pragma once - -#define MT_HASHTABLE_PARTITION_BITS 6 -#define MT_HASHTABLE_PARTITIONS (1 << MT_HASHTABLE_PARTITION_BITS) -#define MT_HASHTABLE_PARTITION_MASK (MT_HASHTABLE_PARTITIONS - 1) -#define MT_HASHTABLE_MAX_CHAIN_AVG_LEN 4 -template struct HashTableEntry { - key_t key; - data_t data; - HashTableEntry *next; - - static HashTableEntry * - alloc() - { -return (HashTableEntry *)ats_malloc(sizeof(HashTableEntry)); - } - - static void - free(HashTableEntry *entry) - { -ats_free(entry); - } -}; - -/* -struct MT_ListEntry{ - MT_ListEntry():next(NULL),pr
[trafficserver] 01/02: Cleanup trailing whitespaces
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 766f8dfc0dbfdb925badd1c9141ff7e62f7ac74b Author: Masaori Koshiba AuthorDate: Tue Jan 7 09:08:24 2020 +0900 Cleanup trailing whitespaces --- CHANGELOG-8.0.0| 10 +++ CHANGELOG-8.0.2| 2 +- doc/admin-guide/plugins/cachekey.en.rst| 2 +- doc/admin-guide/plugins/lua.en.rst | 3 +- doc/appendices/command-line/traffic_layout.en.rst | 6 ++-- .../internal-libraries/ArgParser.en.rst| 4 +-- doc/ext/traffic-server.py | 2 +- rc/trafficserver.in| 4 +-- tests/README.md| 4 +-- tests/gold_tests/autest-site/microserver.test.ext | 2 +- .../gold_tests/autest-site/traffic_replay.test.ext | 4 +-- tests/tools/README.md | 18 ++-- tools/traffic_via.pl | 32 +++--- 13 files changed, 46 insertions(+), 47 deletions(-) diff --git a/CHANGELOG-8.0.0 b/CHANGELOG-8.0.0 index 5631aa0..f3d6656 100644 --- a/CHANGELOG-8.0.0 +++ b/CHANGELOG-8.0.0 @@ -369,7 +369,7 @@ Changes with Apache Traffic Server 8.0.0 #2190 - The content-type of TRACE response should be message/http. #2194 - Better initialization in Thread.cc. #2195 - Fix race condition in thread startup. - #2196 - Adding DNS over TCP support + #2196 - Adding DNS over TCP support #2201 - Add experimental plugin to initiate H2 Server push for preload links. #2202 - H2 test with traffic -replay #2209 - Rework SSL Handshake Hooks and add tls_hooks tests. @@ -451,7 +451,7 @@ Changes with Apache Traffic Server 8.0.0 #2432 - Format python code with autopep8 #2434 - Coverity 1379933: Control flow issues (DEADCODE) #2435 - Resign server.pem for autests to 10 years - #2437 - null transform test + #2437 - null transform test #2439 - Coverity CID 1380022: FORWARD_NULL #2440 - Optimize: Add startIO & stopIO for NetHandler #2441 - Bug fix for event thread names @@ -537,7 +537,7 @@ Changes with Apache Traffic Server 8.0.0 #2638 - Turn off exception warning for gcc 7 #2639 - Fixed issue with clean/distclean #2643 - fix the missing lock in TSVConnFdCreate api - #2644 - remove dup setting with NO_FD + #2644 - remove dup setting with NO_FD #2647 - Added arguments for port number and ip in microdns, microserver extension. #2648 - This removes the FILE_WRITE mechanism from the core #2649 - Move http 408 response logic into transaction @@ -558,7 +558,7 @@ Changes with Apache Traffic Server 8.0.0 #2690 - Fixed chunked_encoding gold file #2691 - Kill unused .c file which contains code in a language invented by a Danish guy. #2694 - Implement zero-copy within UDPNetProcessorInternal::udp_read_from_net - #2696 - Script load speedup for ts_lua remap plugin + #2696 - Script load speedup for ts_lua remap plugin #2697 - List packages for building in Ubuntu #2698 - CID 1226158: Uninitialized members #2714 - Restructured traffic_layout and modified runroot command line @@ -906,7 +906,7 @@ Changes with Apache Traffic Server 8.0.0 #3526 - Ran clang-tidy with readability-braces-around-statements #3527 - Cleans up some pylint issues in the python code #3529 - Correct parameter for certificate verification - #3530 - Add time option to traffic_ctl host down. + #3530 - Add time option to traffic_ctl host down. #3531 - Doc: Unify ":unit:" to ":units". #3532 - Updated to new version of clang-format #3533 - Doc: various fixes diff --git a/CHANGELOG-8.0.2 b/CHANGELOG-8.0.2 index 9fff3e2..1e15928 100644 --- a/CHANGELOG-8.0.2 +++ b/CHANGELOG-8.0.2 @@ -2,7 +2,7 @@ Changes with Apache Traffic Server 8.0.2 #3601 - Add TLSv1.3 cipher suites for OpenSSL-1.1.1 #3927 - cppapi :InterceptPlugin fix #3939 - Make sure the index stays positive - #4217 - Fix a regression in the traffic_ctl host status subcommand. + #4217 - Fix a regression in the traffic_ctl host status subcommand. #4369 - Doc: Fix doc build to work with Sphinx 1.8. #4541 - Doc minor fixes. #4700 - sslheaders experimental plugin: fix doc typo, improve container use. diff --git a/doc/admin-guide/plugins/cachekey.en.rst b/doc/admin-guide/plugins/cachekey.en.rst index 0b631d5..5d8b6a0 100644 --- a/doc/admin-guide/plugins/cachekey.en.rst +++ b/doc/admin-guide/plugins/cachekey.en.rst @@ -582,7 +582,7 @@ Cacheurl plugin to cachekey plugin migration The plugin `cachekey` was not meant to replace the cacheurl plugin in terms of having exactly the same cache key strings generated. It just allows the operator to exctract elements from the HTTP URI in the same way the `cacheurl` does (thro
[trafficserver] branch 8.0.x updated (0cdd936 -> 3f3b54f)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 0cdd936 Set wrap after checking all the parents new 766f8df Cleanup trailing whitespaces new 3f3b54f Run dos2unix on all files in tree The 2 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: CHANGELOG-8.0.0| 10 +- CHANGELOG-8.0.2| 2 +- doc/admin-guide/plugins/cachekey.en.rst| 2 +- doc/admin-guide/plugins/lua.en.rst | 3 +- doc/appendices/command-line/traffic_layout.en.rst | 6 +- .../internal-libraries/ArgParser.en.rst| 4 +- doc/ext/traffic-server.py | 2 +- include/tscore/MT_hashtable.h | 882 ++--- rc/trafficserver.in| 4 +- tests/README.md| 4 +- tests/gold_tests/autest-site/microserver.test.ext | 2 +- .../gold_tests/autest-site/traffic_replay.test.ext | 4 +- .../data/www.customplugin204.test_get.txt | 4 +- .../data/www.customtemplate204.test_get.txt| 4 +- .../body_factory/data/www.default204.test_get.txt | 4 +- .../body_factory/data/www.default304.test_get.txt | 4 +- .../body_factory/data/www.example.test_get_200.txt | 6 +- .../body_factory/data/www.example.test_get_304.txt | 8 +- .../body_factory/data/www.example.test_head.txt| 6 +- .../data/www.example.test_head_200.txt | 6 +- .../headers/data/www.passthrough.test_get.txt | 4 +- .../headers/data/www.redirect0.test_get.txt| 4 +- .../headers/data/www.redirect301.test_get.txt | 4 +- .../headers/data/www.redirect302.test_get.txt | 4 +- .../headers/data/www.redirect307.test_get.txt | 4 +- .../headers/data/www.redirect308.test_get.txt | 4 +- .../headers/general-connection-failure-502.gold| 14 +- tests/gold_tests/pluginTest/url_sig/url_sig.gold | 30 +- .../gold_tests/pluginTest/xdebug/x_remap/out.gold | 58 +- tests/gold_tests/redirect/gold/redirect.gold | 6 +- tests/tools/README.md | 18 +- tools/traffic_via.pl | 32 +- 32 files changed, 574 insertions(+), 575 deletions(-)
[trafficserver] branch master updated (0191424 -> 5b3c526)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 0191424 Remove dependencies on include/tscore add 5b3c526 Change default connection match config value from ip to both No new revisions were added by this update. Summary of changes: mgmt/RecordsConfig.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[trafficserver] branch master updated (72c18f6 -> 4166151)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 72c18f6 Add compressible content-types example and 1Kb min add 4166151 Format config_describe output logs. Pretty format using BufferWritter No new revisions were added by this update. Summary of changes: src/traffic_ctl/config.cc | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-)
[trafficserver] branch master updated: Fix problems with "Probe" option for X-Debug MIME header field. (#6197)
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 473e054 Fix problems with "Probe" option for X-Debug MIME header field. (#6197) 473e054 is described below commit 473e0549cbb7bda763340b842d447d9db0d49879 Author: Walt Karas AuthorDate: Fri Jan 17 14:16:57 2020 -0600 Fix problems with "Probe" option for X-Debug MIME header field. (#6197) Fix problems with "Probe" option for X-Debug MIME header field. - Adds exercise of "Probe" to the existing x_remap Au test. - Remove memory leaks and risk of double deletion in xdebug plugin. --- plugins/xdebug/Cleanup.h | 186 plugins/xdebug/Makefile.inc| 4 +- plugins/xdebug/xdebug.cc | 69 +++-- plugins/xdebug/xdebug_transforms.cc| 44 +-- tests/gold_tests/pluginTest/xdebug/x_remap/four.in | 3 +- tests/gold_tests/pluginTest/xdebug/x_remap/fwd1.in | 3 +- tests/gold_tests/pluginTest/xdebug/x_remap/fwd2.in | 3 +- tests/gold_tests/pluginTest/xdebug/x_remap/fwd3.in | 3 +- tests/gold_tests/pluginTest/xdebug/x_remap/fwd4.in | 3 +- tests/gold_tests/pluginTest/xdebug/x_remap/fwd5.in | 3 +- tests/gold_tests/pluginTest/xdebug/x_remap/none.in | 3 +- tests/gold_tests/pluginTest/xdebug/x_remap/one.in | 3 +- .../gold_tests/pluginTest/xdebug/x_remap/out.gold | 315 - .../gold_tests/pluginTest/xdebug/x_remap/three.in | 3 +- tests/gold_tests/pluginTest/xdebug/x_remap/two.in | 3 +- .../pluginTest/xdebug/x_remap/x_remap.gold | 6 +- .../pluginTest/xdebug/x_remap/x_remap.test.py | 4 +- 17 files changed, 577 insertions(+), 81 deletions(-) diff --git a/plugins/xdebug/Cleanup.h b/plugins/xdebug/Cleanup.h new file mode 100644 index 000..453903c --- /dev/null +++ b/plugins/xdebug/Cleanup.h @@ -0,0 +1,186 @@ +/** + 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. + */ + +/** + * @file Cleanup.h + * @brief Easy-to-use utilities to avoid resource leaks or double-releases of resources. Independent of the rest + *of the CPPAPI. + */ + +#pragma once + +#include +#include + +#include + +namespace atscppapi +{ +// For TS API types TSXxx with a TSXxxDestroy function, define standard deleter TSXxxDeleter, and use it to +// define TSXxxUniqPtr (specialization of std::unique_ptr). X() is used when the destroy function returns void, +// Y() is used when the destroy function returns TSReturnCode. + +#if defined(X) +#error "X defined as preprocessor symbol" +#endif + +#define X(NAME_SEGMENT) \ + struct TS##NAME_SEGMENT##Deleter { \ +void \ +operator()(TS##NAME_SEGMENT ptr) \ +{ \ + TS##NAME_SEGMENT##Destroy(ptr); \ +} \ + }; \ + using TS##NAME_SEGMENT##UniqPtr = std::unique_ptr, TS##NAME_SEGMENT##Deleter>; + +#if defined(Y) +#error "Y defined as preprocessor symbol" +#endif + +#define Y(NAME_SEGMENT) \ + struct TS##NAME_SEGMENT##Deleter { \ +void \ +operator()(TS##NAME_SEGMENT ptr) \ +{ \ + TSAssert(TS##NAME_SEGMENT##Destroy(ptr) == TS_SUCCESS); \ +} \ + }; \ + using TS##NAME_SEGMENT##UniqPtr = std::unique_ptr, TS##NAME_SEGMENT##Deleter>; + +Y(MBuffer) // Defines TSMBufferDeleter and TSMBufferUniqPtr. +X(MimeParser)// Defines TSMimeParserDeleter and TSMimeParserUniqPtr. +X(Thread)// Defines TSThreadDeleter and TSThreadUniqPtr. +X(Mutex) // Defines TSMutexDeleter and TSMutexUniqPtr. +Y(CacheKey) // Defines TSCacheKeyDeleter and TSCacheK
[trafficserver] branch master updated (37061d8 -> 3418938)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 37061d8 Fixes typo in TLS Bridge illustration add 3418938 Fixed build issues on macOS after 0-RTT merge No new revisions were added by this update. Summary of changes: iocore/net/SSLUtils.cc| 4 ++-- proxy/http/Http1ClientSession.cc | 2 +- proxy/http2/Http2ClientSession.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
[trafficserver] branch master updated (47e9d30 -> 37061d8)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 47e9d30 Fix strict round robin cur_index increment add 37061d8 Fixes typo in TLS Bridge illustration No new revisions were added by this update. Summary of changes: doc/uml/TLS-Bridge-Messages.uml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[trafficserver] branch master updated (cf3d098 -> c3590f1)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from cf3d098 Merge pull request #6268 from shinrich/add_h2_chunked_encoding_test add c3590f1 Add new log field to output server name sent by client in TLS handshake. No new revisions were added by this update. Summary of changes: doc/admin-guide/logging/formatting.en.rst | 5 iocore/net/P_SSLNetVConnection.h | 3 ++ proxy/Makefile.am | 3 ++ proxy/ProxySession.cc | 13 + proxy/ProxySession.h | 18 proxy/http/Http1ClientSession.cc | 2 ++ proxy/http2/Http2ClientSession.cc | 2 ++ proxy/logging/Log.cc | 5 proxy/logging/LogAccess.cc | 32 ++ proxy/logging/LogAccess.h | 1 + .../cache_promote => proxy/private}/Makefile.inc | 8 -- .../private/SSLProxySession.cc | 31 ++--- .../SSLProxySession.h} | 31 - .../{ccid_ctid.test.py => new_log_flds.test.py}| 27 +- ...d_ctid_observer.py => new_log_flds_observer.py} | 17 +--- 15 files changed, 154 insertions(+), 44 deletions(-) copy {plugins/cache_promote => proxy/private}/Makefile.inc (82%) copy iocore/net/SSLNetAccept.cc => proxy/private/SSLProxySession.cc (69%) copy proxy/{logging/YamlLogConfigDecoders.h => private/SSLProxySession.h} (67%) rename tests/gold_tests/logging/{ccid_ctid.test.py => new_log_flds.test.py} (77%) rename tests/gold_tests/logging/{ccid_ctid_observer.py => new_log_flds_observer.py} (76%)
[trafficserver] branch master updated (ea3aa04 -> 8236813)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from ea3aa04 Add simple autest and subsequent fixes add 8236813 TLSv1.3 0-RTT support (#5450) No new revisions were added by this update. Summary of changes: build/crypto.m4 | 28 +++ configure.ac | 3 + doc/admin-guide/files/records.config.en.rst | 18 ++ include/tscore/ink_config.h.in | 1 + iocore/net/P_SSLConfig.h | 6 + iocore/net/P_SSLNetVConnection.h | 6 + iocore/net/SSLConfig.cc | 13 +- iocore/net/SSLNetVConnection.cc | 44 + iocore/net/SSLSessionTicket.cc | 15 +- iocore/net/SSLStats.cc | 12 +- iocore/net/SSLStats.h| 1 + iocore/net/SSLUtils.cc | 146 ++- mgmt/RecordsConfig.cc| 5 +- proxy/ProxyTransaction.cc| 4 +- proxy/ProxyTransaction.h | 2 +- proxy/hdrs/HTTP.h| 26 +++ proxy/hdrs/HdrToken.cc | 10 +- proxy/hdrs/MIME.cc | 22 +-- proxy/hdrs/MIME.h| 6 +- proxy/http/Http1ClientSession.cc | 8 +- proxy/http/Http1ClientSession.h | 2 + proxy/http/HttpSM.cc | 24 ++- proxy/http/HttpSM.h | 3 +- proxy/http/HttpTransact.cc | 14 ++ proxy/http/HttpTransact.h| 1 + proxy/http2/Http2ClientSession.cc| 25 ++- proxy/http2/Http2ClientSession.h | 17 +- proxy/http2/Http2ConnectionState.cc | 25 ++- src/traffic_quic/traffic_quic.cc | 2 +- tests/gold_tests/tls/early_h1_get.txt| 3 + tests/gold_tests/tls/early_h1_post.txt | 6 + tests/gold_tests/tls/early_h2_get.txt| Bin 0 -> 77 bytes tests/gold_tests/tls/early_h2_multi1.txt | Bin 0 -> 172 bytes tests/gold_tests/tls/early_h2_multi2.txt | Bin 0 -> 170 bytes tests/gold_tests/tls/early_h2_post.txt | Bin 0 -> 77 bytes tests/gold_tests/tls/h2_early_decode.py | 257 +++ tests/gold_tests/tls/h2_early_gen.py | 185 +++ tests/gold_tests/tls/test-0rtt-s_client.py | 69 +++ tests/gold_tests/tls/tls_0rtt_server.test.py | 193 39 files changed, 1160 insertions(+), 42 deletions(-) create mode 100644 tests/gold_tests/tls/early_h1_get.txt create mode 100644 tests/gold_tests/tls/early_h1_post.txt create mode 100644 tests/gold_tests/tls/early_h2_get.txt create mode 100644 tests/gold_tests/tls/early_h2_multi1.txt create mode 100644 tests/gold_tests/tls/early_h2_multi2.txt create mode 100644 tests/gold_tests/tls/early_h2_post.txt create mode 100755 tests/gold_tests/tls/h2_early_decode.py create mode 100755 tests/gold_tests/tls/h2_early_gen.py create mode 100644 tests/gold_tests/tls/test-0rtt-s_client.py create mode 100644 tests/gold_tests/tls/tls_0rtt_server.test.py
[trafficserver] branch master updated (f6dadd5 -> 8fcb137)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from f6dadd5 Removing traffic_cop reference in Admin Guide introduction. add 8fcb137 Adding verify plugin TS maintenance commands No new revisions were added by this update. Summary of changes: .gitignore | 2 + doc/appendices/command-line/traffic_server.en.rst | 44 - doc/release-notes/whats-new.en.rst | 7 +- include/tscore/ts_file.h | 9 + proxy/Plugin.cc| 46 +++-- proxy/Plugin.h | 2 + proxy/http/remap/RemapPluginInfo.h | 10 +- src/traffic_server/traffic_server.cc | 169 +- src/tscore/ts_file.cc | 12 +- src/tscore/unit_tests/test_ts_file.cc | 18 +- .../command_argument/verify_global_plugin.test.py | 198 + .../command_argument/verify_remap_plugin.test.py | 146 +++ .../tools/plugins/conf_remap_stripped.cc | 47 ++--- .../tools/plugins/missing_mangled_definition.c | 15 +- .../tools/plugins/missing_mangled_definition.cc| 17 +- .../tools/plugins/missing_mangled_definition.h | 5 +- .../tools/plugins/missing_ts_plugin_init.cc| 12 +- 17 files changed, 683 insertions(+), 76 deletions(-) create mode 100644 tests/gold_tests/command_argument/verify_global_plugin.test.py create mode 100644 tests/gold_tests/command_argument/verify_remap_plugin.test.py copy proxy/http/remap/unit-tests/plugin_init_fail.cc => tests/tools/plugins/conf_remap_stripped.cc (58%) copy plugins/experimental/uri_signing/timing.c => tests/tools/plugins/missing_mangled_definition.c (86%) copy plugins/experimental/uri_signing/timing.c => tests/tools/plugins/missing_mangled_definition.cc (66%) copy plugins/experimental/uri_signing/timing.c => tests/tools/plugins/missing_mangled_definition.h (87%) copy plugins/experimental/uri_signing/timing.c => tests/tools/plugins/missing_ts_plugin_init.cc (84%)
[trafficserver] branch master updated: Removing traffic_cop reference in Admin Guide introduction.
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 f6dadd5 Removing traffic_cop reference in Admin Guide introduction. f6dadd5 is described below commit f6dadd5de44a994c0b0920ef171eaaa92d94e3b8 Author: bneradt AuthorDate: Fri Oct 4 15:15:50 2019 + Removing traffic_cop reference in Admin Guide introduction. The introduction to our Administrator's Guide referenced three processes but only described two: traffic_manager and traffic_server. The third process was probably traffic_cop. But we currently now only run with traffic_server and traffic_manager. This adjusts the number of referenced processes from three to two and removes the image which is not as helpful anymore with only two processes that collaborate. --- doc/admin-guide/introduction.en.rst | 14 +++--- doc/static/images/admin/process.jpg | Bin 136229 -> 0 bytes 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/doc/admin-guide/introduction.en.rst b/doc/admin-guide/introduction.en.rst index 06effa3..e006ed7 100644 --- a/doc/admin-guide/introduction.en.rst +++ b/doc/admin-guide/introduction.en.rst @@ -165,15 +165,15 @@ bindings in memory, DNS traffic is reduced. |TS| Processes -- -|TS| contains three processes that work together to serve +|TS| contains two processes that work together to serve requests and manage, control, and monitor the health of the system. -- The :program:`traffic_server` process is the transaction processing engine +#. The :program:`traffic_server` process is the transaction processing engine of |TS|. It is responsible for accepting connections, processing protocol requests, and serving documents from the cache or origin server. -- The :program:`traffic_manager` process is the command and control facility +#. The :program:`traffic_manager` process is the command and control facility of the |TS|, responsible for launching, monitoring, and reconfiguring the :program:`traffic_server` process. The :program:`traffic_manager` process is also responsible for the proxy autoconfiguration port, the @@ -187,14 +187,6 @@ requests and manage, control, and monitor the health of the system. first-served order. This connection queueing shields users from any server restart downtime. -The figure below illustrates the |TS| processes. - -.. figure:: ../static/images/admin/process.jpg - :align: center - :alt: Illustration of the |TS| Processes - - Illustration of the |TS| Processes - Administration Tools diff --git a/doc/static/images/admin/process.jpg b/doc/static/images/admin/process.jpg deleted file mode 100644 index f683ac7..000 Binary files a/doc/static/images/admin/process.jpg and /dev/null differ
[trafficserver] branch master updated (0cf7e59 -> a33b43e)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 0cf7e59 Fixed build issue with clang5 and Extendible add 84f0219 Fixing rolled log cleanup parsing for .log. files. add 745d38f Review comments. add a33b43e Following catch test naming standards. No new revisions were added by this update. Summary of changes: proxy/logging/LogConfig.cc | 10 +- proxy/logging/LogUtils.cc | 28 proxy/logging/LogUtils.h | 17 + proxy/logging/unit-tests/test_LogUtils2.cc | 23 +++ 4 files changed, 69 insertions(+), 9 deletions(-)
[trafficserver] branch 9.0.x updated (5f7b642 -> 79d510e)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 5f7b642 Cleanup trailing whitespaces, and YAML formatting (#6212) new 7203143 Fixed build issue with clang5 and Extendible new 79d510e Updated Changelog The 2 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: CHANGELOG-9.0.0 | 4 include/tscore/Extendible.h | 5 - 2 files changed, 8 insertions(+), 1 deletion(-)
[trafficserver] 01/02: Fixed build issue with clang5 and Extendible
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 7203143db805add26c2cdb86bd6a74d740c107a0 Author: Bryan Call AuthorDate: Fri Nov 22 11:10:15 2019 +0800 Fixed build issue with clang5 and Extendible (cherry picked from commit 0cf7e5953aec06d4dafb183861afe918763cbf33) --- include/tscore/Extendible.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/tscore/Extendible.h b/include/tscore/Extendible.h index 6e2d306..16630ed 100644 --- a/include/tscore/Extendible.h +++ b/include/tscore/Extendible.h @@ -720,7 +720,10 @@ serialize(std::ostream , T const ) for (const auto : schema.fields) { name_width = max(name_width, kv.first.length()); } -for (const auto &[fname, field] : schema.fields) { +// TODO: clang-5 didn't like the use of a range based for here, change later +for (auto it = schema.fields.begin(); it != schema.fields.end(); ++it) { + auto = it->first; + auto = it->second; ink_assert(field.serializer); os << setw(indent) << "" << setw(name_width) << right << fname << ": "; field.serializer(os, details::FieldPtrGet(t, field));
[trafficserver] 02/02: Updated Changelog
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 79d510e87bdda8901a1d998473d47f859429076c Author: Bryan Call AuthorDate: Tue Dec 3 08:49:59 2019 -0800 Updated Changelog --- CHANGELOG-9.0.0 | 4 1 file changed, 4 insertions(+) diff --git a/CHANGELOG-9.0.0 b/CHANGELOG-9.0.0 index 26c87b5..bcfeeb0 100644 --- a/CHANGELOG-9.0.0 +++ b/CHANGELOG-9.0.0 @@ -761,12 +761,14 @@ Changes with Apache Traffic Server 9.0.0 #6000 - Add QUIC draft-23 support #6003 - Cleanup: do not re-define _proxy_ssn variable in local #6006 - Rewrote remap_stats plugin to use C++ + #6007 - Graduate TSHttpTxnServerPush to the stable API interface #6008 - Do not schedule stuff during shutdown #6011 - clang-analyzer: Add a null check #6013 - Add basic SystemTap markers support #6016 - Fix host type in host matcher. #6024 - Make proxy.config.http.request_buffer_enabled configurable and bug fix #6031 - listen on all the net threads + #6049 - set host name in TLS extension for SNI Host check in service side with sni policy verify_with_name_source. #6054 - Ignore MgmtMessageHdr if ProcessManager is not running #6062 - Adding connection close headers to regex_remap test. #6066 - Fixing session sharing with IP matching. @@ -817,3 +819,5 @@ Changes with Apache Traffic Server 9.0.0 #6189 - Fixed issue with macOS Catalina and pcre 8.43 enabling pcre-jit #6190 - Fix ssl_session_reuse to compile on macOS and FreeBSD #6191 - Limit this check to Linux, where ldd always works + #6212 - Cleanup trailing whitespaces, and YAML formatting + #6224 - Fixed build issue with clang5 and Extendible
[trafficserver] branch master updated (8dbe6e0 -> 0cf7e59)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 8dbe6e0 Remove never implemented regex descriptions add 0cf7e59 Fixed build issue with clang5 and Extendible No new revisions were added by this update. Summary of changes: include/tscore/Extendible.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)
[trafficserver] branch master updated: Fixed next hop tests for out of tree builds
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 View the commit online: https://github.com/apache/trafficserver/commit/e541bc744a3ccd06648776f699f5f70976d8dcdf The following commit(s) were added to refs/heads/master by this push: new e541bc7 Fixed next hop tests for out of tree builds e541bc7 is described below commit e541bc744a3ccd06648776f699f5f70976d8dcdf Author: Bryan Call AuthorDate: Thu Nov 21 11:37:46 2019 +0800 Fixed next hop tests for out of tree builds --- proxy/http/remap/Makefile.am | 3 +++ proxy/http/remap/unit-tests/test_NextHopConsistentHash.cc | 6 +++--- proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc | 8 proxy/http/remap/unit-tests/test_NextHopStrategyFactory.cc | 11 +++ 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/proxy/http/remap/Makefile.am b/proxy/http/remap/Makefile.am index 89be4da..c569801 100644 --- a/proxy/http/remap/Makefile.am +++ b/proxy/http/remap/Makefile.am @@ -125,6 +125,7 @@ test_RemapPluginInfo_SOURCES = \ test_NextHopStrategyFactory_CPPFLAGS = \ $(AM_CPPFLAGS) \ -D_NH_UNIT_TESTS_ \ + -DTS_SRC_DIR=\"$(abs_top_srcdir)/proxy/http/remap/\" \ -I$(abs_top_srcdir)/tests/include \ $(TS_INCLUDES) \ @YAMLCPP_INCLUDES@ @@ -154,6 +155,7 @@ test_NextHopStrategyFactory_SOURCES = \ test_NextHopRoundRobin_CPPFLAGS = \ $(AM_CPPFLAGS) \ -D_NH_UNIT_TESTS_ \ + -DTS_SRC_DIR=\"$(abs_top_srcdir)/proxy/http/remap/\" \ -I$(abs_top_srcdir)/tests/include \ $(TS_INCLUDES) \ @YAMLCPP_INCLUDES@ @@ -183,6 +185,7 @@ test_NextHopRoundRobin_SOURCES = \ test_NextHopConsistentHash_CPPFLAGS = \ $(AM_CPPFLAGS) \ -D_NH_UNIT_TESTS_ \ + -DTS_SRC_DIR=\"$(abs_top_srcdir)/proxy/http/remap/\" \ -I$(abs_top_srcdir)/tests/include \ $(TS_INCLUDES) \ @YAMLCPP_INCLUDES@ diff --git a/proxy/http/remap/unit-tests/test_NextHopConsistentHash.cc b/proxy/http/remap/unit-tests/test_NextHopConsistentHash.cc index 912a5da..cbd29bd 100644 --- a/proxy/http/remap/unit-tests/test_NextHopConsistentHash.cc +++ b/proxy/http/remap/unit-tests/test_NextHopConsistentHash.cc @@ -51,7 +51,7 @@ SCENARIO("Testing NextHopConsistentHash class, using policy 'consistent_hash'", { // load the configuration strtegies. std::shared_ptr strategy; -NextHopStrategyFactory nhf("unit-tests/consistent-hash-tests.yaml"); +NextHopStrategyFactory nhf(TS_SRC_DIR "unit-tests/consistent-hash-tests.yaml"); strategy = nhf.strategyInstance("consistent-hash-1"); WHEN("the config is loaded.") @@ -190,7 +190,7 @@ SCENARIO("Testing NextHopConsistentHash class (all firstcalls), using policy 'co GIVEN("Loading the consistent-hash-tests.yaml config for 'consistent_hash' tests.") { std::shared_ptr strategy; -NextHopStrategyFactory nhf("unit-tests/consistent-hash-tests.yaml"); +NextHopStrategyFactory nhf(TS_SRC_DIR "unit-tests/consistent-hash-tests.yaml"); strategy = nhf.strategyInstance("consistent-hash-1"); WHEN("the config is loaded.") @@ -292,7 +292,7 @@ SCENARIO("Testing NextHopConsistentHash class (alternating rings), using policy GIVEN("Loading the consistent-hash-tests.yaml config for 'consistent_hash' tests.") { std::shared_ptr strategy; -NextHopStrategyFactory nhf("unit-tests/consistent-hash-tests.yaml"); +NextHopStrategyFactory nhf(TS_SRC_DIR "unit-tests/consistent-hash-tests.yaml"); strategy = nhf.strategyInstance("consistent-hash-2"); WHEN("the config is loaded.") diff --git a/proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc b/proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc index 7df2fd3..df47f3c 100644 --- a/proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc +++ b/proxy/http/remap/unit-tests/test_NextHopRoundRobin.cc @@ -41,7 +41,7 @@ SCENARIO("Testing NextHopRoundRobin class, using policy 'rr-strict'", "[NextHopR GIVEN("Loading the round-robin-tests.yaml config for round robin 'rr-strict' tests.") { std::shared_ptr strategy; -NextHopStrategyFactory nhf("unit-tests/round-robin-tests.yaml"); +NextHopStrategyFactory nhf(TS_SRC_DIR "unit-tests/round-robin-tests.yaml"); strategy = nhf.strategyInstance("rr-strict-exhaust-ring"); WHEN("the config is loaded.") @@ -146,7 +146,7 @@ SCENARIO("Testing NextHopRoundRobin class, using policy 'first-live'", "[NextHop GIVEN("Loading the round-robin-tests.yaml config for round robin 'first-live' tests.") { std::shared_pt
[trafficserver] branch master updated (151b1d0 -> 3a4fe4e)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 151b1d0 Fix the strategies.yaml documentation. add 3a4fe4e ssl_session_reuse optimization to check if diags is on No new revisions were added by this update. Summary of changes: .../experimental/ssl_session_reuse/src/publish.cc | 57 ++ 1 file changed, 37 insertions(+), 20 deletions(-)
[trafficserver] branch 8.0.x updated: Replaces Python -> Python3 in a few utilities (#6187)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.0.x by this push: new 3d2c4e6 Replaces Python -> Python3 in a few utilities (#6187) 3d2c4e6 is described below commit 3d2c4e6f65b0b0dee8f50e01dcf90626c4303e0a Author: Leif Hedstrom AuthorDate: Mon Nov 18 14:56:49 2019 +0800 Replaces Python -> Python3 in a few utilities (#6187) (cherry picked from commit ae62e8a120eb4ea6d5925917fe9db11b8d5d0bf0) --- contrib/python/compare_RecordsConfigcc.py | 36 +++ contrib/python/compare_records_config.py | 4 ++-- tools/check-unused-dependencies | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/contrib/python/compare_RecordsConfigcc.py b/contrib/python/compare_RecordsConfigcc.py old mode 100644 new mode 100755 index 41992aa..802c718 --- a/contrib/python/compare_RecordsConfigcc.py +++ b/contrib/python/compare_RecordsConfigcc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -23,8 +23,8 @@ import string try: src_dir = sys.argv[1] except IndexError: -print "Usage: %s [trafficserver_source_dir]" % sys.argv[0] -print "Compares values in RecordsConfig.cc with the default records.config file" +print("Usage: %s [trafficserver_source_dir]" % sys.argv[0]) +print("Compares values in RecordsConfig.cc with the default records.config file") sys.exit(1) # We expect these keys to differ between files, so ignore them @@ -56,12 +56,12 @@ with open("%s/mgmt/RecordsConfig.cc" % src_dir) as fh: m = cc_re.search(line) if m: value = m.group(3) -value = string.lstrip(value, '"') -value = string.rstrip(value, '"') +value = value.lstrip('"') +value = value.rstrip('"') rc_cc[m.group(1)] = (m.group(2), value) # Process records.config.default.in -with open("%s/proxy/config/records.config.default.in" % src_dir) as fh: +with open("%s/configs/records.config.default.in" % src_dir) as fh: in_re = re.compile(r'(?:CONFIG|LOCAL) (\S+)\s+(\S+)\s+(\S+)') for line in fh: m = in_re.match(line) @@ -81,37 +81,37 @@ with open("%s/doc/admin-guide/files/records.config.en.rst" % src_dir) as fh: # Compare the two # If a value is in RecordsConfig.cc and not records.config.default.in, it is # ignored right now. -print "# Comparing RecordsConfig.cc -> records.config.default.in" +print("# Comparing RecordsConfig.cc -> records.config.default.in") for key in rc_in: if key in ignore_keys: continue if key not in rc_cc: -print "%s missing -> %s" % (key, "%s %s" % rc_in[key]) +print("%s missing -> %s" % (key, "%s %s" % rc_in[key])) continue if rc_cc[key] != rc_in[key]: -print "%s : %s -> %s" % (key, "%s %s" % rc_cc[key], "%s %s" % rc_in[key]) +print("%s : %s -> %s" % (key, "%s %s" % rc_cc[key], "%s %s" % rc_in[key])) # Search for undocumented variables ... missing = [k for k in rc_cc if k not in rc_doc] if len(missing) > 0: -print -print "Undocumented configuration variables:" +print() +print("Undocumented configuration variables:") for m in sorted(missing): -print "\t%s %s" % (m, "%s %s" % rc_cc[m]) +print("\t%s %s" % (m, "%s %s" % rc_cc[m])) # Search for incorrectly documented default values ... defaults = [k for k in rc_cc if k in rc_doc and rc_cc[k] != rc_doc[k]] if len(defaults) > 0: -print -print "Incorrectly documented defaults:" +print() +print("Incorrectly documented defaults:") for d in sorted(defaults): -print "\t%s %s -> %s" % (d, "%s %s" % rc_cc[d], "%s %s" % rc_doc[d]) +print("\t%s %s -> %s" % (d, "%s %s" % rc_cc[d], "%s %s" % rc_doc[d])) # Search for stale documentation ... stale = [k for k in rc_doc if k not in rc_cc] if (len(stale) > 0): -print -print "Stale documentation:" +print() +print("Stale documentation:") for s in sorted(stale): -print "\t%s" % (s) +print("\t%s" % (s)) diff --git a/contrib/python/compare_records_config.py b/contrib/python/compare_records_config.py old mode 100644 new mode 100755 index acde26a..bd610a9 --- a/contrib/python/compare_records_config.py ++
[trafficserver] branch 8.0.x updated (37c74b4 -> 0ba786d)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 37c74b4 Fixes a segfault that may occur when the debug and a lookup fails to find an entry in the hoststatus hash table. new 22c76f0 Fix building Catch on macOS new 0ba786d Fixed issue with macOS Catalina and pcre 8.43 enabling pcre-jit (#6189) The 2 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: src/tscore/Regex.cc | 8 tests/include/catch.hpp | 5 - 2 files changed, 8 insertions(+), 5 deletions(-)
[trafficserver] 01/02: Fix building Catch on macOS
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 22c76f0549f7a69015e6904f66ed7bf96073aec9 Author: Masaori Koshiba AuthorDate: Fri Nov 8 14:16:22 2019 +0900 Fix building Catch on macOS (cherry picked from commit 98b0aeaa122ac4c2711e955003c474071c8f2086) --- tests/include/catch.hpp | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/include/catch.hpp b/tests/include/catch.hpp index d7bb037..bc24a42 100644 --- a/tests/include/catch.hpp +++ b/tests/include/catch.hpp @@ -7093,6 +7093,10 @@ namespace Catch { # include # include # include + +// ink_autoconf.h is required to use HAVE_SYS_SYSCTL_H +#include "ink_autoconf.h" + #if defined(darwin) || defined(freebsd) #ifdef HAVE_SYS_SYSCTL_H # include @@ -13051,4 +13055,3 @@ using Catch::Detail::Approx; // end catch_reenable_warnings.h // end catch.hpp #endif // TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED -
[trafficserver] 02/02: Fixed issue with macOS Catalina and pcre 8.43 enabling pcre-jit (#6189)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 0ba786d7ae44b313c3f9c03e744c47ac971b0120 Author: Bryan Call AuthorDate: Mon Nov 18 18:38:34 2019 +0800 Fixed issue with macOS Catalina and pcre 8.43 enabling pcre-jit (#6189) (cherry picked from commit 093317c808b01304abf0a6b4aaf9c34791e3e08e) --- src/tscore/Regex.cc | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tscore/Regex.cc b/src/tscore/Regex.cc index 1a6cbed..cdb5651 100644 --- a/src/tscore/Regex.cc +++ b/src/tscore/Regex.cc @@ -26,7 +26,7 @@ #include "tscore/ink_memory.h" #include "tscore/Regex.h" -#ifdef PCRE_CONFIG_JIT +#if defined(PCRE_CONFIG_JIT) && !defined(darwin) // issue with macOS Catalina and pcre 8.43 struct RegexThreadKey { RegexThreadKey() { ink_thread_key_create(>key, (void (*)(void *)) & pcre_jit_stack_free); } ink_thread_key key; @@ -74,13 +74,13 @@ Regex::compile(const char *pattern, const unsigned flags) return false; } -#ifdef PCRE_CONFIG_JIT +#if defined(PCRE_CONFIG_JIT) && !defined(darwin) // issue with macOS Catalina and pcre 8.43 study_opts |= PCRE_STUDY_JIT_COMPILE; #endif regex_extra = pcre_study(regex, study_opts, ); -#ifdef PCRE_CONFIG_JIT +#if defined(PCRE_CONFIG_JIT) && !defined(darwin) // issue with macOS Catalina and pcre 8.43 if (regex_extra) { pcre_assign_jit_stack(regex_extra, _jit_stack, nullptr); } @@ -125,7 +125,7 @@ Regex::exec(const char *str, int length, int *ovector, int ovecsize) Regex::~Regex() { if (regex_extra) { -#ifdef PCRE_CONFIG_JIT +#if defined(PCRE_CONFIG_JIT) && !defined(darwin) // issue with macOS Catalina and pcre 8.43 pcre_free_study(regex_extra); #else pcre_free(regex_extra);
[trafficserver] branch master updated (c36464e -> 7dd4a6f)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from c36464e Remove header conversion functions for HTTP/0.9 add 7dd4a6f Fix ssl_session_reuse to compile on macOS and FreeBSD No new revisions were added by this update. Summary of changes: .../experimental/ssl_session_reuse/src/config.cc | 4 +-- .../experimental/ssl_session_reuse/src/publish.cc | 30 -- 2 files changed, 18 insertions(+), 16 deletions(-)
[trafficserver] branch master updated (ae62e8a -> 093317c)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from ae62e8a Replaces Python -> Python3 in a few utilities (#6187) add 093317c Fixed issue with macOS Catalina and pcre 8.43 enabling pcre-jit (#6189) No new revisions were added by this update. Summary of changes: src/tscore/Regex.cc | 8 1 file changed, 4 insertions(+), 4 deletions(-)
[trafficserver] branch master updated (14aadf4 -> 8857fa3)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 14aadf4 Updates yaml-cpp to 0.6.3 add 8857fa3 Fixed gcc7 issue with yaml-cpp 0.6.3 No new revisions were added by this update. Summary of changes: plugins/experimental/cookie_remap/cookie_remap.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
[trafficserver] branch master updated (97692a5 -> fe0d476)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 97692a5 tslua: Exposes set/get method for server request objects add fe0d476 Re-order READ_REQUEST_ HDR_HOOK and PRE_REMAP_HOOK No new revisions were added by this update. Summary of changes: doc/admin-guide/plugins/header_rewrite.en.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[trafficserver] branch 8.0.x updated: Remove using namespace std
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.0.x by this push: new 4772ab5 Remove using namespace std 4772ab5 is described below commit 4772ab554f5ec3c6c97856e8d3a1e4d8c994c4a7 Author: Masaori Koshiba AuthorDate: Wed Nov 6 08:47:29 2019 +0900 Remove using namespace std To fix build issue on FreeBSD 12.1 & LLVM-9 on macOS (cherry picked from commit e50520f4a4954ed8375e00594d86a11556e3d95c) --- iocore/cache/CacheTest.cc | 4 +--- src/traffic_top/stats.h | 13 ++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/iocore/cache/CacheTest.cc b/iocore/cache/CacheTest.cc index 8231ac7..66b9b5d 100644 --- a/iocore/cache/CacheTest.cc +++ b/iocore/cache/CacheTest.cc @@ -28,8 +28,6 @@ #include #include -using namespace std; - CacheTestSM::CacheTestSM(RegressionTest *t, const char *name) : RegressionSM(t), cache_test_name(name) { SET_HANDLER(::event_handler); @@ -550,7 +548,7 @@ test_RamCache(RegressionTest *t, RamCache *cache, const char *name, int64_t cach bool pass = true; CacheKey key; Vol *vol = theCache->key_to_vol(, "example.com", sizeof("example.com") - 1); - vector> data; + std::vector> data; cache->init(cache_size, vol); diff --git a/src/traffic_top/stats.h b/src/traffic_top/stats.h index ffec58c..2bc030c 100644 --- a/src/traffic_top/stats.h +++ b/src/traffic_top/stats.h @@ -32,8 +32,6 @@ #include #include "mgmtapi.h" -using namespace std; - struct LookupItem { LookupItem(const char *s, const char *n, const int t) : pretty(s), name(n), numerator(""), denominator(""), type(t) {} LookupItem(const char *s, const char *n, const char *d, const int t) : pretty(s), name(n), numerator(n), denominator(d), type(t) @@ -49,7 +47,7 @@ extern size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream); #if HAS_CURL extern char curl_error[CURL_ERROR_SIZE]; #endif -extern string response; +extern std::string response; namespace constant { @@ -62,6 +60,9 @@ const char end[] = "\",\n"; // class Stats { + using string= std::string; + template using map = std::map; + public: Stats(const string ) : _url(url) { @@ -524,6 +525,12 @@ public: } private: + std::pair + make_pair(std::string s, LookupItem i) + { +return std::make_pair(s, i); + } + map *_stats; map *_old_stats; map lookup_table;
[trafficserver] 02/02: Updated Changelog
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 39ae02830e81968e0c8f9509dd531715207162e7 Author: Bryan Call AuthorDate: Mon Nov 11 16:38:53 2019 -0800 Updated Changelog --- CHANGELOG-8.0.6 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG-8.0.6 b/CHANGELOG-8.0.6 index 19906f2..bee956c 100644 --- a/CHANGELOG-8.0.6 +++ b/CHANGELOG-8.0.6 @@ -15,6 +15,7 @@ Changes with Apache Traffic Server 8.0.6 #5434 - gcc9 - Fix I_Store.h #5435 - gcc9 - fix HTTPVersion. #5462 - gcc9: fixed issue with always printing a null char* + #5489 - gcc9: set default value for printing debug message #5497 - gcc9: sprintf and strncat fixes in plugins #5516 - Make code compilable with BoringSSL #5823 - Avoid AWS auth v4 path/query param double encoding @@ -29,3 +30,5 @@ Changes with Apache Traffic Server 8.0.6 #6068 - Fixes help message for traffic_top's sleep switch #6088 - Local 8.0.x change for gcc9 - Map.h, MemSpan.h, ink_uuid.h #6113 - Patch to fix autest issues + #6145 - Remove including sys/sysctl.h for Linux + #6158 - Fixed build issues with hwloc 2.x API changes
[trafficserver] 01/02: Fixed build issues with hwloc 2.x API changes
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit d85e29aea224b52b2580c64439cd876ad7c01469 Author: Bryan Call AuthorDate: Fri Nov 8 11:37:23 2019 -0800 Fixed build issues with hwloc 2.x API changes (cherry picked from commit e655af7faeaaadd182ce17fd5bd617cafc95aff7) --- iocore/aio/AIO.cc| 5 + iocore/eventsystem/UnixEventProcessor.cc | 9 + 2 files changed, 14 insertions(+) diff --git a/iocore/aio/AIO.cc b/iocore/aio/AIO.cc index 0e7f15a..0a884eb 100644 --- a/iocore/aio/AIO.cc +++ b/iocore/aio/AIO.cc @@ -190,9 +190,14 @@ struct AIOThreadInfo : public Continuation { (void)event; (void)e; #if TS_USE_HWLOC +#if HWLOC_API_VERSION >= 0x2 +hwloc_set_membind(ink_get_topology(), hwloc_topology_get_topology_nodeset(ink_get_topology()), HWLOC_MEMBIND_INTERLEAVE, + HWLOC_MEMBIND_THREAD | HWLOC_MEMBIND_BYNODESET); +#else hwloc_set_membind_nodeset(ink_get_topology(), hwloc_topology_get_topology_nodeset(ink_get_topology()), HWLOC_MEMBIND_INTERLEAVE, HWLOC_MEMBIND_THREAD); #endif +#endif aio_thread_main(this); delete this; return EVENT_DONE; diff --git a/iocore/eventsystem/UnixEventProcessor.cc b/iocore/eventsystem/UnixEventProcessor.cc index 894f2e5..0e7b69f 100644 --- a/iocore/eventsystem/UnixEventProcessor.cc +++ b/iocore/eventsystem/UnixEventProcessor.cc @@ -230,7 +230,11 @@ ThreadAffinityInitializer::alloc_numa_stack(EThread *t, size_t stacksize) if (mem_policy != HWLOC_MEMBIND_DEFAULT) { // Let's temporarily set the memory binding to our destination NUMA node +#if HWLOC_API_VERSION >= 0x2 +hwloc_set_membind(ink_get_topology(), nodeset, mem_policy, HWLOC_MEMBIND_THREAD | HWLOC_MEMBIND_BYNODESET); +#else hwloc_set_membind_nodeset(ink_get_topology(), nodeset, mem_policy, HWLOC_MEMBIND_THREAD); +#endif } // Alloc our stack @@ -238,8 +242,13 @@ ThreadAffinityInitializer::alloc_numa_stack(EThread *t, size_t stacksize) if (mem_policy != HWLOC_MEMBIND_DEFAULT) { // Now let's set it back to default for this thread. +#if HWLOC_API_VERSION >= 0x2 +hwloc_set_membind(ink_get_topology(), hwloc_topology_get_topology_nodeset(ink_get_topology()), HWLOC_MEMBIND_DEFAULT, + HWLOC_MEMBIND_THREAD | HWLOC_MEMBIND_BYNODESET); +#else hwloc_set_membind_nodeset(ink_get_topology(), hwloc_topology_get_topology_nodeset(ink_get_topology()), HWLOC_MEMBIND_DEFAULT, HWLOC_MEMBIND_THREAD); +#endif } hwloc_bitmap_free(nodeset);
[trafficserver] branch 8.0.x updated (4be6906 -> 39ae028)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 4be6906 Remove including sys/sysctl.h for Linux new d85e29a Fixed build issues with hwloc 2.x API changes new 39ae028 Updated Changelog The 2 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: CHANGELOG-8.0.6 | 3 +++ iocore/aio/AIO.cc| 5 + iocore/eventsystem/UnixEventProcessor.cc | 9 + 3 files changed, 17 insertions(+)
[trafficserver] branch master updated: Fixed build issues with hwloc 2.x API changes
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 e655af7 Fixed build issues with hwloc 2.x API changes e655af7 is described below commit e655af7faeaaadd182ce17fd5bd617cafc95aff7 Author: Bryan Call AuthorDate: Fri Nov 8 11:37:23 2019 -0800 Fixed build issues with hwloc 2.x API changes --- iocore/aio/AIO.cc| 5 + iocore/eventsystem/UnixEventProcessor.cc | 9 + 2 files changed, 14 insertions(+) diff --git a/iocore/aio/AIO.cc b/iocore/aio/AIO.cc index 2cd373b..df8e27b 100644 --- a/iocore/aio/AIO.cc +++ b/iocore/aio/AIO.cc @@ -192,9 +192,14 @@ struct AIOThreadInfo : public Continuation { (void)event; (void)e; #if TS_USE_HWLOC +#if HWLOC_API_VERSION >= 0x2 +hwloc_set_membind(ink_get_topology(), hwloc_topology_get_topology_nodeset(ink_get_topology()), HWLOC_MEMBIND_INTERLEAVE, + HWLOC_MEMBIND_THREAD | HWLOC_MEMBIND_BYNODESET); +#else hwloc_set_membind_nodeset(ink_get_topology(), hwloc_topology_get_topology_nodeset(ink_get_topology()), HWLOC_MEMBIND_INTERLEAVE, HWLOC_MEMBIND_THREAD); #endif +#endif aio_thread_main(this); delete this; return EVENT_DONE; diff --git a/iocore/eventsystem/UnixEventProcessor.cc b/iocore/eventsystem/UnixEventProcessor.cc index 2661b67..c2f7fad 100644 --- a/iocore/eventsystem/UnixEventProcessor.cc +++ b/iocore/eventsystem/UnixEventProcessor.cc @@ -230,7 +230,11 @@ ThreadAffinityInitializer::alloc_numa_stack(EThread *t, size_t stacksize) if (mem_policy != HWLOC_MEMBIND_DEFAULT) { // Let's temporarily set the memory binding to our destination NUMA node +#if HWLOC_API_VERSION >= 0x2 +hwloc_set_membind(ink_get_topology(), nodeset, mem_policy, HWLOC_MEMBIND_THREAD | HWLOC_MEMBIND_BYNODESET); +#else hwloc_set_membind_nodeset(ink_get_topology(), nodeset, mem_policy, HWLOC_MEMBIND_THREAD); +#endif } // Alloc our stack @@ -238,8 +242,13 @@ ThreadAffinityInitializer::alloc_numa_stack(EThread *t, size_t stacksize) if (mem_policy != HWLOC_MEMBIND_DEFAULT) { // Now let's set it back to default for this thread. +#if HWLOC_API_VERSION >= 0x2 +hwloc_set_membind(ink_get_topology(), hwloc_topology_get_topology_nodeset(ink_get_topology()), HWLOC_MEMBIND_DEFAULT, + HWLOC_MEMBIND_THREAD | HWLOC_MEMBIND_BYNODESET); +#else hwloc_set_membind_nodeset(ink_get_topology(), hwloc_topology_get_topology_nodeset(ink_get_topology()), HWLOC_MEMBIND_DEFAULT, HWLOC_MEMBIND_THREAD); +#endif } hwloc_bitmap_free(nodeset);
[trafficserver] branch master updated (0db18c7 -> 4960789)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 0db18c7 Only decrement log_stat_log_files_open_stat when the file is closed. add b58fcfd Move TSHttpTxnServerPush to the stable API interface. add 11a7f1d Promote server_push_preload plugin. add 4960789 Change API to return a TSReturnCode code. No new revisions were added by this update. Summary of changes: .../api/functions/TSHttpTxnServerPush.en.rst | 11 ++--- example/plugins/c-api/server_push/server_push.c| 1 - include/ts/experimental.h | 2 - include/ts/ts.h| 9 plugins/Makefile.am| 2 +- plugins/experimental/server_push_preload/README.md | 3 -- .../server_push_preload/Makefile.inc | 10 ++-- plugins/server_push_preload/README.md | 17 +++ .../server_push_preload/server_push_preload.cc | 53 ++ proxy/http2/Http2ConnectionState.cc| 11 +++-- proxy/http2/Http2ConnectionState.h | 2 +- proxy/http2/Http2Stream.cc | 4 +- proxy/http2/Http2Stream.h | 2 +- src/traffic_server/InkAPI.cc | 41 +++-- 14 files changed, 116 insertions(+), 52 deletions(-) delete mode 100644 plugins/experimental/server_push_preload/README.md rename plugins/{experimental => }/server_push_preload/Makefile.inc (71%) create mode 100644 plugins/server_push_preload/README.md rename plugins/{experimental => }/server_push_preload/server_push_preload.cc (74%)
[trafficserver] branch master updated (07e6e2d -> 0db18c7)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 07e6e2d Normalize loopback usage in session_match autest add 0db18c7 Only decrement log_stat_log_files_open_stat when the file is closed. No new revisions were added by this update. Summary of changes: include/tscore/BaseLogFile.h | 2 +- proxy/logging/LogFile.cc | 22 +++--- src/tscore/BaseLogFile.cc| 20 3 files changed, 32 insertions(+), 12 deletions(-)
[trafficserver] branch 8.0.x updated: Remove including sys/sysctl.h for Linux
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.0.x by this push: new 4be6906 Remove including sys/sysctl.h for Linux 4be6906 is described below commit 4be6906afcf6e3abd3d03fbd6623d5c32ffc4aab Author: Bryan Call AuthorDate: Tue Nov 5 17:36:55 2019 -0800 Remove including sys/sysctl.h for Linux (cherry picked from commit 3ea8301d1572073072063233b6974244d1827e81) Conflicts: src/tscore/ink_hrtime.cc --- include/tscore/ink_platform.h | 2 ++ src/tscore/ink_hrtime.cc | 2 ++ tests/include/catch.hpp | 4 3 files changed, 8 insertions(+) diff --git a/include/tscore/ink_platform.h b/include/tscore/ink_platform.h index 321bfdf..32212a9 100644 --- a/include/tscore/ink_platform.h +++ b/include/tscore/ink_platform.h @@ -157,9 +157,11 @@ typedef unsigned int in_addr_t; #include #endif +#if defined(darwin) || defined(freebsd) #ifdef HAVE_SYS_SYSCTL_H #include #endif +#endif #ifdef HAVE_SYS_SYSTEMINFO_H #include diff --git a/src/tscore/ink_hrtime.cc b/src/tscore/ink_hrtime.cc index 3a328c2..a535065 100644 --- a/src/tscore/ink_hrtime.cc +++ b/src/tscore/ink_hrtime.cc @@ -35,8 +35,10 @@ #if defined(freebsd) #include #include +#ifdef HAVE_SYS_SYSCTL_H #include #endif +#endif #include #include diff --git a/tests/include/catch.hpp b/tests/include/catch.hpp index ecd8907..d7bb037 100644 --- a/tests/include/catch.hpp +++ b/tests/include/catch.hpp @@ -7093,7 +7093,11 @@ namespace Catch { # include # include # include +#if defined(darwin) || defined(freebsd) +#ifdef HAVE_SYS_SYSCTL_H # include +#endif +#endif # include # include
[trafficserver] branch master updated (2d7a477 -> 3ea8301)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 2d7a477 A couple simple tweaks. add 3ea8301 Remove including sys/sysctl.h for Linux No new revisions were added by this update. Summary of changes: include/tscore/ink_platform.h | 2 ++ src/tscore/ink_hrtime.cc | 2 ++ tests/include/catch.hpp | 4 3 files changed, 8 insertions(+)
[trafficserver] branch 8.0.x updated: gcc9: set default value for printing debug message
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.0.x by this push: new cd3115c gcc9: set default value for printing debug message cd3115c is described below commit cd3115c7c07c307a1d9da7336dc86eff4aa24848 Author: Bryan Call AuthorDate: Mon May 13 11:02:12 2019 -0700 gcc9: set default value for printing debug message (cherry picked from commit 5f246c33d62381f941906c134f2e073bc13812da) --- plugins/header_rewrite/conditions.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/header_rewrite/conditions.cc b/plugins/header_rewrite/conditions.cc index cdf8b7a..4b6cda6 100644 --- a/plugins/header_rewrite/conditions.cc +++ b/plugins/header_rewrite/conditions.cc @@ -838,7 +838,7 @@ ConditionNow::eval(const Resources ) const char * ConditionGeo::get_geo_string(const sockaddr *addr) const { - const char *ret = nullptr; + const char *ret = "(unknown)"; int v = 4; if (addr) {
[trafficserver] branch master updated (b950519 -> bad68b5)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from b950519 Cleaned up the changelog command for making our release notes add bad68b5 Remove remnants of http/1.1 pipeline logic. No new revisions were added by this update. Summary of changes: proxy/http/HttpSM.cc | 5 + proxy/http/HttpTransact.cc | 4 proxy/http/HttpTransact.h | 1 - 3 files changed, 1 insertion(+), 9 deletions(-)
[trafficserver] branch master updated (4f8cb03 -> b950519)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 4f8cb03 Updated to clang-format v9.0.0 add b950519 Cleaned up the changelog command for making our release notes No new revisions were added by this update. Summary of changes: tools/git/changelog.pl | 137 + 1 file changed, 71 insertions(+), 66 deletions(-)
[trafficserver] 01/03: gcc9: fixed issue with always printing a null char*
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit f6ae00e175c70900ac90495268c342e48e23911d Author: Bryan Call AuthorDate: Thu May 9 15:42:30 2019 -0700 gcc9: fixed issue with always printing a null char* (cherry picked from commit 8fcc1ca57997dc19573c777a1395dd3f8a524b98) --- proxy/http/HttpSM.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index caeb2c7..fe05658 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -7788,7 +7788,7 @@ HttpSM::redirect_request(const char *redirect_url, const int redirect_len) if (redirectScheme == nullptr) { clientUrl.scheme_set(scheme_str, scheme_len); -SMDebug("http_redirect", "[HttpSM::redirect_request] URL without scheme %.*s", redirectSchemeLen, redirectScheme); +SMDebug("http_redirect", "[HttpSM::redirect_request] URL without scheme"); } if (noPortInHost) {
[trafficserver] 03/03: Updated Changelog
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 66c0112cbf907f3ea2158b91a5106df8594d4bc3 Author: Bryan Call AuthorDate: Tue Nov 5 15:55:23 2019 -0800 Updated Changelog --- CHANGELOG-8.0.6 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG-8.0.6 b/CHANGELOG-8.0.6 index 990f2ec..19906f2 100644 --- a/CHANGELOG-8.0.6 +++ b/CHANGELOG-8.0.6 @@ -14,6 +14,8 @@ Changes with Apache Traffic Server 8.0.6 #5433 - gcc9 - Fix Errata.h, NumericType.h. #5434 - gcc9 - Fix I_Store.h #5435 - gcc9 - fix HTTPVersion. + #5462 - gcc9: fixed issue with always printing a null char* + #5497 - gcc9: sprintf and strncat fixes in plugins #5516 - Make code compilable with BoringSSL #5823 - Avoid AWS auth v4 path/query param double encoding #5833 - Fix H2 internal counters
[trafficserver] branch 8.0.x updated (f95273d -> 66c0112)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from f95273d Updated Changelog new f6ae00e gcc9: fixed issue with always printing a null char* new 9c6706c gcc9: sprintf and strncat fixes in plugins new 66c0112 Updated Changelog The 3 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: CHANGELOG-8.0.6| 2 ++ example/thread_pool/psi.c | 4 ++-- plugins/s3_auth/s3_auth.cc | 4 ++-- proxy/http/HttpSM.cc | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-)
[trafficserver] 02/03: gcc9: sprintf and strncat fixes in plugins
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 9c6706c73245718d83fdf1a951c945e96c11d9ce Author: Bryan Call AuthorDate: Tue May 14 10:25:22 2019 -0700 gcc9: sprintf and strncat fixes in plugins (cherry picked from commit fcebeae51454d45c608b1a105b8df8cca70cbbe9) --- example/thread_pool/psi.c | 4 ++-- plugins/s3_auth/s3_auth.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/thread_pool/psi.c b/example/thread_pool/psi.c index fa465b2..e770960 100644 --- a/example/thread_pool/psi.c +++ b/example/thread_pool/psi.c @@ -466,7 +466,7 @@ psi_include(TSCont contp, void *edata ATS_UNUSED) /* For security reason, we do not allow to include files that are not in the directory /include. Also include file cannot contain any path. */ - sprintf(inc_file, "%s/%s", psi_directory, _basename(data->psi_filename)); + snprintf(inc_file, sizeof(inc_file), "%s/%s", psi_directory, _basename(data->psi_filename)); /* Read the include file and copy content into iobuffer */ if ((filep = TSfopen(inc_file, "r")) != NULL) { @@ -971,7 +971,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED) } /* Initialize the psi directory = /include */ - sprintf(psi_directory, "%s/%s", TSPluginDirGet(), PSI_PATH); + snprintf(psi_directory, sizeof(psi_directory), "%s/%s", TSPluginDirGet(), PSI_PATH); /* create an TSTextLogObject to log any psi include */ retval = TSTextLogObjectCreate("psi", TS_LOG_MODE_ADD_TIMESTAMP, ); diff --git a/plugins/s3_auth/s3_auth.cc b/plugins/s3_auth/s3_auth.cc index 1d95405..6814859 100644 --- a/plugins/s3_auth/s3_auth.cc +++ b/plugins/s3_auth/s3_auth.cc @@ -620,10 +620,10 @@ S3Request::set_header(const char *header, int header_len, const char *val, int v static size_t str_concat(char *dst, size_t dst_len, const char *src, size_t src_len) { - size_t to_copy = (src_len < dst_len) ? src_len : dst_len; + size_t to_copy = std::min(dst_len, src_len); if (to_copy > 0) { -(void)strncat(dst, src, to_copy); +strncat(dst, src, to_copy); } return to_copy;
[trafficserver] 02/05: Add transform TSIOBuffer watermark APIs.
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 568f3e7479545434a93b51bc574393eec78c9b15 Author: Jeffrey Bevill AuthorDate: Wed Aug 15 15:05:13 2018 -0600 Add transform TSIOBuffer watermark APIs. (cherry picked from commit 5a2c6acd23321092552516dc8f6599e42d986f18) --- doc/admin-guide/plugins/lua.en.rst | 24 + plugins/lua/ts_lua_common.h| 1 + plugins/lua/ts_lua_http.c | 43 ++ plugins/lua/ts_lua_transform.c | 9 +++- 4 files changed, 76 insertions(+), 1 deletion(-) diff --git a/doc/admin-guide/plugins/lua.en.rst b/doc/admin-guide/plugins/lua.en.rst index 2071b3d..7bc17a9 100644 --- a/doc/admin-guide/plugins/lua.en.rst +++ b/doc/admin-guide/plugins/lua.en.rst @@ -2236,6 +2236,30 @@ Here is an example: `TOP <#ts-lua-plugin>`_ +ts.http.resp_transform.get_upstream_watermark_bytes +--- +**syntax:** *ts.http.resp_transform.get_upstream_watermark_bytes()* + +**context:** transform handler + +**description**: This function can be used to retrive the current watermark bytes for the upstream transform buffer. + + +`TOP <#ts-lua-plugin>`_ + +ts.http.resp_transform.set_upstream_watermark_bytes +--- +**syntax:** *ts.http.resp_transform.set_upstream_watermark_bytes(NUMBER)* + +**context:** transform handler + +**description**: This function can be used to set the watermark bytes of the upstream transform buffer. + +Setting the watermark bytes above 32kb may improve the performance of the transform handler. + + +`TOP <#ts-lua-plugin>`_ + ts.http.resp_transform.set_downstream_bytes --- **syntax:** *ts.http.resp_transform.set_downstream_bytes(NUMBER)* diff --git a/plugins/lua/ts_lua_common.h b/plugins/lua/ts_lua_common.h index b98e42f..dba8b7d 100644 --- a/plugins/lua/ts_lua_common.h +++ b/plugins/lua/ts_lua_common.h @@ -144,6 +144,7 @@ typedef struct { ts_lua_http_ctx *hctx; int64_t upstream_bytes; + int64_t upstream_watermark_bytes; int64_t downstream_bytes; int64_t total; diff --git a/plugins/lua/ts_lua_http.c b/plugins/lua/ts_lua_http.c index e840861..b10fefb 100644 --- a/plugins/lua/ts_lua_http.c +++ b/plugins/lua/ts_lua_http.c @@ -105,6 +105,8 @@ static void ts_lua_inject_server_state_variables(lua_State *L); static void ts_lua_inject_http_resp_transform_api(lua_State *L); static int ts_lua_http_resp_transform_get_upstream_bytes(lua_State *L); +static int ts_lua_http_resp_transform_get_upstream_watermark_bytes(lua_State *L); +static int ts_lua_http_resp_transform_set_upstream_watermark_bytes(lua_State *L); static int ts_lua_http_resp_transform_set_downstream_bytes(lua_State *L); void @@ -194,6 +196,12 @@ ts_lua_inject_http_resp_transform_api(lua_State *L) lua_pushcfunction(L, ts_lua_http_resp_transform_get_upstream_bytes); lua_setfield(L, -2, "get_upstream_bytes"); + lua_pushcfunction(L, ts_lua_http_resp_transform_get_upstream_watermark_bytes); + lua_setfield(L, -2, "get_upstream_watermark_bytes"); + + lua_pushcfunction(L, ts_lua_http_resp_transform_set_upstream_watermark_bytes); + lua_setfield(L, -2, "set_upstream_watermark_bytes"); + lua_pushcfunction(L, ts_lua_http_resp_transform_set_downstream_bytes); lua_setfield(L, -2, "set_downstream_bytes"); } @@ -885,6 +893,41 @@ ts_lua_http_resp_transform_get_upstream_bytes(lua_State *L) } static int +ts_lua_http_resp_transform_get_upstream_watermark_bytes(lua_State *L) +{ + ts_lua_http_transform_ctx *transform_ctx; + + transform_ctx = ts_lua_get_http_transform_ctx(L); + if (transform_ctx == NULL) { +TSError("[ts_lua] missing transform_ctx"); +return 0; + } + + lua_pushnumber(L, transform_ctx->upstream_watermark_bytes); + + return 1; +} + +static int +ts_lua_http_resp_transform_set_upstream_watermark_bytes(lua_State *L) +{ + int64_t n; + ts_lua_http_transform_ctx *transform_ctx; + + transform_ctx = ts_lua_get_http_transform_ctx(L); + if (transform_ctx == NULL) { +TSError("[ts_lua] missing transform_ctx"); +return 0; + } + + n = luaL_checkinteger(L, 1); + + transform_ctx->upstream_watermark_bytes = n; + + return 0; +} + +static int ts_lua_http_resp_transform_set_downstream_bytes(lua_State *L) { int64_t n; diff --git a/plugins/lua/ts_lua_transform.c b/plugins/lua/ts_lua_transform.c index e66a3b0..56c27fc 100644 --- a/plugins/lua/ts_lua_transform.c +++ b/plugins/lua/ts_lua_transform.c @@ -66,7 +66,7 @@ ts_lua_transform_handler(TSCont contp, ts_lua_http_transform_ctx *transform_ctx, TSVIO input_vio; TSIOBufferReader input_reader; TSIOBufferBlock blk; - int64_t toread, towrite, blk_len, upstream_done, input_avail, l;
[trafficserver] branch 8.0.x updated (4fbce44 -> f95273d)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 4fbce44 Trying autest again, this passed in our testing container new 2f6751f Fixes help message for traffic_top's sleep switch new 568f3e7 Add transform TSIOBuffer watermark APIs. new 51c42dd Changed how current age is determined to age out documents. Guaranteed freshness was being used innapropriately when the docs age was already beyond that value new c786eba Fixed url_sig error when storing base64ed params in penultimate segment. new f95273d Updated Changelog The 5 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: CHANGELOG-8.0.6| 5 ++ doc/admin-guide/plugins/lua.en.rst | 24 +++ plugins/experimental/url_sig/url_sig.c | 111 - plugins/lua/ts_lua_common.h| 1 + plugins/lua/ts_lua_http.c | 43 + plugins/lua/ts_lua_transform.c | 9 ++- proxy/http/HttpTransact.cc | 9 ++- src/traffic_top/traffic_top.cc | 2 +- 8 files changed, 172 insertions(+), 32 deletions(-)
[trafficserver] 03/05: Changed how current age is determined to age out documents. Guaranteed freshness was being used innapropriately when the docs age was already beyond that value
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 51c42dde1b50d4e8c0e9ca4491710fa24a995835 Author: ezelko260 AuthorDate: Sat Apr 6 00:31:36 2019 + Changed how current age is determined to age out documents. Guaranteed freshness was being used innapropriately when the docs age was already beyond that value (cherry picked from commit 2c3dd8dd62116c0df3326b69d045a30daa47aad0) --- proxy/http/HttpTransact.cc | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index de03df6..e78fdd9 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -7172,11 +7172,16 @@ HttpTransact::what_is_document_freshness(State *s, HTTPHdr *client_request, HTTP current_age = HttpTransactHeaders::calculate_document_age(s->request_sent_time, s->response_received_time, cached_obj_response, response_date, s->current.now); - // Overflow ? + // First check overflow status + // Second if current_age is under the max, use the smaller value + // Finally we take the max of current age or guaranteed max, this ensures it will + // age out properly, otherwise a doc will never expire if guaranteed < document max-age if (current_age < 0) { current_age = s->txn_conf->cache_guaranteed_max_lifetime; - } else { + } else if (current_age < s->txn_conf->cache_guaranteed_max_lifetime) { current_age = std::min((time_t)s->txn_conf->cache_guaranteed_max_lifetime, current_age); + } else { +current_age = std::max((time_t)s->txn_conf->cache_guaranteed_max_lifetime, current_age); } TxnDebug("http_match", "[what_is_document_freshness] fresh_limit: %d current_age: %" PRId64, fresh_limit, (int64_t)current_age);
[trafficserver] 04/05: Fixed url_sig error when storing base64ed params in penultimate segment.
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit c786ebabd77cffd21c3a0e61f8d1afbfa64f1673 Author: Chris Lemmons AuthorDate: Tue Jul 31 17:51:53 2018 + Fixed url_sig error when storing base64ed params in penultimate segment. (cherry picked from commit 2f1dec1e3759c87bf4bdcbcfbae762993d60bbcf) --- plugins/experimental/url_sig/url_sig.c | 111 - 1 file changed, 83 insertions(+), 28 deletions(-) diff --git a/plugins/experimental/url_sig/url_sig.c b/plugins/experimental/url_sig/url_sig.c index 65c36ac..6aa1fe0 100644 --- a/plugins/experimental/url_sig/url_sig.c +++ b/plugins/experimental/url_sig/url_sig.c @@ -330,14 +330,38 @@ getAppQueryString(const char *query_string, int query_length) } } +/** fixedBufferWrite safely writes no more than *dest_len bytes to *dest_end + * from src. If copying src_len bytes to *dest_len would overflow, it returns + * zero. *dest_end is advanced and *dest_len is decremented to account for the + * written data. No null-terminators are written automatically (though they + * could be copied with data). + */ +static int +fixedBufferWrite(char **dest_end, int *dest_len, const char *src, int src_len) +{ + if (src_len > *dest_len) { +return 0; + } + memcpy(*dest_end, src, src_len); + *dest_end += src_len; + *dest_len -= src_len; + return 1; +} + static char * urlParse(char *url, char *anchor, char *new_path_seg, int new_path_seg_len, char *signed_seg, unsigned int signed_seg_len) { char *segment[MAX_SEGMENTS]; unsigned char decoded_string[2048] = {'\0'}; - char new_url[8192] = {'\0'}; + char new_url[8192]; /* new_url is not null_terminated */ char *p = NULL, *sig_anchor = NULL, *saveptr = NULL; - int i = 0, numtoks = 0, cp_len = 0, l, decoded_len = 0, sig_anchor_seg = 0; + int i = 0, numtoks = 0, decoded_len = 0, sig_anchor_seg = 0; + + char *new_url_end= new_url; + int new_url_len_left = sizeof(new_url); + + char *new_path_seg_end= new_path_seg; + int new_path_seg_len_left = new_path_seg_len; char *skip = strchr(url, ':'); if (!skip || skip[1] != '/' || skip[2] != '/') { @@ -345,8 +369,11 @@ urlParse(char *url, char *anchor, char *new_path_seg, int new_path_seg_len, char } skip += 3; // preserve the scheme in the new_url. - strncat(new_url, url, skip - url); - TSDebug(PLUGIN_NAME, "%s:%d - new_url: %s\n", __FILE__, __LINE__, new_url); + if (!fixedBufferWrite(_url_end, _url_len_left, url, skip - url)) { +TSError("insufficient space to copy schema into new_path_seg buffer."); +return NULL; + } + TSDebug(PLUGIN_NAME, "%s:%d - new_url: %*s\n", __FILE__, __LINE__, (int)(new_url_end - new_url), new_url); // parse the url. if ((p = strtok_r(skip, "/", )) != NULL) { @@ -387,19 +414,18 @@ urlParse(char *url, char *anchor, char *new_path_seg, int new_path_seg_len, char // last path segment so skip them. continue; } -l = strlen(segment[i]); -if (l + 1 > new_path_seg_len) { - TSError("insuficient space to copy into new_path_seg buffer."); +if (!fixedBufferWrite(_path_seg_end, _path_seg_len_left, segment[i], strlen(segment[i]))) { + TSError("insufficient space to copy into new_path_seg buffer."); return NULL; -} else { - memcpy(new_path_seg, segment[i], l); - new_path_seg[l] = '\0'; - if (i != numtoks - 1) { -strncat(new_path_seg, "/", 1); +} +if (i != numtoks - 1) { + if (!fixedBufferWrite(_path_seg_end, _path_seg_len_left, "/", 1)) { +TSError("insufficient space to copy into new_path_seg buffer."); +return NULL; } - cp_len += l + 1; } } + *new_path_seg_end = '\0'; TSDebug(PLUGIN_NAME, "new_path_seg: %s", new_path_seg); // save the encoded signing parameter data @@ -434,24 +460,53 @@ urlParse(char *url, char *anchor, char *new_path_seg, int new_path_seg_len, char } TSDebug(PLUGIN_NAME, "decoded_string: %s", decoded_string); - for (i = 0; i < numtoks; i++) { -// cp the base64 decoded string. -if (i == sig_anchor_seg && sig_anchor != NULL) { - memcpy(new_url, segment[i], strlen(segment[i])); - memcpy(new_url, (char *)decoded_string, strlen((char *)decoded_string)); - strncat(new_url, "/", 1); - continue; -} else if (i == numtoks - 2 && sig_anchor == NULL) { - memcpy(new_url, (char *)decoded_string, strlen((char *)decoded_string)); - strncat(new_url, "/", 1); - continue; + { +int oob = 0; /* Out Of Buffer */ + +for (i = 0; i < numtoks; i++) { + // cp the base64 decoded string. + if (i == sig_anchor_seg && sig_anchor != NULL) { +if (!
[trafficserver] 01/05: Fixes help message for traffic_top's sleep switch
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 2f6751ff7e8a60364038a1552555f5cb0f98215c Author: Randall Meyer AuthorDate: Thu Oct 24 10:30:42 2019 -0500 Fixes help message for traffic_top's sleep switch Closes issue #6051 (cherry picked from commit 0a455638854e3f771c2e92521bf8f17aa38fc836) --- src/traffic_top/traffic_top.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/traffic_top/traffic_top.cc b/src/traffic_top/traffic_top.cc index e093636..90c1acd 100644 --- a/src/traffic_top/traffic_top.cc +++ b/src/traffic_top/traffic_top.cc @@ -400,7 +400,7 @@ main(int argc, const char **argv) version.setup(PACKAGE_NAME, "traffic_top", PACKAGE_VERSION, __DATE__, __TIME__, BUILD_MACHINE, BUILD_PERSON, ""); const ArgumentDescription argument_descriptions[] = { -{"sleep", 's', "Enable debugging output", "I", _time, nullptr, nullptr}, +{"sleep", 's', "Sets the delay between updates (in seconds)", "I", _time, nullptr, nullptr}, HELP_ARGUMENT_DESCRIPTION(), VERSION_ARGUMENT_DESCRIPTION(), RUNROOT_ARGUMENT_DESCRIPTION(),
[trafficserver] 05/05: Updated Changelog
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit f95273d3156bbcc6f7cb3cf6a0d987e5828d7d64 Author: Bryan Call AuthorDate: Tue Nov 5 15:39:16 2019 -0800 Updated Changelog --- CHANGELOG-8.0.6 | 5 + 1 file changed, 5 insertions(+) diff --git a/CHANGELOG-8.0.6 b/CHANGELOG-8.0.6 index 55c28fb..990f2ec 100644 --- a/CHANGELOG-8.0.6 +++ b/CHANGELOG-8.0.6 @@ -1,8 +1,11 @@ Changes with Apache Traffic Server 8.0.6 + #4042 - Fixed url_sig error when storing base64ed params in penultimate segment. + #4117 - Add transform TSIOBuffer watermark APIs. #4590 - Print thread name instead of thread id #4840 - resolve stack-use-after-scope in YamlLogConfig.cc #5078 - Fix directives for checking TS_USE_TLS_OCSP #5105 - tscore/ink_hrtime: add missing cstdint import + #5241 - Changed how current age is determined to age out documents #5316 - cppcheck: Removed problematic move operators for FixedBufferWriter. #5331 - Off by 1 error in memcpy of redirect url #5424 - Fix ContFlags for gcc 9. @@ -21,4 +24,6 @@ Changes with Apache Traffic Server 8.0.6 #5935 - Perform a SSL quiet shutdown when close-notify is not sent #5989 - Concurrent SRV requests failure #6047 - Change the ready checks for ats to use the actual ats port and not th… + #6068 - Fixes help message for traffic_top's sleep switch #6088 - Local 8.0.x change for gcc9 - Map.h, MemSpan.h, ink_uuid.h + #6113 - Patch to fix autest issues
[trafficserver] branch master updated (5083cf9 -> 452d60e)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 5083cf9 Issue #4294: Handle return value of SSL_write() properly. add 452d60e Adding an autest for traffic_dump. No new revisions were added by this update. Summary of changes: plugins/experimental/traffic_dump/traffic_dump.cc | 2 +- tests/Pipfile | 1 + .../traffic_dump/gold/200.gold}| 7 +- .../pluginTest/traffic_dump/traffic_dump.test.py | 112 + .../pluginTest/traffic_dump/verify_replay.py | 96 ++ 5 files changed, 213 insertions(+), 5 deletions(-) copy tests/gold_tests/{remap/gold/remap-https-200.gold => pluginTest/traffic_dump/gold/200.gold} (60%) create mode 100644 tests/gold_tests/pluginTest/traffic_dump/traffic_dump.test.py create mode 100644 tests/gold_tests/pluginTest/traffic_dump/verify_replay.py
[trafficserver] branch master updated (33a5ebe -> 5083cf9)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 33a5ebe Fix null pointer dereference reported by clang-analyzer add 5083cf9 Issue #4294: Handle return value of SSL_write() properly. No new revisions were added by this update. Summary of changes: tests/gold_tests/tls/ssl-post.c | 6 +++--- tools/http_load/http_load.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
[trafficserver] branch master updated (3aaf280 -> c179620)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 3aaf280 Script used for comparing commits on internal branch and seeing if they are on the remote master or release branch. It uses a combination of cherry-mark and searching the commit message for cherry-pick -x hashes. add c179620 cleanup the eventloop No new revisions were added by this update. Summary of changes: iocore/aio/AIO.cc | 4 ++-- iocore/cache/CacheWrite.cc| 6 +++--- iocore/dns/DNS.cc | 2 +- iocore/eventsystem/I_EThread.h| 6 +- iocore/eventsystem/I_EventProcessor.h | 8 ++-- iocore/eventsystem/I_ProtectedQueue.h | 4 +--- iocore/eventsystem/P_UnixEThread.h| 13 ++--- iocore/eventsystem/P_UnixEventProcessor.h | 18 ++ iocore/eventsystem/ProtectedQueue.cc | 21 + iocore/eventsystem/UnixEThread.cc | 16 +--- iocore/net/UnixNetAccept.cc | 2 +- 11 files changed, 17 insertions(+), 83 deletions(-)
[trafficserver] branch master updated (63e048a -> 3aaf280)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 63e048a doc + unittest TSRemap(Init|NewInstance) failures add 3aaf280 Script used for comparing commits on internal branch and seeing if they are on the remote master or release branch. It uses a combination of cherry-mark and searching the commit message for cherry-pick -x hashes. No new revisions were added by this update. Summary of changes: tools/{ => git}/apply-pr.sh | 0 tools/{ => git}/changelog.pl | 0 tools/git/git_merge_log.pl | 144 +++ 3 files changed, 144 insertions(+) rename tools/{ => git}/apply-pr.sh (100%) rename tools/{ => git}/changelog.pl (100%) create mode 100755 tools/git/git_merge_log.pl
[trafficserver] branch 8.0.x updated (c879269 -> 2c70471)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from c879269 Perform a SSL quiet shutdown when close-notify is not sent add 2c70471 Updated Changelog No new revisions were added by this update. Summary of changes: CHANGELOG-8.0.6 | 2 ++ 1 file changed, 2 insertions(+)
[trafficserver] 01/02: Off by 1 error in memcpy of redirect url
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit efcdc13741b2baba96a96c623effd92aa746aefa Author: Susan Hinrichs AuthorDate: Tue Apr 23 16:42:31 2019 + Off by 1 error in memcpy of redirect url (cherry picked from commit d611b54aadd399641e009fde77017fed4d2da01f) Conflicts: proxy/http/HttpSM.cc --- proxy/http/HttpSM.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 1008fd8..caeb2c7 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -7715,7 +7715,9 @@ HttpSM::redirect_request(const char *redirect_url, const int redirect_len) // Prepend a slash and parse again. char redirect_url_leading_slash[redirect_len + 1]; redirect_url_leading_slash[0] = '/'; - memcpy(redirect_url_leading_slash + 1, redirect_url, redirect_len + 1); + if (redirect_len > 0) { +memcpy(redirect_url_leading_slash + 1, redirect_url, redirect_len); + } url_nuke_proxy_stuff(redirectUrl.m_url_impl); redirectUrl.parse(redirect_url_leading_slash, redirect_len + 1); }
[trafficserver] branch 8.0.x updated (7e34842 -> c879269)
This is an automated email from the ASF dual-hosted git repository. bcall pushed a change to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 7e34842 Updated Changelog new efcdc13 Off by 1 error in memcpy of redirect url new c879269 Perform a SSL quiet shutdown when close-notify is not sent The 2 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: iocore/net/SSLNetVConnection.cc| 5 ++ proxy/http/HttpSM.cc | 4 +- .../tls_session_cache.test.py} | 87 +- 3 files changed, 58 insertions(+), 38 deletions(-) copy tests/gold_tests/{tls_hooks/tls_hooks.test.py => tls/tls_session_cache.test.py} (52%)
[trafficserver] 02/02: Perform a SSL quiet shutdown when close-notify is not sent
This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit c8792690da84a890f362ab9b1b9b51353d509143 Author: Valentin Gutierrez AuthorDate: Fri Sep 13 10:15:17 2019 + Perform a SSL quiet shutdown when close-notify is not sent (cherry picked from commit acf2fb7519bb0ed3820d3f798178903341d0678f) Conflicts: iocore/net/SSLNetVConnection.cc --- iocore/net/SSLNetVConnection.cc| 5 ++ tests/gold_tests/tls/tls_session_cache.test.py | 93 ++ 2 files changed, 98 insertions(+) diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc index a03022c..f38a9ee 100644 --- a/iocore/net/SSLNetVConnection.cc +++ b/iocore/net/SSLNetVConnection.cc @@ -907,6 +907,11 @@ SSLNetVConnection::do_io_close(int lerrno) // Send the close-notify int ret = SSL_shutdown(ssl); Debug("ssl-shutdown", "SSL_shutdown %s", (ret) ? "success" : "failed"); +} else { + // Request a quiet shutdown to OpenSSL + SSL_set_quiet_shutdown(ssl, 1); + SSL_set_shutdown(ssl, SSL_RECEIVED_SHUTDOWN | SSL_SENT_SHUTDOWN); + Debug("ssl-shutdown", "Enable quiet shutdown"); } } // Go on and do the unix socket cleanups diff --git a/tests/gold_tests/tls/tls_session_cache.test.py b/tests/gold_tests/tls/tls_session_cache.test.py new file mode 100644 index 000..08d9fd2 --- /dev/null +++ b/tests/gold_tests/tls/tls_session_cache.test.py @@ -0,0 +1,93 @@ +''' +''' +# 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 +import re +Test.Summary = ''' +Test tls session cache +''' + +# Define default ATS +ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True) +server = Test.MakeOriginServer("server") + + +# Add info the origin server responses +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", "body": ""} +server.addResponse("sessionlog.json", request_header, response_header) + +# add ssl materials like key, certificates for the server +ts.addSSLfile("ssl/server.pem") +ts.addSSLfile("ssl/server.key") + +ts.Disk.remap_config.AddLine( +'map / http://127.0.0.1:{0}'.format(server.Variables.Port) +) + +ts.Disk.ssl_multicert_config.AddLine( +'dest_ip=* ssl_cert_name=server.pem ssl_key_name=server.key' +) + +ts.Disk.records_config.update({ +'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), +'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), +'proxy.config.ssl.client.verify.server': 0, +'proxy.config.ssl.server.cipher_suite': 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:RC4-SHA:RC4-MD5:AES128-SHA:AES256-SHA:DES-CBC3-SHA!SRP:!DSS:!PSK:!aNULL:!eNULL:!SSLv2', +'proxy.config.exec_thread.autoconfig.scale': 1.0, +'proxy.config.ssl.session_cache': 2, +'proxy.config.ssl.session_cache.size': 4096, +'proxy.config.ssl.session_cache.num_buckets': 256, +'proxy.config.ssl.session_cache.skip_cache_on_bucket_contention': 0, +'proxy.config.ssl.session_cache.timeout': 0, +'proxy.config.ssl.session_cache.auto_clear': 1, +'proxy.config.ssl.server.session_ticket.enable': 0, +}) + +# Check that Session-ID is the same on every connection +def checkSession(ev) : + retval = False + f = open(openssl_output, 'r') + err = "Session ids match" + if not f: +err = "Failed to open {0}".format(openssl_output) +return (retval, "Check that session ids match", err) + + content = f.read() + match = re.findall('Session-ID: ([0-9A-F]+)', content