[trafficserver] branch 9.0.x updated: Updated ChangeLog
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 8bc06b4 Updated ChangeLog 8bc06b4 is described below commit 8bc06b4c9a0690db92efef65a020b8ad7c67650c Author: Leif Hedstrom AuthorDate: Mon May 4 22:36:54 2020 -0600 Updated ChangeLog --- CHANGELOG-9.0.0 | 8 1 file changed, 8 insertions(+) diff --git a/CHANGELOG-9.0.0 b/CHANGELOG-9.0.0 index 373d4b0..ca2818c 100644 --- a/CHANGELOG-9.0.0 +++ b/CHANGELOG-9.0.0 @@ -882,7 +882,15 @@ Changes with Apache Traffic Server 9.0.0 #6664 - cache_range_requests: remove unnecessary Last-Modified header from tests #6677 - Format to match perferred if/else formatting for sh scripts #6678 - Removes commented out code from example + #6690 - Remove tls_versions from host sni policy check #6694 - Normalizes function names to match hook names in intercept plugins #6697 - Increase the default max_record_entries to match the original value #6700 - traffic_dump: add nullptr check for sni string #6704 - Removes ATS version from gold files + #6708 - Adding logging fields for collapsed forwarding metrics + #6714 - Add Access log fields for ProxyProtocol Context + #6717 - Fixup .gitignores to match repo reality + #6718 - gcc10: fixed warning about returning local variable in int64_to_str() + #6723 - Document ip_allow in sni.yaml + #6731 - Fix g++ 10 compile errors. + #6734 - Update expired test certificates for cert_update
[trafficserver] branch 8.1.x updated: Handle response parsing case where EOF happens before any data arrives.
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 8.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.1.x by this push: new 7b01541 Handle response parsing case where EOF happens before any data arrives. 7b01541 is described below commit 7b015413b00fdce318a9735b3ce4ea402c9fd67e Author: Alan M. Carroll AuthorDate: Tue Jul 10 11:34:08 2018 -0500 Handle response parsing case where EOF happens before any data arrives. (cherry picked from commit 712a5e6501e43809d8a51d33473339b6e89d15e7) --- proxy/hdrs/HdrTSOnly.cc | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/proxy/hdrs/HdrTSOnly.cc b/proxy/hdrs/HdrTSOnly.cc index 9f96b85..6841b1e 100644 --- a/proxy/hdrs/HdrTSOnly.cc +++ b/proxy/hdrs/HdrTSOnly.cc @@ -100,13 +100,21 @@ HTTPHdr::parse_resp(HTTPParser *parser, IOBufferReader *r, int *bytes_used, bool do { int64_t b_avail = r->block_read_avail(); +tmp = start = r->start(); -if (b_avail <= 0 && eof == false) { - break; +// No data currently available. +if (b_avail <= 0) { + if (eof == false) { // more data may arrive later, return CONTINUE state. +break; + } else if (nullptr == start) { +// EOF on empty MIOBuffer - that's a fail, don't bother with parsing. +// (otherwise will attempt to attach_block a non-existent block) +state = PARSE_RESULT_ERROR; +break; + } } -tmp = start = r->start(); -end = start + b_avail; +end = start + b_avail; int heap_slot = m_heap->attach_block(r->get_current_block(), start);
[trafficserver] branch 8.1.x updated: Updated ChangeLog
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 8.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.1.x by this push: new 55fe5f4 Updated ChangeLog 55fe5f4 is described below commit 55fe5f4c8bb23dc071cb36fd193acd88a5639293 Author: Leif Hedstrom AuthorDate: Mon May 4 22:28:05 2020 -0600 Updated ChangeLog --- CHANGELOG-8.1.0 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG-8.1.0 b/CHANGELOG-8.1.0 index 3b01425..dbbc6e8 100644 --- a/CHANGELOG-8.1.0 +++ b/CHANGELOG-8.1.0 @@ -176,7 +176,9 @@ Changes with Apache Traffic Server 8.1.0 #6660 - Fix 8.1.x build with old openssl #6665 - Fix memory leak of HPACK # - Fix link issue of test_libhttp2 on FreeBSD 12 with --enable-debug + #6667 - Updated docs for guaranteed_{min,max}_lifetime #6676 - Fixes the 'traffic_ctl host status' for trafficserver 8.1.x #6685 - 8.1.x backport cache_range_requests autests: remove last-modified #6688 - Fixes minor memory leak in configure_net #6692 - Fix deprecated-copy warning in cache tool + #6729 - Fix a bug that current_active_client_connections doesn't decrease
[trafficserver] 01/02: Adding logging fields for collapsed forwarding metrics (#6708)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 3b4982b650984f8e1fd66c3b039e6cffbbf636f4 Author: Evan Zelkowitz AuthorDate: Mon Apr 27 19:54:43 2020 -0700 Adding logging fields for collapsed forwarding metrics (#6708) * Adding logging fields for collapsed forwarding metrics This adds 3 new log fields for transaction output (since collapsed forwarding is transaction based) * crra - The number of read retry attempts for this transaction. If no CF has been done (it has not attempted a write) then this is just the read lock contention. If a write has been attempted then this value gets reset to 0 as it attempts more reads post-write-fail. * cwra - The number of write retry attempts. This will be either the number based on write lock contention, or it can be the max-write-retries+1. If it is max+1 that means that we have hit the max attempts because the lock was being held by another writer and so this transaction fell back to read retries and attempted to be collapsed * cccs - Collapsed connection success. * -1: Attempted CF but failed and went to origin * 0: Did not need to collapse, either already had to go to origin or was a hit * 1: Attempted CF and got a hit on retry read attempts * Remove creation of cache_sm object since logaccess cannot use its destructor. Using the access functions directly * Changed log values: * -1: Attempted CF but failed and went to origin * 0: Did not need to collapse, either already had to go to origin or was a hit * 1: Attempted CF and got a hit on retry read attempts * Update documentation for cccs value (cherry picked from commit 0ec63fc9df3810b68ab80864bf3f559c56c02aac) --- doc/admin-guide/logging/formatting.en.rst | 10 ++ proxy/logging/Log.cc | 15 + proxy/logging/LogAccess.cc| 55 +++ proxy/logging/LogAccess.h | 3 ++ 4 files changed, 83 insertions(+) diff --git a/doc/admin-guide/logging/formatting.en.rst b/doc/admin-guide/logging/formatting.en.rst index 8fa5edd..c81f435 100644 --- a/doc/admin-guide/logging/formatting.en.rst +++ b/doc/admin-guide/logging/formatting.en.rst @@ -151,6 +151,9 @@ Cache Details .. _chm: .. _cwr: .. _cwtr: +.. _crra: +.. _cwra: +.. _cccs: These log fields reveal details of the |TS| proxy interaction with its own cache while attempting to service incoming client requests. @@ -173,6 +176,13 @@ cwr Proxy CacheCache Write Result. Specifies the result of attempting to (``WL_MISS``), write interrupted (``INTR``), error while writing (``ERR``), or cache write successful (``FIN``). cwt Proxy CacheCache Write Transform Result. +crra Proxy CacheCache read retry attempts to read the object from cache. +cwra Proxy CacheCache write retry attempts to write a fresh or updated + object to cache. +cccs Proxy CacheCache collapsed connection success; + -1: collapsing was attempted but failed, request went upstream + 0: collapsing was unnecessary + 1: attempted to collapse and got a cache hit on subsequent read attempts = == == .. _admin-logging-fields-txn: diff --git a/proxy/logging/Log.cc b/proxy/logging/Log.cc index 42f8dc3..8be6bd7 100644 --- a/proxy/logging/Log.cc +++ b/proxy/logging/Log.cc @@ -892,6 +892,21 @@ Log::init_fields() global_field_list.add(field, false); field_symbol_hash.emplace("ctid", field); + field = new LogField("cache_read_retry_attempts", "crra", LogField::dINT, ::marshal_cache_read_retries, + ::unmarshal_int_to_str); + global_field_list.add(field, false); + field_symbol_hash.emplace("crra", field); + + field = new LogField("cache_write_retry_attempts", "cwra", LogField::dINT, ::marshal_cache_write_retries, + ::unmarshal_int_to_str); + global_field_list.add(field, false); + field_symbol_hash.emplace("cwra", field); + + field = new LogField("cache_collapsed_connection_success", "cccs", LogField::dINT, + ::marshal_cache_collapsed_connection_success, ::unmarshal_int_to_str); + global_field_list.add(field, false); + field_symbol_hash.emplace("cccs", field); + field = new LogField("client_transaction_priority_weight", "ctpw", LogField::sINT, ::marshal_client_http_transaction_priority_weight, ::unmarshal_int_to_str); global_field_list.add(field, false); diff --git a/proxy/logging/LogAccess.cc b/proxy/logging/LogAccess.cc index 32b2e19..08f5b0a 100644 --- a/proxy/logging/LogAccess.cc +++ b/proxy/logging/LogAccess.cc @@ -2635,6 +2635,61 @@
[trafficserver] 02/02: Add Access log fields for ProxyProtocol Context
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 1c1d29abaf71a52641ccc411de7341b08550188a Author: Sudheer Vinukonda AuthorDate: Tue Apr 28 08:56:20 2020 -0700 Add Access log fields for ProxyProtocol Context (cherry picked from commit 583e5ed5f3db1e33075b8e5b880d6f6bf1e730f3) --- doc/admin-guide/logging/formatting.en.rst | 7 proxy/logging/Log.cc | 15 + proxy/logging/LogAccess.cc| 55 +++ proxy/logging/LogAccess.h | 3 ++ 4 files changed, 80 insertions(+) diff --git a/doc/admin-guide/logging/formatting.en.rst b/doc/admin-guide/logging/formatting.en.rst index c81f435..242afe2 100644 --- a/doc/admin-guide/logging/formatting.en.rst +++ b/doc/admin-guide/logging/formatting.en.rst @@ -505,6 +505,13 @@ shi Origin Server IP address resolved via DNS by |TS| for the origin server. shn Origin Server Host name of the origin server. nhi Origin Server Destination IP address of next hop nhp Origin Server Destination port of next hop +ppv Proxy Protocol Proxy Protocol Version used (if any) between the Loadbalancer + Versionand |TS| +pps Proxy Protocol Source IP received via Proxy Protocol context from the LB to + Source IP the |TS| +ppd Proxy Protocol Destination IP received via Proxy Protocol context from the LB + Dest IPto the |TS| + = == == .. note:: diff --git a/proxy/logging/Log.cc b/proxy/logging/Log.cc index 8be6bd7..4d46f6d 100644 --- a/proxy/logging/Log.cc +++ b/proxy/logging/Log.cc @@ -917,6 +917,21 @@ Log::init_fields() global_field_list.add(field, false); field_symbol_hash.emplace("ctpd", field); + field = new LogField("proxy_protocol_version", "ppv", LogField::dINT, ::marshal_proxy_protocol_version, + reinterpret_cast(::unmarshal_str)); + global_field_list.add(field, false); + field_symbol_hash.emplace("ppv", field); + + field = new LogField("proxy_protocol_src_ip", "pps", LogField::IP, ::marshal_proxy_protocol_src_ip, + ::unmarshal_ip_to_str); + global_field_list.add(field, false); + field_symbol_hash.emplace("ppsip", field); + + field = new LogField("proxy_protocol_dst_ip", "ppd", LogField::IP, ::marshal_proxy_protocol_dst_ip, + ::unmarshal_ip_to_str); + global_field_list.add(field, false); + field_symbol_hash.emplace("ppdip", field); + field = new LogField("version_build_number", "vbn", LogField::STRING, ::marshal_version_build_number, (LogField::UnmarshalFunc)::unmarshal_str); global_field_list.add(field, false); diff --git a/proxy/logging/LogAccess.cc b/proxy/logging/LogAccess.cc index 08f5b0a..6d8d9e1 100644 --- a/proxy/logging/LogAccess.cc +++ b/proxy/logging/LogAccess.cc @@ -1315,6 +1315,61 @@ LogAccess::marshal_version_build_number(char *buf) -*/ int +LogAccess::marshal_proxy_protocol_version(char *buf) +{ + const char *version_str = nullptr; + int len = INK_MIN_ALIGN; + + if (m_http_sm) { +NetVConnection::ProxyProtocolVersion ver = m_http_sm->t_state.pp_info.proxy_protocol_version; +switch (ver) { +case NetVConnection::ProxyProtocolVersion::V1: + version_str = "V1"; + break; +case NetVConnection::ProxyProtocolVersion::V2: + version_str = "V2"; + break; +case NetVConnection::ProxyProtocolVersion::UNDEFINED: +default: + version_str = "-"; + break; +} +len = LogAccess::strlen(version_str); + } + + if (buf) { +marshal_str(buf, version_str, len); + } + return len; +} + +/*- + -*/ +int +LogAccess::marshal_proxy_protocol_src_ip(char *buf) +{ + sockaddr const *ip = nullptr; + if (m_http_sm && m_http_sm->t_state.pp_info.proxy_protocol_version != NetVConnection::ProxyProtocolVersion::UNDEFINED) { +ip = _http_sm->t_state.pp_info.src_addr.sa; + } + return marshal_ip(buf, ip); +} + +/*- + -*/ +int +LogAccess::marshal_proxy_protocol_dst_ip(char *buf) +{ + sockaddr const *ip = nullptr; + if (m_http_sm && m_http_sm->t_state.pp_info.proxy_protocol_version != NetVConnection::ProxyProtocolVersion::UNDEFINED) { +ip = _http_sm->t_state.pp_info.dst_addr.sa; + } + return marshal_ip(buf, ip); +} + +/*- + -*/ +int
[trafficserver] branch 9.0.x updated (7908481 -> 1c1d29a)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a change to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 7908481 Remove tls_versions from host sni policy check new 3b4982b Adding logging fields for collapsed forwarding metrics (#6708) new 1c1d29a Add Access log fields for ProxyProtocol Context 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: doc/admin-guide/logging/formatting.en.rst | 17 + proxy/logging/Log.cc | 30 proxy/logging/LogAccess.cc| 110 ++ proxy/logging/LogAccess.h | 6 ++ 4 files changed, 163 insertions(+)
[trafficserver] branch 9.0.x updated: Remove tls_versions from host sni policy check
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 7908481 Remove tls_versions from host sni policy check 7908481 is described below commit 79084814b7aa9a8bb6f9d00db4d387d5d1ce7464 Author: Susan Hinrichs AuthorDate: Mon Apr 20 18:06:41 2020 + Remove tls_versions from host sni policy check (cherry picked from commit 7567ff7d5930a33342302572aa190b9f196e9a44) --- doc/admin-guide/files/records.config.en.rst | 2 ++ iocore/net/P_SNIActionPerformer.h | 5 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst index e7b68ad..85c5d89 100644 --- a/doc/admin-guide/files/records.config.en.rst +++ b/doc/admin-guide/files/records.config.en.rst @@ -1835,6 +1835,8 @@ Security You can override this global setting on a per domain basis in the :file:`sni.yaml` file using the :ref:`host_sni_policy attribute` action. + Currently, only the verify_client policy is checked for host name and SNI matching. + Cache Control = diff --git a/iocore/net/P_SNIActionPerformer.h b/iocore/net/P_SNIActionPerformer.h index 8dc95fe..2f9bd01 100644 --- a/iocore/net/P_SNIActionPerformer.h +++ b/iocore/net/P_SNIActionPerformer.h @@ -262,11 +262,6 @@ public: } return SSL_TLSEXT_ERR_OK; } - bool - TestClientSNIAction(const char *servername, const IpEndpoint , int ) const override - { -return !unset; - } }; class SNI_IpAllow : public ActionItem
[trafficserver] branch 9.0.x updated: Document ip_allow in sni.yaml (#6723)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 59d5e13 Document ip_allow in sni.yaml (#6723) 59d5e13 is described below commit 59d5e1373b19f1441353d139517bb143b40ec1aa Author: Susan Hinrichs AuthorDate: Fri May 1 09:31:23 2020 -0500 Document ip_allow in sni.yaml (#6723) Co-authored-by: Susan Hinrichs (cherry picked from commit 11041d9368de4e68a6447d23d1fa9d04c7bbc7c7) --- doc/admin-guide/files/sni.yaml.en.rst | 43 +++ 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/doc/admin-guide/files/sni.yaml.en.rst b/doc/admin-guide/files/sni.yaml.en.rst index 76f5aa9..b6e3780 100644 --- a/doc/admin-guide/files/sni.yaml.en.rst +++ b/doc/admin-guide/files/sni.yaml.en.rst @@ -47,11 +47,16 @@ the user needs to enter the fqdn in the configuration with a ``*.`` followed by .. _override-verify-server-properties: .. _override-host-sni-policy: -= == += Key Meaning -= == += fqdn Fully Qualified Domain Name. This item is used if the SNI value matches this. +ip_allow Specify a list of client IP address, subnets, or ranges what are allowed to complete + the connection. This list is comma separated. IPv4 and IPv6 addresses can be specified. + Here is an example list: 192.168.1.0/24,192.168.10.1-4. This would allow connections + from clients in the 19.168.1.0 network or in the range from 192.168.10.1 to 192.168.1.4. + verify_server_policy One of the values :code:`DISABLED`, :code:`PERMISSIVE`, or :code:`ENFORCED`. By default this is :ts:cv:`proxy.config.ssl.client.verify.server.policy`. @@ -76,18 +81,18 @@ verify_client One of the values :code:`NONE`, :code:`MODERATE`, or : host_sni_policy One of the values :code:`DISABLED`, :code:`PERMISSIVE`, or :code:`ENFORCED`. - If not specified, the value of :ts:cv:`proxy.config.http.host_sni_policy` is used. This controls - how policy impacting mismatches between host header and SNI values are dealt with. + If not specified, the value of :ts:cv:`proxy.config.http.host_sni_policy` is used. + This controls how policy impacting mismatches between host header and SNI values are + dealt with. valid_tls_versions_in This specifies the list of TLS protocols that will be offered to user agents during - the TLS negotiation. This replaces the global settings in :ts:cv:`proxy.config.ssl.TLSv1`, - :ts:cv:`proxy.config.ssl.TLSv1_1`, :ts:cv:`proxy.config.ssl.TLSv1_2`, - and :ts:cv:`proxy.config.ssl.TLSv1_3`. The potential values are TLSv1, TLSv1_1, TLSv1_2, and - TLSv1_3. You must list all protocols that |TS| should offer to the client when using - this key. This key is only valid for openssl 1.1.0 and later. Older versions of openssl do not - provide a hook early enough to update the SSL object. It is a syntax error for |TS| built - against earlier versions. - + the TLS negotiation. This replaces the global settings in + :ts:cv:`proxy.config.ssl.TLSv1`, :ts:cv:`proxy.config.ssl.TLSv1_1`, + :ts:cv:`proxy.config.ssl.TLSv1_2`, and :ts:cv:`proxy.config.ssl.TLSv1_3`. The potential + values are TLSv1, TLSv1_1, TLSv1_2, and TLSv1_3. You must list all protocols that |TS| + should offer to the client when using this key. This key is only valid for openssl + 1.1.0 and later. Older versions of openssl do not provide a hook early enough to update + the SSL object. It is a syntax error for |TS| built against earlier versions. client_cert The file containing the client certificate to use for the outbound connection. @@ -110,8 +115,8 @@ disable_h2Deprecated for the more general h2 setting. Setting d to :code:`true` is the same as setting http2 to
[trafficserver] branch 9.0.x updated: Update expired test certificates for cert_update
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 5e9575f Update expired test certificates for cert_update 5e9575f is described below commit 5e9575f391c8646c0c12d5b53cf813fdf398c6bc Author: Susan Hinrichs AuthorDate: Mon May 4 20:41:54 2020 + Update expired test certificates for cert_update (cherry picked from commit 287ee468583bbd00fb2b46ae822ba205261bae2f) --- .../pluginTest/cert_update/ssl/client1.pem | 159 ++-- .../pluginTest/cert_update/ssl/client2.pem | 160 ++-- .../pluginTest/cert_update/ssl/server1.pem | 161 +++-- .../pluginTest/cert_update/ssl/server2.pem | 161 +++-- 4 files changed, 322 insertions(+), 319 deletions(-) diff --git a/tests/gold_tests/pluginTest/cert_update/ssl/client1.pem b/tests/gold_tests/pluginTest/cert_update/ssl/client1.pem index 5fda0b3..74dc11e 100644 --- a/tests/gold_tests/pluginTest/cert_update/ssl/client1.pem +++ b/tests/gold_tests/pluginTest/cert_update/ssl/client1.pem @@ -1,83 +1,84 @@ -BEGIN CERTIFICATE- -MIIFXzCCA0egAwIBAgIUQW43tEf3dK2EAUi219sjNioWa8QwDQYJKoZIhvcNAQEL -BQAwPzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAklMMQ8wDQYDVQQKDAZBcGFjaGUx -EjAQBgNVBAMMCWFsaWNlLmNvbTAeFw0xOTA1MDMyMTEzNDdaFw0yMDA1MDIyMTEz -NDdaMD8xCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJJTDEPMA0GA1UECgwGQXBhY2hl -MRIwEAYDVQQDDAlhbGljZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK -AoICAQDEevfeMGJBziVeir3teXonOevM6E/4sZUxX2jDDgYvsYDkx8ConcufuO1B -svu9Pg+Odi0/zVjoJbIdF4+KqucUs+unDC2a1IHwHbUEQadlkPBmQq1Uxxc3Rb0c -RCjHzasn0p6vicq4bRmTtXSekezqTvwahDq0++Ci0fQwlbGewRBiJrrM+hbTOZdP -MR+SgIWsGRcRRTm8qtwMX/02UzE3cfY0liU6x/jMs76shhjt54hNDQJCRsNenh6m -rf5qD0i+GbQAjj6WN2LO+xuC0IoY8kbNjQTyKsOCkfhDADibyN70d/NUA3PhgqXD -4r119vhkLFR3FuVCW4mDgJ3Xo5XdiQVJ7cbrPS3Ds1lPESiJUssNPBSO3h2WM5HI -J9E9xDvQo4mrVc6phoDVFs3rtjjU9E5IMpCp8KxTQ5VpEk0/sHjijX5Q3OWWlBxX -bXrQSExj7aDvjL5SliwgobQsAX1zadtm/KBtDJTFB8emYIZfdNxSzM2a37ndZ/yZ -82NfUGY8FeY9kEMGGgLGU5KsIG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2pmwL/cZJTAfBgNVHSMEGDAWgBROGcex3gOvRDdNzppQ2pmwL/cZJTAMBgNV +HRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4ICAQA9RXNMy/iBTYE0mXdC1dhJtGhC +dWGIcx+zIR7lyKb5uzHLwqs9KPpLxzDvjTPn5+6iONjTd99m8CsB6KtdEYaEMvvL +Fk9XQLn7yUnUeHsTb0F+twBova15hlw277SrgPXlJVz9/Syrbmvb8upR1InaGO6q +2nyBMa+vEljmyfgpgGFOvfyTGczJoYWCOoxuRdkNC/jpAB8r+XcByX8Uad1BBPyk +xdVJnIh3VSX60Iu95WlO/YRhpx7R2N1HZUl32I58wYz9Fx5/0jZoD2mmI/n5NMyA +350Cumf58ESA0WDNp7tDfd4oZZwhn5/Il+iaz9TNVyujMJxMyfLwk/qIAIpFwkXZ +n0ika5T05SdPiAfSoQrx8aI48SjswDmmDrPz0BLbSdP+INDKkG/9Cpc4PG8t7T0m +KxTP1pN7Q3sj7KPu2/XbvVk1GxrDJyONSOEFOaL8x9qqMjM3gDp0wuXOw1p3vS2e +fmSkFYCzF0kiaXiXHkqYihHjqhg0nO2pjUPb/hOKmTlGwA2Aq1AxcYfGCiJf+bpV
[trafficserver] branch 9.0.x updated: Updated docs for guaranteed_{min, max}_lifetime
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 7fd5519 Updated docs for guaranteed_{min,max}_lifetime 7fd5519 is described below commit 7fd5519e5e9647e595069dcaebc9b03a4390e2e9 Author: Emanuele Rocca AuthorDate: Thu Apr 16 17:06:22 2020 +0200 Updated docs for guaranteed_{min,max}_lifetime The settings are taken into account whether or not heuristics are used. Update the documentation to reflect that. See https://phabricator.wikimedia.org/T249627#6062187 (cherry picked from commit 1d529e7e144ad41c9adcbd0df6371055923aab7b) --- doc/admin-guide/files/records.config.en.rst | 32 + 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst index 66c1de8..e7b68ad 100644 --- a/doc/admin-guide/files/records.config.en.rst +++ b/doc/admin-guide/files/records.config.en.rst @@ -2034,6 +2034,20 @@ Cache Control The maximum age allowed for a stale response before it cannot be cached. +.. ts:cv:: CONFIG proxy.config.http.cache.guaranteed_min_lifetime INT 0 + :reloadable: + :overridable: + + Establishes a guaranteed minimum lifetime boundary for object freshness. + Setting this to ``0`` (default) disables the feature. + +.. ts:cv:: CONFIG proxy.config.http.cache.guaranteed_max_lifetime INT 31536000 + :reloadable: + :overridable: + + Establishes a guaranteed maximum lifetime boundary for object freshness. + Setting this to ``0`` disables the feature. + .. ts:cv:: CONFIG proxy.config.http.cache.range.lookup INT 1 :overridable: @@ -2255,24 +2269,6 @@ Heuristic Expiration The aging factor for freshness computations. |TS| stores an object for this percentage of the time that elapsed since it last changed. -.. ts:cv:: CONFIG proxy.config.http.cache.guaranteed_min_lifetime INT 0 - :reloadable: - :overridable: - - Establishes a guaranteed minimum lifetime boundary for freshness heuristics. - When heuristics are used, and the :ts:cv:`proxy.config.http.cache.heuristic_lm_factor` - aging factor is applied, the final minimum age calculated will never be - lower than the value in this variable. - -.. ts:cv:: CONFIG proxy.config.http.cache.guaranteed_max_lifetime INT 31536000 - :reloadable: - :overridable: - - Establishes a guaranteed maximum lifetime boundary for freshness heuristics. - When heuristics are used, and the :ts:cv:`proxy.config.http.cache.heuristic_lm_factor` - aging factor is applied, the final maximum age calculated will never be - higher than the value in this variable. - Dynamic Content & Content Negotiation =
[trafficserver] branch 8.1.x updated: Updated docs for guaranteed_{min, max}_lifetime
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 8.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.1.x by this push: new 061ecf6 Updated docs for guaranteed_{min,max}_lifetime 061ecf6 is described below commit 061ecf6692868a82f8eed41c760cd46d0bb4cd71 Author: Emanuele Rocca AuthorDate: Thu Apr 16 17:06:22 2020 +0200 Updated docs for guaranteed_{min,max}_lifetime The settings are taken into account whether or not heuristics are used. Update the documentation to reflect that. See https://phabricator.wikimedia.org/T249627#6062187 (cherry picked from commit 1d529e7e144ad41c9adcbd0df6371055923aab7b) --- doc/admin-guide/files/records.config.en.rst | 32 + 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst index 59eca81..e36e4fa 100644 --- a/doc/admin-guide/files/records.config.en.rst +++ b/doc/admin-guide/files/records.config.en.rst @@ -1932,6 +1932,20 @@ Cache Control The maximum age allowed for a stale response before it cannot be cached. +.. ts:cv:: CONFIG proxy.config.http.cache.guaranteed_min_lifetime INT 0 + :reloadable: + :overridable: + + Establishes a guaranteed minimum lifetime boundary for object freshness. + Setting this to ``0`` (default) disables the feature. + +.. ts:cv:: CONFIG proxy.config.http.cache.guaranteed_max_lifetime INT 31536000 + :reloadable: + :overridable: + + Establishes a guaranteed maximum lifetime boundary for object freshness. + Setting this to ``0`` disables the feature. + .. ts:cv:: CONFIG proxy.config.http.cache.range.lookup INT 1 :overridable: @@ -2153,24 +2167,6 @@ Heuristic Expiration The aging factor for freshness computations. |TS| stores an object for this percentage of the time that elapsed since it last changed. -.. ts:cv:: CONFIG proxy.config.http.cache.guaranteed_min_lifetime INT 0 - :reloadable: - :overridable: - - Establishes a guaranteed minimum lifetime boundary for freshness heuristics. - When heuristics are used, and the :ts:cv:`proxy.config.http.cache.heuristic_lm_factor` - aging factor is applied, the final minimum age calculated will never be - lower than the value in this variable. - -.. ts:cv:: CONFIG proxy.config.http.cache.guaranteed_max_lifetime INT 31536000 - :reloadable: - :overridable: - - Establishes a guaranteed maximum lifetime boundary for freshness heuristics. - When heuristics are used, and the :ts:cv:`proxy.config.http.cache.heuristic_lm_factor` - aging factor is applied, the final maximum age calculated will never be - higher than the value in this variable. - Dynamic Content & Content Negotiation =
[trafficserver] branch 9.0.x updated: Fixup .gitignores to match repo reality
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new b1d0b2a Fixup .gitignores to match repo reality b1d0b2a is described below commit b1d0b2ad851be7674b9a9ea86f5290b34cc300f1 Author: Randall Meyer AuthorDate: Tue Apr 28 15:55:53 2020 -0700 Fixup .gitignores to match repo reality (cherry picked from commit 34f04778de7bf063279fbc8c51a0f9eb1af62c4a) --- .gitignore | 1 - doc/.gitignore | 1 - 2 files changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7504c79..305b05d 100644 --- a/.gitignore +++ b/.gitignore @@ -43,7 +43,6 @@ Makefile-pl config.cache config.status config.nice -config.h configs/records.config.default configs/storage.config.default diff --git a/doc/.gitignore b/doc/.gitignore index 21ee9ce..2a5b506 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,4 +1,3 @@ uml/images ext/local-config.py -ext/plantuml* Pipfile.lock
[trafficserver] branch 8.1.x updated: Fix a bug that current_active_client_connections doesn't decrease
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 8.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.1.x by this push: new 44fc5c9 Fix a bug that current_active_client_connections doesn't decrease 44fc5c9 is described below commit 44fc5c99677f732b2d7ab9f8bc421d1717686827 Author: Masakazu Kitajo AuthorDate: Fri May 1 16:43:47 2020 +0900 Fix a bug that current_active_client_connections doesn't decrease The metric was not decremented when a connection is closed by graceful shutdown (GOAWAY frame with stream ID 2^31-1). (cherry picked from commit 81f750ec3988f7a862ac5b66846530aa9f02d363) --- proxy/http2/Http2ConnectionState.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc index eee968e..703feb6 100644 --- a/proxy/http2/Http2ConnectionState.cc +++ b/proxy/http2/Http2ConnectionState.cc @@ -1392,6 +1392,7 @@ Http2ConnectionState::release_stream(Http2Stream *stream) // or we can use a local variable to do it. // ua_session = nullptr; } else if (shutdown_state == HTTP2_SHUTDOWN_IN_PROGRESS && fini_event == nullptr) { +ua_session->clear_session_active(); fini_event = this_ethread()->schedule_imm_local((Continuation *)this, HTTP2_SESSION_EVENT_FINI); } else if (ua_session->is_active()) { // If the number of clients is 0, HTTP2_SESSION_EVENT_FINI is not received or sent, and ua_session is active,
[trafficserver] branch 9.0.x updated: Fix a bug that current_active_client_connections doesn't decrease
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 32eec91 Fix a bug that current_active_client_connections doesn't decrease 32eec91 is described below commit 32eec91bb38450612140047f18a113d48e18f0fe Author: Masakazu Kitajo AuthorDate: Fri May 1 16:43:47 2020 +0900 Fix a bug that current_active_client_connections doesn't decrease The metric was not decremented when a connection is closed by graceful shutdown (GOAWAY frame with stream ID 2^31-1). (cherry picked from commit 81f750ec3988f7a862ac5b66846530aa9f02d363) --- proxy/http2/Http2ConnectionState.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc index 5386e5a..e8d59a7 100644 --- a/proxy/http2/Http2ConnectionState.cc +++ b/proxy/http2/Http2ConnectionState.cc @@ -1406,6 +1406,7 @@ Http2ConnectionState::release_stream() // or we can use a local variable to do it. // ua_session = nullptr; } else if (shutdown_state == HTTP2_SHUTDOWN_IN_PROGRESS && fini_event == nullptr) { +ua_session->clear_session_active(); fini_event = this_ethread()->schedule_imm_local((Continuation *)this, HTTP2_SESSION_EVENT_FINI); } else if (ua_session->is_active()) { // If the number of clients is 0, HTTP2_SESSION_EVENT_FINI is not received or sent, and ua_session is active,
[trafficserver] 02/03: GCC 10 fixes - simple fixes.
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 35ee50705f185d62af3d20e47212b1258ebf2d4b Author: Alan M. Carroll AuthorDate: Fri May 1 11:53:23 2020 -0500 GCC 10 fixes - simple fixes. (cherry picked from commit be584052e2ac2b0867e64d3d743f92880ddb696d) --- iocore/cache/P_CacheTest.h | 2 +- proxy/http/HttpTunnel.cc | 4 ++-- src/tscore/Arena.cc| 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iocore/cache/P_CacheTest.h b/iocore/cache/P_CacheTest.h index ba9814e..47f0cfd 100644 --- a/iocore/cache/P_CacheTest.h +++ b/iocore/cache/P_CacheTest.h @@ -44,7 +44,7 @@ struct PinnedDocTable : public Continuation { int remove(CacheKey *key); int cleanup(int event, Event *e); - PinnedDocTable() : Continuation(new_ProxyMutex()) { memset(bucket, 0, sizeof(Queue) * PINNED_DOC_TABLE_SIZE); } + PinnedDocTable() : Continuation(new_ProxyMutex()) { ink_zero(bucket); } }; struct CacheTestHost { diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc index 2b7f820..4fbac85 100644 --- a/proxy/http/HttpTunnel.cc +++ b/proxy/http/HttpTunnel.cc @@ -479,8 +479,8 @@ HttpTunnel::reset() num_producers = 0; num_consumers = 0; - memset(consumers, 0, sizeof(consumers)); - memset(producers, 0, sizeof(producers)); + ink_zero(consumers); + ink_zero(producers); } void diff --git a/src/tscore/Arena.cc b/src/tscore/Arena.cc index 81af84c..e26a20a 100644 --- a/src/tscore/Arena.cc +++ b/src/tscore/Arena.cc @@ -48,8 +48,8 @@ blk_alloc(int size) } blk->next = nullptr; - blk->m_heap_end= >data[size]; - blk->m_water_level = >data[0]; + blk->m_heap_end= blk->data + size; + blk->m_water_level = blk->data; return blk; }
[trafficserver] 03/03: gcc10: fixed warning about returning local variable in int64_to_str()
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 4702409ee6fca0822fb8f6027388afb5d7c418d1 Author: Bryan Call AuthorDate: Tue Apr 28 19:23:16 2020 -0700 gcc10: fixed warning about returning local variable in int64_to_str() It wouldn't return a local variable, but it was easy to be more explicit about it. (cherry picked from commit a98e2e4e518df95e861043e7804bcf49024e2886) --- src/tscore/ink_hrtime.cc | 38 -- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/tscore/ink_hrtime.cc b/src/tscore/ink_hrtime.cc index c8babcf..9bffa1a 100644 --- a/src/tscore/ink_hrtime.cc +++ b/src/tscore/ink_hrtime.cc @@ -49,18 +49,19 @@ int64_to_str(char *buf, unsigned int buf_size, int64_t val, unsigned int *total_ char local_buf[local_buf_size]; bool using_local_buffer = false; bool negative = false; - char *out_buf; + char *out_buf = buf; + char *working_buf; if (buf_size < 22) { // int64_t may not fit in provided buffer, use the local one -out_buf= _buf[local_buf_size - 1]; +working_buf= _buf[local_buf_size - 1]; using_local_buffer = true; } else { -out_buf = [buf_size - 1]; +working_buf = [buf_size - 1]; } unsigned int num_chars = 1; // includes eos - *out_buf-- = 0; + *working_buf-- = 0; if (val < 0) { val = -val; @@ -68,11 +69,11 @@ int64_to_str(char *buf, unsigned int buf_size, int64_t val, unsigned int *total_ } if (val < 10) { -*out_buf-- = '0' + static_cast(val); +*working_buf-- = '0' + static_cast(val); ++num_chars; } else { do { - *out_buf-- = static_cast(val % 10) + '0'; + *working_buf-- = static_cast(val % 10) + '0'; val /= 10; ++num_chars; } while (val); @@ -83,10 +84,10 @@ int64_to_str(char *buf, unsigned int buf_size, int64_t val, unsigned int *total_ if (req_width) { // add minus sign if padding character is not 0 if (negative && pad_char != '0') { - *out_buf = '-'; + *working_buf = '-'; ++num_chars; } else { - out_buf++; + working_buf++; } if (req_width > buf_size) { req_width = buf_size; @@ -96,19 +97,19 @@ int64_to_str(char *buf, unsigned int buf_size, int64_t val, unsigned int *total_ num_padding = req_width - num_chars; switch (num_padding) { case 3: -*--out_buf = pad_char; +*--working_buf = pad_char; // fallthrough case 2: -*--out_buf = pad_char; +*--working_buf = pad_char; // fallthrough case 1: -*--out_buf = pad_char; +*--working_buf = pad_char; break; default: -for (unsigned int i = 0; i < num_padding; ++i, *--out_buf = pad_char) { +for (unsigned int i = 0; i < num_padding; ++i, *--working_buf = pad_char) { ; } } @@ -117,23 +118,23 @@ int64_to_str(char *buf, unsigned int buf_size, int64_t val, unsigned int *total_ // add minus sign if padding character is 0 if (negative && pad_char == '0') { if (num_padding) { -*out_buf = '-'; // overwrite padding +*working_buf = '-'; // overwrite padding } else { -*--out_buf = '-'; +*--working_buf = '-'; ++num_chars; } } } else if (negative) { -*out_buf = '-'; +*working_buf = '-'; ++num_chars; } else { -out_buf++; +working_buf++; } if (using_local_buffer) { if (num_chars <= buf_size) { - memcpy(buf, out_buf, num_chars); - out_buf = buf; + memcpy(buf, working_buf, num_chars); + // out_buf is already pointing to buf } else { // data does not fit return nullptr out_buf = nullptr; @@ -143,6 +144,7 @@ int64_to_str(char *buf, unsigned int buf_size, int64_t val, unsigned int *total_ if (total_chars) { *total_chars = num_chars; } + return out_buf; }
[trafficserver] branch 9.0.x updated (6a9bf65 -> 4702409)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a change to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 6a9bf65 Updated Changelog new 9be45be GCC 10: Update traffic_via to use string_view to avoid compile errors. new 35ee507 GCC 10 fixes - simple fixes. new 4702409 gcc10: fixed warning about returning local variable in int64_to_str() 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: iocore/cache/P_CacheTest.h | 2 +- proxy/http/HttpTunnel.cc | 4 +-- src/traffic_via/traffic_via.cc | 81 +- src/tscore/Arena.cc| 4 +-- src/tscore/ink_hrtime.cc | 38 ++-- 5 files changed, 58 insertions(+), 71 deletions(-)
[trafficserver] 01/03: GCC 10: Update traffic_via to use string_view to avoid compile errors.
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 9be45bec3b7794ddf59862cc6660c59f179d5e18 Author: Alan M. Carroll AuthorDate: Fri May 1 14:28:54 2020 -0500 GCC 10: Update traffic_via to use string_view to avoid compile errors. (cherry picked from commit a1fb39e32515b779473fae9fa325b3f7f510c22b) --- src/traffic_via/traffic_via.cc | 81 +- 1 file changed, 33 insertions(+), 48 deletions(-) diff --git a/src/traffic_via/traffic_via.cc b/src/traffic_via/traffic_via.cc index 197032b..65fb617 100644 --- a/src/traffic_via/traffic_via.cc +++ b/src/traffic_via/traffic_via.cc @@ -24,11 +24,11 @@ #include "tscore/ink_platform.h" #include "tscore/ink_args.h" #include "tscore/I_Version.h" -#include "tscore/Tokenizer.h" -#include "tscore/TextBuffer.h" #include "mgmtapi.h" #include #include +#include +#include #include "tscore/Regex.h" /// XXX Use DFA or Regex wrappers? @@ -43,11 +43,11 @@ static AppVersionInfo appVersionInfo; struct VIA { - VIA(const char *t) : title(t), next(nullptr) { memset(viaData, 0, sizeof(viaData)); } + VIA(const char *t) : title(t) {} ~VIA() { delete next; } const char *title; - const char *viaData[128]; - VIA *next; + const char *viaData[128] = {}; // zero initialize + VIA *next= nullptr; }; // Function to get via header table for every field/category in the via header @@ -186,7 +186,7 @@ standardViaLookup(char flag) // Function to print via header static void -printViaHeader(const char *header) +printViaHeader(std::string_view header) { VIA *viaTable = nullptr; VIA *viaEntry = nullptr; @@ -195,22 +195,22 @@ printViaHeader(const char *header) printf("Via Header Details:\n"); // Loop through input via header flags - for (const char *c = header; *c; ++c) { -if ((*c == ':') || (*c == ';')) { + for (char c : header) { +if ((c == ':') || (c == ';')) { isDetail = true; continue; } -if (islower(*c)) { +if (islower(c)) { // Get the via header table delete viaTable; - viaEntry = viaTable = isDetail ? detailViaLookup(*c) : standardViaLookup(*c); + viaEntry = viaTable = isDetail ? detailViaLookup(c) : standardViaLookup(c); } else { // This is a one of the sequence of (uppercase) VIA codes. if (viaEntry) { +unsigned char idx = c; printf("%-55s:", viaEntry->title); -printf("%s\n", viaEntry->viaData[static_cast(*c)] ? viaEntry->viaData[static_cast(*c)] : - "Invalid sequence"); +printf("%s\n", viaEntry->viaData[idx] ? viaEntry->viaData[idx] : "Invalid sequence"); viaEntry = viaEntry->next; } } @@ -220,32 +220,29 @@ printViaHeader(const char *header) // Check validity of via header and then decode it static TSMgmtError -decodeViaHeader(const char *str) +decodeViaHeader(std::string_view text) { - size_t viaHdrLength = strlen(str); - char tmp[viaHdrLength + 2]; - char *Via = tmp; - - memcpy(Via, str, viaHdrLength); - Via[viaHdrLength] = '\0'; // null terminate - // Via header inside square brackets - if (Via[0] == '[' && Via[viaHdrLength - 1] == ']') { -viaHdrLength = viaHdrLength - 2; -Via++; -Via[viaHdrLength] = '\0'; // null terminate the string after trimming + if (!text.empty() && text.front() == '[' && text.back() == ']') { +text.remove_prefix(1); +text.remove_suffix(1); + } + if (text.empty()) { +return TS_ERR_FAIL; } - printf("Via header is [%s], Length is %zu\n", Via, viaHdrLength); + printf("Via header is [%.*s], Length is %zu\n", int(text.size()), text.data(), text.size()); - if (viaHdrLength == 5) { -Via = strcat(Via, " "); // Add one space character before decoding via header -++viaHdrLength; + char extender[6]; + if (text.size() == 5) { // add a trailing space in this case. +memcpy(extender, text.data(), text.size()); +extender[5] = ' '; +text= std::string_view{extender, 6}; } - if (viaHdrLength == 22 || viaHdrLength == 6) { + if (text.size() == 22 || text.size() == 6) { // Decode via header -printViaHeader(Via); +printViaHeader(text); return TS_ERR_OKAY; } // Invalid header size, come out. @@ -269,8 +266,7 @@ filterViaHeader() int i; const char *viaPattern = R"(\[([ucsfpe]+[^\]]+)\])"; // Regex to match via header with in [] which can start with character class ucsfpe - char *viaHeaderString; - char viaHeader[1024]; + std::string line; // Compile PCRE via header pattern compiledReg = pcre_compile(viaPattern, 0, , , nullptr); @@ -281,15 +277,9 @@ filterViaHeader() } // Read all lines from stdin - while (fgets(viaHeader, sizeof(viaHeader), stdin)) { -// Trim new line character and null
[trafficserver] branch master updated (287ee46 -> a1fb39e)
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 287ee46 Update expired test certificates for cert_update new be58405 GCC 10 fixes - simple fixes. new a1fb39e GCC 10: Update traffic_via to use string_view to avoid compile errors. 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/cache/P_CacheTest.h | 2 +- proxy/http/HttpTunnel.cc | 4 +-- src/traffic_via/traffic_via.cc | 81 +- src/tscore/Arena.cc| 4 +-- 4 files changed, 38 insertions(+), 53 deletions(-)
[trafficserver] 02/02: GCC 10: Update traffic_via to use string_view to avoid compile errors.
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 commit a1fb39e32515b779473fae9fa325b3f7f510c22b Author: Alan M. Carroll AuthorDate: Fri May 1 14:28:54 2020 -0500 GCC 10: Update traffic_via to use string_view to avoid compile errors. --- src/traffic_via/traffic_via.cc | 81 +- 1 file changed, 33 insertions(+), 48 deletions(-) diff --git a/src/traffic_via/traffic_via.cc b/src/traffic_via/traffic_via.cc index 197032b..65fb617 100644 --- a/src/traffic_via/traffic_via.cc +++ b/src/traffic_via/traffic_via.cc @@ -24,11 +24,11 @@ #include "tscore/ink_platform.h" #include "tscore/ink_args.h" #include "tscore/I_Version.h" -#include "tscore/Tokenizer.h" -#include "tscore/TextBuffer.h" #include "mgmtapi.h" #include #include +#include +#include #include "tscore/Regex.h" /// XXX Use DFA or Regex wrappers? @@ -43,11 +43,11 @@ static AppVersionInfo appVersionInfo; struct VIA { - VIA(const char *t) : title(t), next(nullptr) { memset(viaData, 0, sizeof(viaData)); } + VIA(const char *t) : title(t) {} ~VIA() { delete next; } const char *title; - const char *viaData[128]; - VIA *next; + const char *viaData[128] = {}; // zero initialize + VIA *next= nullptr; }; // Function to get via header table for every field/category in the via header @@ -186,7 +186,7 @@ standardViaLookup(char flag) // Function to print via header static void -printViaHeader(const char *header) +printViaHeader(std::string_view header) { VIA *viaTable = nullptr; VIA *viaEntry = nullptr; @@ -195,22 +195,22 @@ printViaHeader(const char *header) printf("Via Header Details:\n"); // Loop through input via header flags - for (const char *c = header; *c; ++c) { -if ((*c == ':') || (*c == ';')) { + for (char c : header) { +if ((c == ':') || (c == ';')) { isDetail = true; continue; } -if (islower(*c)) { +if (islower(c)) { // Get the via header table delete viaTable; - viaEntry = viaTable = isDetail ? detailViaLookup(*c) : standardViaLookup(*c); + viaEntry = viaTable = isDetail ? detailViaLookup(c) : standardViaLookup(c); } else { // This is a one of the sequence of (uppercase) VIA codes. if (viaEntry) { +unsigned char idx = c; printf("%-55s:", viaEntry->title); -printf("%s\n", viaEntry->viaData[static_cast(*c)] ? viaEntry->viaData[static_cast(*c)] : - "Invalid sequence"); +printf("%s\n", viaEntry->viaData[idx] ? viaEntry->viaData[idx] : "Invalid sequence"); viaEntry = viaEntry->next; } } @@ -220,32 +220,29 @@ printViaHeader(const char *header) // Check validity of via header and then decode it static TSMgmtError -decodeViaHeader(const char *str) +decodeViaHeader(std::string_view text) { - size_t viaHdrLength = strlen(str); - char tmp[viaHdrLength + 2]; - char *Via = tmp; - - memcpy(Via, str, viaHdrLength); - Via[viaHdrLength] = '\0'; // null terminate - // Via header inside square brackets - if (Via[0] == '[' && Via[viaHdrLength - 1] == ']') { -viaHdrLength = viaHdrLength - 2; -Via++; -Via[viaHdrLength] = '\0'; // null terminate the string after trimming + if (!text.empty() && text.front() == '[' && text.back() == ']') { +text.remove_prefix(1); +text.remove_suffix(1); + } + if (text.empty()) { +return TS_ERR_FAIL; } - printf("Via header is [%s], Length is %zu\n", Via, viaHdrLength); + printf("Via header is [%.*s], Length is %zu\n", int(text.size()), text.data(), text.size()); - if (viaHdrLength == 5) { -Via = strcat(Via, " "); // Add one space character before decoding via header -++viaHdrLength; + char extender[6]; + if (text.size() == 5) { // add a trailing space in this case. +memcpy(extender, text.data(), text.size()); +extender[5] = ' '; +text= std::string_view{extender, 6}; } - if (viaHdrLength == 22 || viaHdrLength == 6) { + if (text.size() == 22 || text.size() == 6) { // Decode via header -printViaHeader(Via); +printViaHeader(text); return TS_ERR_OKAY; } // Invalid header size, come out. @@ -269,8 +266,7 @@ filterViaHeader() int i; const char *viaPattern = R"(\[([ucsfpe]+[^\]]+)\])"; // Regex to match via header with in [] which can start with character class ucsfpe - char *viaHeaderString; - char viaHeader[1024]; + std::string line; // Compile PCRE via header pattern compiledReg = pcre_compile(viaPattern, 0, , , nullptr); @@ -281,15 +277,9 @@ filterViaHeader() } // Read all lines from stdin - while (fgets(viaHeader, sizeof(viaHeader), stdin)) { -// Trim new line character and null terminate it -char *newLinePtr = strchr(viaHeader, '\n'); -if
[trafficserver] 01/02: GCC 10 fixes - simple fixes.
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 commit be584052e2ac2b0867e64d3d743f92880ddb696d Author: Alan M. Carroll AuthorDate: Fri May 1 11:53:23 2020 -0500 GCC 10 fixes - simple fixes. --- iocore/cache/P_CacheTest.h | 2 +- proxy/http/HttpTunnel.cc | 4 ++-- src/tscore/Arena.cc| 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iocore/cache/P_CacheTest.h b/iocore/cache/P_CacheTest.h index ba9814e..47f0cfd 100644 --- a/iocore/cache/P_CacheTest.h +++ b/iocore/cache/P_CacheTest.h @@ -44,7 +44,7 @@ struct PinnedDocTable : public Continuation { int remove(CacheKey *key); int cleanup(int event, Event *e); - PinnedDocTable() : Continuation(new_ProxyMutex()) { memset(bucket, 0, sizeof(Queue) * PINNED_DOC_TABLE_SIZE); } + PinnedDocTable() : Continuation(new_ProxyMutex()) { ink_zero(bucket); } }; struct CacheTestHost { diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc index 2b7f820..4fbac85 100644 --- a/proxy/http/HttpTunnel.cc +++ b/proxy/http/HttpTunnel.cc @@ -479,8 +479,8 @@ HttpTunnel::reset() num_producers = 0; num_consumers = 0; - memset(consumers, 0, sizeof(consumers)); - memset(producers, 0, sizeof(producers)); + ink_zero(consumers); + ink_zero(producers); } void diff --git a/src/tscore/Arena.cc b/src/tscore/Arena.cc index 81af84c..e26a20a 100644 --- a/src/tscore/Arena.cc +++ b/src/tscore/Arena.cc @@ -48,8 +48,8 @@ blk_alloc(int size) } blk->next = nullptr; - blk->m_heap_end= >data[size]; - blk->m_water_level = >data[0]; + blk->m_heap_end= blk->data + size; + blk->m_water_level = blk->data; return blk; }
[trafficserver] branch master updated: Update expired test certificates for cert_update
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 287ee46 Update expired test certificates for cert_update 287ee46 is described below commit 287ee468583bbd00fb2b46ae822ba205261bae2f Author: Susan Hinrichs AuthorDate: Mon May 4 20:41:54 2020 + Update expired test certificates for cert_update --- .../pluginTest/cert_update/ssl/client1.pem | 159 ++-- .../pluginTest/cert_update/ssl/client2.pem | 160 ++-- .../pluginTest/cert_update/ssl/server1.pem | 161 +++-- .../pluginTest/cert_update/ssl/server2.pem | 161 +++-- 4 files changed, 322 insertions(+), 319 deletions(-) diff --git a/tests/gold_tests/pluginTest/cert_update/ssl/client1.pem b/tests/gold_tests/pluginTest/cert_update/ssl/client1.pem index 5fda0b3..74dc11e 100644 --- a/tests/gold_tests/pluginTest/cert_update/ssl/client1.pem +++ b/tests/gold_tests/pluginTest/cert_update/ssl/client1.pem @@ -1,83 +1,84 @@ -BEGIN CERTIFICATE- -MIIFXzCCA0egAwIBAgIUQW43tEf3dK2EAUi219sjNioWa8QwDQYJKoZIhvcNAQEL -BQAwPzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAklMMQ8wDQYDVQQKDAZBcGFjaGUx -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iu95WlO/YRhpx7R2N1HZUl32I58wYz9Fx5/0jZoD2mmI/n5NMyA +350Cumf58ESA0WDNp7tDfd4oZZwhn5/Il+iaz9TNVyujMJxMyfLwk/qIAIpFwkXZ +n0ika5T05SdPiAfSoQrx8aI48SjswDmmDrPz0BLbSdP+INDKkG/9Cpc4PG8t7T0m +KxTP1pN7Q3sj7KPu2/XbvVk1GxrDJyONSOEFOaL8x9qqMjM3gDp0wuXOw1p3vS2e +fmSkFYCzF0kiaXiXHkqYihHjqhg0nO2pjUPb/hOKmTlGwA2Aq1AxcYfGCiJf+bpV +jza4rH8vzvRYquxWnftZscpItE8eSnjhsEr56RcydItjo20Y9o4lcZFdqa3MrYe9
[trafficserver] branch master updated (e4dd6b6 -> 4f69131)
This is an automated email from the ASF dual-hosted git repository. rrm pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from e4dd6b6 HttpSM cleaning up non-sense pointer indirection (#6721) add 4f69131 Lua plugin: add ts.server_response.is_cacheable() No new revisions were added by this update. Summary of changes: doc/admin-guide/plugins/lua.en.rst | 10 ++ plugins/lua/ts_lua_server_response.c | 19 +++ 2 files changed, 29 insertions(+)
[trafficserver] branch master updated: HttpSM cleaning up non-sense pointer indirection (#6721)
This is an automated email from the ASF dual-hosted git repository. acanary 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 e4dd6b6 HttpSM cleaning up non-sense pointer indirection (#6721) e4dd6b6 is described below commit e4dd6b6197af6cc1530d05221f59a9fd3a5dee90 Author: a-a-ron AuthorDate: Mon May 4 10:10:53 2020 -0500 HttpSM cleaning up non-sense pointer indirection (#6721) * HttpSM cleaning up non-sense pointer indirection * adding assert to appease clang-analyser --- proxy/http/HttpSM.cc | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 1bf7500..9b47469 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -618,10 +618,10 @@ HttpSM::setup_client_read_request_header() void HttpSM::setup_blind_tunnel_port() { - NetVConnection *netvc = ua_txn->get_netvc(); - SSLNetVConnection *ssl_vc = dynamic_cast(netvc); + NetVConnection *netvc = ua_txn->get_netvc(); + ink_release_assert(netvc); int host_len; - if (ssl_vc) { + if (SSLNetVConnection *ssl_vc = dynamic_cast(netvc)) { if (!t_state.hdr_info.client_request.url_get()->host_get(_len)) { // the URL object has not been created in the start of the transaction. Hence, we need to create the URL here URL u; @@ -638,19 +638,19 @@ HttpSM::setup_blind_tunnel_port() if (ssl_vc->get_tunnel_port() > 0) { t_state.hdr_info.client_request.url_get()->port_set(ssl_vc->get_tunnel_port()); } else { - t_state.hdr_info.client_request.url_get()->port_set(t_state.state_machine->ua_txn->get_netvc()->get_local_port()); + t_state.hdr_info.client_request.url_get()->port_set(netvc->get_local_port()); } } else { t_state.hdr_info.client_request.url_get()->host_set(ssl_vc->get_server_name(), strlen(ssl_vc->get_server_name())); - t_state.hdr_info.client_request.url_get()->port_set(t_state.state_machine->ua_txn->get_netvc()->get_local_port()); + t_state.hdr_info.client_request.url_get()->port_set(netvc->get_local_port()); } } } else { char new_host[INET6_ADDRSTRLEN]; -ats_ip_ntop(t_state.state_machine->ua_txn->get_netvc()->get_local_addr(), new_host, sizeof(new_host)); +ats_ip_ntop(netvc->get_local_addr(), new_host, sizeof(new_host)); t_state.hdr_info.client_request.url_get()->host_set(new_host, strlen(new_host)); - t_state.hdr_info.client_request.url_get()->port_set(t_state.state_machine->ua_txn->get_netvc()->get_local_port()); + t_state.hdr_info.client_request.url_get()->port_set(netvc->get_local_port()); } call_transact_and_set_next_state(HttpTransact::HandleBlindTunnel); } @@ -1468,11 +1468,11 @@ plugins required to work with sni_routing. if (tunnel_port > 0) { t_state.hdr_info.client_request.url_get()->port_set(tunnel_port); } else { - t_state.hdr_info.client_request.url_get()->port_set(t_state.state_machine->ua_txn->get_netvc()->get_local_port()); + t_state.hdr_info.client_request.url_get()->port_set(netvc->get_local_port()); } } else if (ssl_vc) { t_state.hdr_info.client_request.url_get()->host_set(ssl_vc->get_server_name(), strlen(ssl_vc->get_server_name())); - t_state.hdr_info.client_request.url_get()->port_set(t_state.state_machine->ua_txn->get_netvc()->get_local_port()); + t_state.hdr_info.client_request.url_get()->port_set(netvc->get_local_port()); } } // FALLTHROUGH @@ -2189,7 +2189,7 @@ HttpSM::process_hostdb_info(HostDBInfo *r) bool use_client_addr= t_state.http_config_param->use_client_target_addr == 1 && t_state.client_info.is_transparent && t_state.dns_info.os_addr_style == HttpTransact::DNSLookupInfo::OS_Addr::OS_ADDR_TRY_DEFAULT; if (use_client_addr) { -NetVConnection *vc = t_state.state_machine->ua_txn ? t_state.state_machine->ua_txn->get_netvc() : nullptr; +NetVConnection *vc = ua_txn ? ua_txn->get_netvc() : nullptr; if (vc) { client_addr = vc->get_local_addr(); // Regardless of whether the client address matches the DNS record or not, @@ -7339,7 +7339,7 @@ HttpSM::set_next_state() } else if (t_state.http_config_param->use_client_target_addr == 2 && !t_state.url_remap_success && t_state.parent_result.result != PARENT_SPECIFIED && t_state.client_info.is_transparent && t_state.dns_info.os_addr_style == HttpTransact::DNSLookupInfo::OS_Addr::OS_ADDR_TRY_DEFAULT && - ats_is_ip(addr = t_state.state_machine->ua_txn->get_netvc()->get_local_addr())) { + ats_is_ip(addr = ua_txn->get_netvc()->get_local_addr())) { /* If the connection is client side transparent and the URL * was not
[trafficserver] branch master updated (59ff1d8 -> 005b04b)
This is an automated email from the ASF dual-hosted git repository. rrm pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 59ff1d8 Fix ink_endian.h to include an appropriate header file new 35f63f5 python: Remove unnecessary comprehension new d1efcb4 python: Remove unused variables new 2178bcf python: Fix dangerous default argument new 005b04b python: Remove unused imports The 4 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: doc/checkvers.py | 3 +-- doc/conf.py| 2 -- doc/ext/traffic-server.py | 10 +++--- doc/manpages.py| 1 - plugins/experimental/traffic_dump/post_process.py | 2 +- tests/gold_tests/chunked_encoding/chunked_encoding_h2.test.py | 1 - tests/gold_tests/h2/h2active_timeout.py| 2 +- tests/gold_tests/h2/h2chunked.py | 2 +- tests/gold_tests/headers/forwarded.test.py | 1 - .../cache_range_requests/cache_range_requests.test.py | 2 -- .../cache_range_requests/cache_range_requests_cachekey.test.py | 3 --- .../cache_range_requests/cache_range_requests_ims.test.py | 1 - tests/gold_tests/pluginTest/lua/lua_states_stats.test.py | 1 - tests/gold_tests/pluginTest/lua/lua_watermark.test.py | 1 - tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py| 2 -- tests/gold_tests/slow_post/slow_post_client.py | 2 +- tests/gold_tests/tls/tls_verify_override_sni.test.py | 1 - 17 files changed, 12 insertions(+), 25 deletions(-)
[trafficserver] 04/04: python: Remove unused imports
This is an automated email from the ASF dual-hosted git repository. rrm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 005b04bfbaa0381ccf214e4f781f6bf402426de0 Author: Randall Meyer AuthorDate: Fri May 1 19:39:27 2020 + python: Remove unused imports Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> --- doc/checkvers.py | 1 - doc/conf.py| 2 -- doc/manpages.py| 1 - tests/gold_tests/chunked_encoding/chunked_encoding_h2.test.py | 1 - tests/gold_tests/headers/forwarded.test.py | 1 - .../pluginTest/cache_range_requests/cache_range_requests.test.py | 2 -- .../cache_range_requests/cache_range_requests_cachekey.test.py | 3 --- .../pluginTest/cache_range_requests/cache_range_requests_ims.test.py | 1 - tests/gold_tests/pluginTest/lua/lua_states_stats.test.py | 1 - tests/gold_tests/pluginTest/lua/lua_watermark.test.py | 1 - tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py| 2 -- tests/gold_tests/tls/tls_verify_override_sni.test.py | 1 - 12 files changed, 17 deletions(-) diff --git a/doc/checkvers.py b/doc/checkvers.py index cf1f841..30d61cd 100644 --- a/doc/checkvers.py +++ b/doc/checkvers.py @@ -15,7 +15,6 @@ # limitations under the License. import sys -import os if __name__ == '__main__': # Use optparse instead of argparse because this needs to work on old Python versions. diff --git a/doc/conf.py b/doc/conf.py index f1f5112..e9842fb 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -38,8 +38,6 @@ from sphinx import version_info sys.path.insert(0, os.path.abspath('ext')) sys.path.insert(0, os.path.abspath('.')) -from manpages import man_pages - # -- General configuration - # Add any Sphinx extension module names here, as strings. They can be extensions diff --git a/doc/manpages.py b/doc/manpages.py index 0e38f10..9e6cc44 100644 --- a/doc/manpages.py +++ b/doc/manpages.py @@ -14,7 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import sys import os man_pages = [ diff --git a/tests/gold_tests/chunked_encoding/chunked_encoding_h2.test.py b/tests/gold_tests/chunked_encoding/chunked_encoding_h2.test.py index d5022c0..96af641 100644 --- a/tests/gold_tests/chunked_encoding/chunked_encoding_h2.test.py +++ b/tests/gold_tests/chunked_encoding/chunked_encoding_h2.test.py @@ -16,7 +16,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os Test.Summary = ''' Test interaction of H2 and chunked encoding ''' diff --git a/tests/gold_tests/headers/forwarded.test.py b/tests/gold_tests/headers/forwarded.test.py index 87ceeda..d2d0347 100644 --- a/tests/gold_tests/headers/forwarded.test.py +++ b/tests/gold_tests/headers/forwarded.test.py @@ -18,7 +18,6 @@ Test the Forwarded header and related configuration.. # limitations under the License. import os -import ports Test.Summary = ''' Test FORWARDED header. diff --git a/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests.test.py b/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests.test.py index 5806f14..9b0f487 100644 --- a/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests.test.py +++ b/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests.test.py @@ -16,8 +16,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os - Test.Summary = ''' Basic cache_range_requests plugin test ''' diff --git a/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_cachekey.test.py b/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_cachekey.test.py index 2622694..bee7363 100644 --- a/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_cachekey.test.py +++ b/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_cachekey.test.py @@ -16,9 +16,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os -import time - Test.Summary = ''' cache_range_requests with cachekey ''' diff --git a/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_ims.test.py b/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_ims.test.py index 3c9c281..3d019db 100644 --- a/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_ims.test.py +++ b/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_ims.test.py @@ -16,7
[trafficserver] 02/04: python: Remove unused variables
This is an automated email from the ASF dual-hosted git repository. rrm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit d1efcb490c3db090e11f7721006be5362fe52c89 Author: Randall Meyer AuthorDate: Fri May 1 19:13:19 2020 + python: Remove unused variables Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> --- doc/ext/traffic-server.py | 4 ++-- plugins/experimental/traffic_dump/post_process.py | 2 +- tests/gold_tests/h2/h2active_timeout.py | 2 +- tests/gold_tests/h2/h2chunked.py | 2 +- tests/gold_tests/slow_post/slow_post_client.py| 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/ext/traffic-server.py b/doc/ext/traffic-server.py index 922c8ad..384c297 100644 --- a/doc/ext/traffic-server.py +++ b/doc/ext/traffic-server.py @@ -117,7 +117,7 @@ class TSConfVar(std.Target): title.set_class(self.options.get('class')) # This has to be a distinct node before the title. if nested then # the browser will scroll forward to just past the title. -anchor = nodes.target('', '', names=[cv_name]) +nodes.target('', '', names=[cv_name]) # Second (optional) arg is 'msgNode' - no idea what I should pass for that # or if it even matters, although I now think it should not be used. self.state.document.note_explicit_target(title) @@ -241,7 +241,7 @@ class TSStat(std.Target): # This has to be a distinct node before the title. if nested then # the browser will scroll forward to just past the title. -anchor = nodes.target('', '', names=[stat_name]) +nodes.target('', '', names=[stat_name]) # Second (optional) arg is 'msgNode' - no idea what I should pass for that # or if it even matters, although I now think it should not be used. self.state.document.note_explicit_target(title) diff --git a/plugins/experimental/traffic_dump/post_process.py b/plugins/experimental/traffic_dump/post_process.py index d2dbe96..42f76d8 100755 --- a/plugins/experimental/traffic_dump/post_process.py +++ b/plugins/experimental/traffic_dump/post_process.py @@ -387,7 +387,7 @@ def main(): nthreads = min(max(subdir_q.qsize(), 1), args.num_threads) # Start up the threads. -for i in range(nthreads): +for _ in range(nthreads): t = Thread(target=post_process, args=(args.in_dir, subdir_q, args.out_dir, args.num_sessions, args.no_human_readable, diff --git a/tests/gold_tests/h2/h2active_timeout.py b/tests/gold_tests/h2/h2active_timeout.py index 0b7d5ac..aa79cb1 100644 --- a/tests/gold_tests/h2/h2active_timeout.py +++ b/tests/gold_tests/h2/h2active_timeout.py @@ -32,7 +32,7 @@ def makerequest(port): active_timeout = 3 request_interval = 0.1 loop_cnt = int((active_timeout + 2) / request_interval) -for i in range(loop_cnt): +for _ in range(loop_cnt): try: conn.request('GET', '/') time.sleep(request_interval) diff --git a/tests/gold_tests/h2/h2chunked.py b/tests/gold_tests/h2/h2chunked.py index 97938ec..a7fee07 100644 --- a/tests/gold_tests/h2/h2chunked.py +++ b/tests/gold_tests/h2/h2chunked.py @@ -41,7 +41,7 @@ def makerequest(port, _url): sites = {'/'} request_ids = [] -for site in sites: +for _ in sites: request_id = conn.request('GET', url=_url) request_ids.append(request_id) diff --git a/tests/gold_tests/slow_post/slow_post_client.py b/tests/gold_tests/slow_post/slow_post_client.py index a132a67..47fb4b4 100644 --- a/tests/gold_tests/slow_post/slow_post_client.py +++ b/tests/gold_tests/slow_post/slow_post_client.py @@ -34,7 +34,7 @@ def slow_post(port, slow_time): def makerequest(port, connection_limit): client_timeout = 3 -for i in range(connection_limit): +for _ in range(connection_limit): t = threading.Thread(target=slow_post, args=(port, client_timeout + 10)) t.daemon = True t.start()
[trafficserver] 03/04: python: Fix dangerous default argument
This is an automated email from the ASF dual-hosted git repository. rrm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 2178bcfe3ac87eeec35be7ca648da224162b7f65 Author: Randall Meyer AuthorDate: Fri May 1 19:15:21 2020 + python: Fix dangerous default argument Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> --- doc/ext/traffic-server.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/ext/traffic-server.py b/doc/ext/traffic-server.py index 384c297..72e236e 100644 --- a/doc/ext/traffic-server.py +++ b/doc/ext/traffic-server.py @@ -389,7 +389,7 @@ git_branch = subprocess.check_output(['git', '--git-dir', REPO_GIT_DIR, 'rev-parse', '--abbrev-ref', 'HEAD']) -def make_github_link(name, rawtext, text, lineno, inliner, options={}, content=[]): +def make_github_link(name, rawtext, text, lineno, inliner, options=None, content=None): """ This docutils role lets us link to source code via the handy :ts:git: markup. Link references are rooted at the top level source directory. All links resolve @@ -405,6 +405,10 @@ def make_github_link(name, rawtext, text, lineno, inliner, options={}, content=[ If you want to contribute, take a look at :ts:git:`CONTRIBUTING.md`. """ +if options is None: +options = {} +if content is None: +content = [] url = 'https://github.com/apache/trafficserver/blob/{}/{}' ref = autoconf_version if autoconf_version == git_branch else 'master' node = nodes.reference(rawtext, text, refuri=url.format(ref, text), **options)
[trafficserver] 01/04: python: Remove unnecessary comprehension
This is an automated email from the ASF dual-hosted git repository. rrm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 35f63f5c3a1d4cc95921459725eeb6498bd678b3 Author: Randall Meyer AuthorDate: Fri May 1 19:19:58 2020 + python: Remove unnecessary comprehension Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> --- doc/checkvers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/checkvers.py b/doc/checkvers.py index e16e7e4..cf1f841 100644 --- a/doc/checkvers.py +++ b/doc/checkvers.py @@ -29,7 +29,7 @@ if __name__ == '__main__': # Check whether we have the required version of sphinx. if options.checkvers: min_sphinx_version_info = (1,7,5) -min_sphinx_version = '.'.join([str(x) for x in min_sphinx_version_info]) +min_sphinx_version = '.'.join(str(x) for x in min_sphinx_version_info) print('checking for sphinx version >= {0}... '.format(min_sphinx_version), end="") # Need at least 1.5.1 to use svg