You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/07/25 17:56:40 UTC
[trafficserver] branch 7.1.x updated (af97af4 -> 95d120d)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a change to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.
from af97af4 Added Changelog for 7.1.0 release
new 41e4e39 Can't convert Cache Result to Cache MISS by TSHttpTxnCacheLookupStatusSet
new 103c37c ua_buffer_reader should be released in deallocate_redirect_postdata_buffers
new 102e2d6 Be less aggressive in calling SSL_shutdown.
new 78fb420 Fixed debug build on Fedora 26 with gcc7
new 95d120d Prevent HSTS headers from including the terminating null byte.
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:
iocore/net/P_UnixNet.h | 2 ++
iocore/net/SSLNetVConnection.cc | 6 +++++-
iocore/net/Socks.cc | 1 +
proxy/http/HttpSM.cc | 9 ++++++---
proxy/http/HttpTransact.cc | 4 ++--
proxy/http/HttpTransactHeaders.cc | 8 ++++----
proxy/http/HttpTunnel.cc | 11 ++++++++++-
7 files changed, 30 insertions(+), 11 deletions(-)
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].
[trafficserver] 01/05: Can't convert Cache Result to Cache MISS by
TSHttpTxnCacheLookupStatusSet
Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 41e4e39fc3610169fcef1688095045769e34fdf8
Author: scw00 <61...@qq.com>
AuthorDate: Fri May 5 19:30:55 2017 +0800
Can't convert Cache Result to Cache MISS by TSHttpTxnCacheLookupStatusSet
(cherry picked from commit c7fdf6e2655be9e9ea5a22657a8067f0236b53d1)
---
proxy/http/HttpSM.cc | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 1ec919d..6f8ec01 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -1608,11 +1608,13 @@ HttpSM::handle_api_return()
case HttpTransact::SM_ACTION_API_POST_REMAP:
case HttpTransact::SM_ACTION_API_READ_REQUEST_HDR:
case HttpTransact::SM_ACTION_API_OS_DNS:
- case HttpTransact::SM_ACTION_API_READ_CACHE_HDR:
case HttpTransact::SM_ACTION_API_READ_RESPONSE_HDR:
+ call_transact_and_set_next_state(nullptr);
+ return;
+
case HttpTransact::SM_ACTION_API_CACHE_LOOKUP_COMPLETE:
- if (t_state.api_next_action == HttpTransact::SM_ACTION_API_CACHE_LOOKUP_COMPLETE && t_state.api_cleanup_cache_read &&
- t_state.api_update_cached_object != HttpTransact::UPDATE_CACHED_OBJECT_PREPARE) {
+ case HttpTransact::SM_ACTION_API_READ_CACHE_HDR:
+ if (t_state.api_cleanup_cache_read && t_state.api_update_cached_object != HttpTransact::UPDATE_CACHED_OBJECT_PREPARE) {
t_state.api_cleanup_cache_read = false;
t_state.cache_info.object_read = nullptr;
t_state.request_sent_time = UNDEFINED_TIME;
@@ -1620,6 +1622,7 @@ HttpSM::handle_api_return()
cache_sm.close_read();
transform_cache_sm.close_read();
}
+
call_transact_and_set_next_state(nullptr);
return;
case HttpTransact::SM_ACTION_API_SEND_REQUEST_HDR:
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.
[trafficserver] 05/05: Prevent HSTS headers from including the
terminating null byte.
Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 95d120d1736d7786381a1826c90b6c4b5389d231
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Thu Jul 20 21:03:20 2017 -0500
Prevent HSTS headers from including the terminating null byte.
(cherry picked from commit 1c9af58d8eff2ad4b9ed042d98af52d16d86dfb2)
---
proxy/http/HttpTransactHeaders.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/proxy/http/HttpTransactHeaders.cc b/proxy/http/HttpTransactHeaders.cc
index db49bee..555e438 100644
--- a/proxy/http/HttpTransactHeaders.cc
+++ b/proxy/http/HttpTransactHeaders.cc
@@ -842,8 +842,8 @@ void
HttpTransactHeaders::insert_hsts_header_in_response(HttpTransact::State *s, HTTPHdr *header)
{
char new_hsts_string[64];
- char *hsts_string = new_hsts_string;
- const char include_subdomains[] = "; includeSubDomains";
+ char *hsts_string = new_hsts_string;
+ constexpr char include_subdomains[] = "; includeSubDomains";
// add max-age
int length = snprintf(new_hsts_string, sizeof(new_hsts_string), "max-age=%" PRId64, s->txn_conf->proxy_response_hsts_max_age);
@@ -851,8 +851,8 @@ HttpTransactHeaders::insert_hsts_header_in_response(HttpTransact::State *s, HTTP
// add include subdomain if set
if (s->txn_conf->proxy_response_hsts_include_subdomains) {
hsts_string += length;
- memcpy(hsts_string, include_subdomains, sizeof(include_subdomains));
- length += sizeof(include_subdomains);
+ memcpy(hsts_string, include_subdomains, sizeof(include_subdomains) - 1);
+ length += sizeof(include_subdomains) - 1;
}
header->value_set(MIME_FIELD_STRICT_TRANSPORT_SECURITY, MIME_LEN_STRICT_TRANSPORT_SECURITY, new_hsts_string, length);
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.
[trafficserver] 04/05: Fixed debug build on Fedora 26 with gcc7
Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 78fb420fda1aef3dd5c9a8f3559da12b0928d45d
Author: Bryan Call <bc...@apache.org>
AuthorDate: Mon Jul 17 10:42:14 2017 +0200
Fixed debug build on Fedora 26 with gcc7
(cherry picked from commit c816a80483416c9d1a9bc0864a79b61db2c51ed1)
---
iocore/net/P_UnixNet.h | 2 ++
iocore/net/Socks.cc | 1 +
proxy/http/HttpTransact.cc | 4 ++--
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/iocore/net/P_UnixNet.h b/iocore/net/P_UnixNet.h
index f514ce8..ab8fa3b 100644
--- a/iocore/net/P_UnixNet.h
+++ b/iocore/net/P_UnixNet.h
@@ -357,6 +357,7 @@ accept_error_seriousness(int res)
#endif
ink_assert(!"throttling misconfigured: set too high");
#ifdef ENOBUFS
+ // fallthrough
case -ENOBUFS:
#endif
#ifdef ENFILE
@@ -468,6 +469,7 @@ EventIO::close()
switch (type) {
default:
ink_assert(!"case");
+ // fallthrough
case EVENTIO_DNS_CONNECTION:
return data.dnscon->close();
break;
diff --git a/iocore/net/Socks.cc b/iocore/net/Socks.cc
index 331914a..4547140 100644
--- a/iocore/net/Socks.cc
+++ b/iocore/net/Socks.cc
@@ -119,6 +119,7 @@ SocksEntry::findServer()
default:
ink_assert(!"Unexpected event");
+ // fallthrough
case PARENT_DIRECT:
case PARENT_FAIL:
memset(&server_addr, 0, sizeof(server_addr));
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 9acb881..daf2e39 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -5170,7 +5170,7 @@ HttpTransact::get_ka_info_from_config(State *s, ConnectionAttributes *server_inf
default:
// The default is the "1" config, SEND_HTTP11_ALWAYS, but assert in debug builds since we shouldn't be here
ink_assert(0);
- // FALL THROUGH in a release build
+ // fallthrough
case HttpConfigParams::SEND_HTTP11_ALWAYS:
server_info->http_version = HTTPVersion(1, 1);
break;
@@ -5213,7 +5213,7 @@ HttpTransact::get_ka_info_from_host_db(State *s, ConnectionAttributes *server_in
default:
// The default is the "1" config, SEND_HTTP11_ALWAYS, but assert in debug builds since we shouldn't be here
ink_assert(0);
- // FALL THROUGH in a release build
+ // fallthrough
case HttpConfigParams::SEND_HTTP11_ALWAYS:
force_http11 = true;
break;
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.
[trafficserver] 02/05: ua_buffer_reader should be released in
deallocate_redirect_postdata_buffers
Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 103c37c6280a47867f8198618e71a637f4a16a0f
Author: scw00 <61...@qq.com>
AuthorDate: Tue Jun 13 12:53:37 2017 +0800
ua_buffer_reader should be released in deallocate_redirect_postdata_buffers
(cherry picked from commit 86d73858922f7c22a9bde51dd16a0a434f66aa8d)
---
proxy/http/HttpTunnel.cc | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc
index eb4b1dd..d9fc59d 100644
--- a/proxy/http/HttpTunnel.cc
+++ b/proxy/http/HttpTunnel.cc
@@ -589,8 +589,8 @@ HttpTunnel::kill_tunnel()
ink_assert(producer.alive == false);
}
active = false;
- this->deallocate_buffers();
this->deallocate_redirect_postdata_buffers();
+ this->deallocate_buffers();
this->reset();
}
@@ -630,6 +630,9 @@ HttpTunnel::deallocate_buffers()
for (auto &producer : producers) {
if (producer.read_buffer != nullptr) {
ink_assert(producer.vc != nullptr);
+ if (postbuf && postbuf->ua_buffer_reader && postbuf->ua_buffer_reader->mbuf == producer.read_buffer) {
+ postbuf->ua_buffer_reader = nullptr;
+ }
free_MIOBuffer(producer.read_buffer);
producer.read_buffer = nullptr;
producer.buffer_start = nullptr;
@@ -1758,6 +1761,12 @@ HttpTunnel::deallocate_redirect_postdata_buffers()
postbuf->postdata_copy_buffer = nullptr;
postbuf->postdata_copy_buffer_start = nullptr; // deallocated by the buffer
}
+
+ if (postbuf->ua_buffer_reader != nullptr) {
+ postbuf->ua_buffer_reader->mbuf->dealloc_reader(postbuf->ua_buffer_reader);
+ postbuf->ua_buffer_reader = nullptr;
+ }
+
delete postbuf;
postbuf = nullptr;
}
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.
[trafficserver] 03/05: Be less aggressive in calling SSL_shutdown.
Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 102e2d64bae32f4fdeb5a8d4a9ac6730559d30d9
Author: Susan Hinrichs <sh...@ieee.org>
AuthorDate: Wed Jun 28 23:41:59 2017 +0000
Be less aggressive in calling SSL_shutdown.
(cherry picked from commit 0ab449a87126b025991d47ca5433bd3eae93a2d2)
---
iocore/net/SSLNetVConnection.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 57d7cbd..e510d84 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -848,7 +848,11 @@ SSLNetVConnection::do_io_close(int lerrno)
char c;
ssize_t x = recv(this->con.fd, &c, 1, MSG_PEEK);
// x < 0 means error. x == 0 means fin sent
- if (x != 0) {
+ bool do_shutdown = (x > 0);
+ if (x < 0) {
+ do_shutdown = (errno == EAGAIN || errno == EWOULDBLOCK);
+ }
+ if (do_shutdown) {
// Send the close-notify
int ret = SSL_shutdown(ssl);
Debug("ssl-shutdown", "SSL_shutdown %s", (ret) ? "success" : "failed");
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.