You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2016/09/12 18:11:13 UTC
[trafficserver] branch master updated (fdfb8c1 -> 8b9940a)
This is an automated email from the ASF dual-hosted git repository.
jpeach pushed a change to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git.
from fdfb8c1 Merge pull request #1008 from persiaAziz/TS-4263
new d9ea53a Tidy up some comments and whitespace.
new 8b9940a Improve clang-format for static arrays.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
Summary of changes:
iocore/net/SSLUtils.cc | 16 +++++---
proxy/hdrs/HdrToken.cc | 109 ++++++++++++++++++++++++++-----------------------
2 files changed, 67 insertions(+), 58 deletions(-)
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].
[trafficserver] 02/02: Improve clang-format for static arrays.
Posted by jp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jpeach pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit 8b9940addd8297fe94580104578c9150ef87ef4d
Author: James Peach <jp...@apache.org>
AuthorDate: Mon Sep 12 10:53:09 2016 -0700
Improve clang-format for static arrays.
---
proxy/hdrs/HdrToken.cc | 109 ++++++++++++++++++++++++++-----------------------
1 file changed, 57 insertions(+), 52 deletions(-)
diff --git a/proxy/hdrs/HdrToken.cc b/proxy/hdrs/HdrToken.cc
index d55f1e5..56a1c0d 100644
--- a/proxy/hdrs/HdrToken.cc
+++ b/proxy/hdrs/HdrToken.cc
@@ -107,56 +107,59 @@ static const char *_hdrtoken_strs[] = {
"CONNECT", "DELETE", "GET", "POST", "HEAD", "ICP_QUERY", "OPTIONS", "PURGE", "PUT", "TRACE", "PUSH",
// Header extensions
- "X-ID", "X-Forwarded-For", "TE", "Strict-Transport-Security", "100-continue"};
-
-static HdrTokenTypeBinding _hdrtoken_strs_type_initializers[] = {{"file", HDRTOKEN_TYPE_SCHEME},
- {"ftp", HDRTOKEN_TYPE_SCHEME},
- {"gopher", HDRTOKEN_TYPE_SCHEME},
- {"http", HDRTOKEN_TYPE_SCHEME},
- {"https", HDRTOKEN_TYPE_SCHEME},
- {"mailto", HDRTOKEN_TYPE_SCHEME},
- {"news", HDRTOKEN_TYPE_SCHEME},
- {"nntp", HDRTOKEN_TYPE_SCHEME},
- {"prospero", HDRTOKEN_TYPE_SCHEME},
- {"telnet", HDRTOKEN_TYPE_SCHEME},
- {"tunnel", HDRTOKEN_TYPE_SCHEME},
- {"wais", HDRTOKEN_TYPE_SCHEME},
- {"pnm", HDRTOKEN_TYPE_SCHEME},
- {"rtsp", HDRTOKEN_TYPE_SCHEME},
- {"rtspu", HDRTOKEN_TYPE_SCHEME},
- {"mms", HDRTOKEN_TYPE_SCHEME},
- {"mmsu", HDRTOKEN_TYPE_SCHEME},
- {"mmst", HDRTOKEN_TYPE_SCHEME},
- {"wss", HDRTOKEN_TYPE_SCHEME},
- {"ws", HDRTOKEN_TYPE_SCHEME},
-
- {"CONNECT", HDRTOKEN_TYPE_METHOD},
- {"DELETE", HDRTOKEN_TYPE_METHOD},
- {"GET", HDRTOKEN_TYPE_METHOD},
- {"HEAD", HDRTOKEN_TYPE_METHOD},
- {"ICP_QUERY", HDRTOKEN_TYPE_METHOD},
- {"OPTIONS", HDRTOKEN_TYPE_METHOD},
- {"POST", HDRTOKEN_TYPE_METHOD},
- {"PURGE", HDRTOKEN_TYPE_METHOD},
- {"PUT", HDRTOKEN_TYPE_METHOD},
- {"TRACE", HDRTOKEN_TYPE_METHOD},
- {"PUSH", HDRTOKEN_TYPE_METHOD},
-
- {"max-age", HDRTOKEN_TYPE_CACHE_CONTROL},
- {"max-stale", HDRTOKEN_TYPE_CACHE_CONTROL},
- {"min-fresh", HDRTOKEN_TYPE_CACHE_CONTROL},
- {"must-revalidate", HDRTOKEN_TYPE_CACHE_CONTROL},
- {"no-cache", HDRTOKEN_TYPE_CACHE_CONTROL},
- {"no-store", HDRTOKEN_TYPE_CACHE_CONTROL},
- {"no-transform", HDRTOKEN_TYPE_CACHE_CONTROL},
- {"only-if-cached", HDRTOKEN_TYPE_CACHE_CONTROL},
- {"private", HDRTOKEN_TYPE_CACHE_CONTROL},
- {"proxy-revalidate", HDRTOKEN_TYPE_CACHE_CONTROL},
- {"public", HDRTOKEN_TYPE_CACHE_CONTROL},
- {"s-maxage", HDRTOKEN_TYPE_CACHE_CONTROL},
- {"need-revalidate-once", HDRTOKEN_TYPE_CACHE_CONTROL},
-
- {(char *)NULL, (HdrTokenType)0}};
+ "X-ID", "X-Forwarded-For", "TE", "Strict-Transport-Security", "100-continue",
+};
+
+static HdrTokenTypeBinding _hdrtoken_strs_type_initializers[] = {
+ {"file", HDRTOKEN_TYPE_SCHEME},
+ {"ftp", HDRTOKEN_TYPE_SCHEME},
+ {"gopher", HDRTOKEN_TYPE_SCHEME},
+ {"http", HDRTOKEN_TYPE_SCHEME},
+ {"https", HDRTOKEN_TYPE_SCHEME},
+ {"mailto", HDRTOKEN_TYPE_SCHEME},
+ {"news", HDRTOKEN_TYPE_SCHEME},
+ {"nntp", HDRTOKEN_TYPE_SCHEME},
+ {"prospero", HDRTOKEN_TYPE_SCHEME},
+ {"telnet", HDRTOKEN_TYPE_SCHEME},
+ {"tunnel", HDRTOKEN_TYPE_SCHEME},
+ {"wais", HDRTOKEN_TYPE_SCHEME},
+ {"pnm", HDRTOKEN_TYPE_SCHEME},
+ {"rtsp", HDRTOKEN_TYPE_SCHEME},
+ {"rtspu", HDRTOKEN_TYPE_SCHEME},
+ {"mms", HDRTOKEN_TYPE_SCHEME},
+ {"mmsu", HDRTOKEN_TYPE_SCHEME},
+ {"mmst", HDRTOKEN_TYPE_SCHEME},
+ {"wss", HDRTOKEN_TYPE_SCHEME},
+ {"ws", HDRTOKEN_TYPE_SCHEME},
+
+ {"CONNECT", HDRTOKEN_TYPE_METHOD},
+ {"DELETE", HDRTOKEN_TYPE_METHOD},
+ {"GET", HDRTOKEN_TYPE_METHOD},
+ {"HEAD", HDRTOKEN_TYPE_METHOD},
+ {"ICP_QUERY", HDRTOKEN_TYPE_METHOD},
+ {"OPTIONS", HDRTOKEN_TYPE_METHOD},
+ {"POST", HDRTOKEN_TYPE_METHOD},
+ {"PURGE", HDRTOKEN_TYPE_METHOD},
+ {"PUT", HDRTOKEN_TYPE_METHOD},
+ {"TRACE", HDRTOKEN_TYPE_METHOD},
+ {"PUSH", HDRTOKEN_TYPE_METHOD},
+
+ {"max-age", HDRTOKEN_TYPE_CACHE_CONTROL},
+ {"max-stale", HDRTOKEN_TYPE_CACHE_CONTROL},
+ {"min-fresh", HDRTOKEN_TYPE_CACHE_CONTROL},
+ {"must-revalidate", HDRTOKEN_TYPE_CACHE_CONTROL},
+ {"no-cache", HDRTOKEN_TYPE_CACHE_CONTROL},
+ {"no-store", HDRTOKEN_TYPE_CACHE_CONTROL},
+ {"no-transform", HDRTOKEN_TYPE_CACHE_CONTROL},
+ {"only-if-cached", HDRTOKEN_TYPE_CACHE_CONTROL},
+ {"private", HDRTOKEN_TYPE_CACHE_CONTROL},
+ {"proxy-revalidate", HDRTOKEN_TYPE_CACHE_CONTROL},
+ {"public", HDRTOKEN_TYPE_CACHE_CONTROL},
+ {"s-maxage", HDRTOKEN_TYPE_CACHE_CONTROL},
+ {"need-revalidate-once", HDRTOKEN_TYPE_CACHE_CONTROL},
+
+ {(char *)NULL, (HdrTokenType)0},
+};
static HdrTokenFieldInfo _hdrtoken_strs_field_initializers[] = {
{"Accept", MIME_SLOTID_ACCEPT, MIME_PRESENCE_ACCEPT, (HTIF_COMMAS | HTIF_MULTVALS)},
@@ -233,7 +236,8 @@ static HdrTokenFieldInfo _hdrtoken_strs_field_initializers[] = {
{"X-Forwarded-For", MIME_SLOTID_NONE, MIME_PRESENCE_NONE, (HTIF_COMMAS | HTIF_MULTVALS)},
{"Sec-WebSocket-Key", MIME_SLOTID_NONE, MIME_PRESENCE_NONE, HTIF_NONE},
{"Sec-WebSocket-Version", MIME_SLOTID_NONE, MIME_PRESENCE_NONE, HTIF_NONE},
- {NULL, 0, 0, 0}};
+ {NULL, 0, 0, 0},
+};
const char *_hdrtoken_strs_heap_f = NULL; // storage first byte
const char *_hdrtoken_strs_heap_l = NULL; // storage last byte
@@ -348,7 +352,8 @@ static const char *_hdrtoken_commonly_tokenized_strs[] = {
"CONNECT", "DELETE", "GET", "POST", "HEAD", "ICP_QUERY", "OPTIONS", "PURGE", "PUT", "TRACE", "PUSH",
// Header extensions
- "X-ID", "X-Forwarded-For", "TE", "Strict-Transport-Security", "100-continue"};
+ "X-ID", "X-Forwarded-For", "TE", "Strict-Transport-Security", "100-continue",
+};
/*-------------------------------------------------------------------------
-------------------------------------------------------------------------*/
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.
[trafficserver] 01/02: Tidy up some comments and whitespace.
Posted by jp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jpeach pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
commit d9ea53a77468cbcdc366b82845ccef66e8967cfc
Author: James Peach <jp...@apache.org>
AuthorDate: Mon Sep 12 10:24:00 2016 -0700
Tidy up some comments and whitespace.
---
iocore/net/SSLUtils.cc | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
index 3bc3d2a..efda793 100644
--- a/iocore/net/SSLUtils.cc
+++ b/iocore/net/SSLUtils.cc
@@ -2053,14 +2053,16 @@ SSLParseCertificateConfiguration(const SSLConfigParams *params, SSLCertLookup *l
const matcher_tags sslCertTags = {NULL, NULL, NULL, NULL, NULL, NULL, false};
- // load the global ticket key for later use
+ // Load the global ticket key for later use.
REC_ReadConfigStringAlloc(ticket_key_filename, "proxy.config.ssl.server.ticket_key.filename");
+
if (ticket_key_filename != NULL) {
ats_scoped_str ticket_key_path(Layout::relative_to(params->serverCertPathOnly, ticket_key_filename));
- global_default_keyblock = ssl_create_ticket_keyblock(ticket_key_path); // this function just returns a keyblock
+ global_default_keyblock = ssl_create_ticket_keyblock(ticket_key_path);
} else {
- global_default_keyblock = ssl_create_ticket_keyblock(NULL); // this function just returns a keyblock
+ global_default_keyblock = ssl_create_ticket_keyblock(NULL);
}
+
Note("loading SSL certificate configuration from %s", params->configFilePath);
if (params->configFilePath) {
@@ -2072,16 +2074,17 @@ SSLParseCertificateConfiguration(const SSLConfigParams *params, SSLCertLookup *l
return false;
}
- // elevate/allow file access to root read only files/certs
+ // Optionally elevate/allow file access to read root-only
+ // certificates. The destructor will drop privilege for us.
uint32_t elevate_setting = 0;
REC_ReadConfigInteger(elevate_setting, "proxy.config.ssl.cert.load_elevated");
- ElevateAccess elevate_access(elevate_setting ? ElevateAccess::FILE_PRIVILEGE : 0); // destructor will demote for us
+ ElevateAccess elevate_access(elevate_setting ? ElevateAccess::FILE_PRIVILEGE : 0);
line = tokLine(file_buf, &tok_state);
while (line != NULL) {
line_num++;
- // skip all blank spaces at beginning of line
+ // Skip all blank spaces at beginning of line.
while (*line && isspace(*line)) {
line++;
}
@@ -2116,6 +2119,7 @@ SSLParseCertificateConfiguration(const SSLConfigParams *params, SSLCertLookup *l
return false;
}
}
+
return true;
}
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.