You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2015/07/19 16:14:44 UTC
[4/8] trafficserver git commit: TS-974: Partial Object Caching.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/Crash.cc
----------------------------------------------------------------------
diff --git a/proxy/Crash.cc b/proxy/Crash.cc
index 0febbea..b389cbf 100644
--- a/proxy/Crash.cc
+++ b/proxy/Crash.cc
@@ -27,7 +27,8 @@
#include "signals.h"
#include "ink_cap.h"
-// ucontext.h is deprecated on Darwin, and we really only need it on Linux, so only
+// ucontext.h is deprecated on Darwin, and we really only need it on Linux, so
+// only
// include it if we are planning to use it.
#if defined(__linux__)
#include <ucontext.h>
@@ -93,7 +94,8 @@ crash_logger_init()
return;
}
- // By this point, we have an absolute path, so we'd better be able to find the basename.
+ // By this point, we have an absolute path, so we'd better be able to find the
+ // basename.
basename = strrchr(logger, '/') + 1;
socketpair(AF_UNIX, SOCK_STREAM, 0, pipe);
@@ -150,8 +152,10 @@ crash_logger_invoke(int signo, siginfo_t *info, void *ctx)
kill(crash_logger_pid, SIGCONT);
#if defined(__linux__)
- // Write the crashing thread information to the crash logger. While the siginfo_t is blesses by POSIX, the
- // ucontext_t can contain pointers, so it's highly platform dependent. On Linux with glibc, however, it is
+ // Write the crashing thread information to the crash logger. While the
+ // siginfo_t is blesses by POSIX, the
+ // ucontext_t can contain pointers, so it's highly platform dependent. On
+ // Linux with glibc, however, it is
// a single memory block that we can just puke out.
ATS_UNUSED_RETURN(write(crash_logger_fd, info, sizeof(siginfo_t)));
ATS_UNUSED_RETURN(write(crash_logger_fd, (ucontext_t *)ctx, sizeof(ucontext_t)));
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/DynamicStats.h
----------------------------------------------------------------------
diff --git a/proxy/DynamicStats.h b/proxy/DynamicStats.h
index 50ba1a4..41c3883 100644
--- a/proxy/DynamicStats.h
+++ b/proxy/DynamicStats.h
@@ -34,16 +34,20 @@ _D(cluster_connections_open_stat)
_D(cluster_connections_openned_stat)
_D(cluster_con_total_time_stat)
_D(cluster_ctrl_msgs_sent_stat)
-_D(cluster_slow_ctrl_msgs_sent_stat) // fast ctrl messages do not require a mallo
+_D(cluster_slow_ctrl_msgs_sent_stat) // fast ctrl messages do not require a
+ // mallo
_D(cluster_ctrl_msgs_recvd_stat)
_D(cluster_slow_ctrl_msgs_recvd_stat)
_D(cluster_ctrl_msgs_send_time_stat)
_D(cluster_ctrl_msgs_recv_time_stat)
_D(cluster_read_bytes_stat)
_D(cluster_write_bytes_stat)
-_D(cluster_op_delayed_for_lock_stat) // a message to a machine was blocked by a locked connection
-_D(cluster_connections_locked_stat) // a connection could not use its slot (locked)
-_D(cluster_connections_bumped_stat) // a connection could not get a slot (scheduled too late)
+_D(cluster_op_delayed_for_lock_stat) // a message to a machine was blocked by a
+ // locked connection
+_D(cluster_connections_locked_stat) // a connection could not use its slot
+ // (locked)
+_D(cluster_connections_bumped_stat) // a connection could not get a slot
+ // (scheduled too late)
_D(cluster_nodes_stat)
_D(cluster_net_backup_stat)
_D(cluster_machines_allocated_stat)
@@ -92,7 +96,6 @@ _D(cluster_vc_cache_scan_lock_misses_stat)
_D(cluster_vc_cache_purges_stat)
_D(cluster_write_lock_misses_stat)
-
//
// Dynamic Load Shedding Stats
//
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/EventName.cc
----------------------------------------------------------------------
diff --git a/proxy/EventName.cc b/proxy/EventName.cc
index 5820236..8e81294 100644
--- a/proxy/EventName.cc
+++ b/proxy/EventName.cc
@@ -21,7 +21,6 @@
limitations under the License.
*/
-
#include "ink_config.h"
#include <stdio.h>
#include <string.h>
@@ -76,7 +75,6 @@ event_int_to_string(int event, int blen, char *buffer)
case NET_EVENT_ACCEPT_FAILED:
return "NET_EVENT_ACCEPT_FAILED";
-
#ifdef CLUSTER_CACHE
case CLUSTER_EVENT_CHANGE:
return "CLUSTER_EVENT_CHANGE";
@@ -97,7 +95,6 @@ event_int_to_string(int event, int blen, char *buffer)
case DNS_EVENT_EVENTS_START:
return "DNS_EVENT_EVENTS_START";
-
case MULTI_CACHE_EVENT_SYNC:
return "MULTI_CACHE_EVENT_SYNC";
@@ -134,7 +131,6 @@ event_int_to_string(int event, int blen, char *buffer)
case CACHE_EVENT_RESPONSE_MSG:
return "CACHE_EVENT_RESPONSE_MSG";
-
case MGMT_EVENT_SHUTDOWN:
return "MGMT_EVENT_SHUTDOWN";
case MGMT_EVENT_RESTART:
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/FetchSM.cc
----------------------------------------------------------------------
diff --git a/proxy/FetchSM.cc b/proxy/FetchSM.cc
index 3fd726c..a015bdf 100644
--- a/proxy/FetchSM.cc
+++ b/proxy/FetchSM.cc
@@ -67,9 +67,12 @@ FetchSM::httpConnect()
http_vc = reinterpret_cast<PluginVC *>(TSHttpConnectWithPluginId(&_addr.sa, tag, id));
/*
- * TS-2906: We need a way to unset internal request when using FetchSM, the use case for this
- * is SPDY when it creates outgoing requests it uses FetchSM and the outgoing requests
- * are spawned via SPDY SYN packets which are definitely not internal requests.
+ * TS-2906: We need a way to unset internal request when using FetchSM, the
+ * use case for this
+ * is SPDY when it creates outgoing requests it uses FetchSM and the outgoing
+ * requests
+ * are spawned via SPDY SYN packets which are definitely not internal
+ * requests.
*/
if (!is_internal_request) {
PluginVC *other_side = reinterpret_cast<PluginVC *>(http_vc)->get_other_side();
@@ -363,7 +366,8 @@ FetchSM::get_info_from_buffer(IOBufferReader *the_reader)
info = (char *)ats_malloc(sizeof(char) * (read_avail + 1));
client_response = info;
- // To maintain backwards compatability we don't allow chunking when it's not streaming.
+ // To maintain backwards compatability we don't allow chunking when it's not
+ // streaming.
if (!(fetch_flags & TS_FETCH_FLAGS_STREAM) || !check_chunked()) {
/* Read the data out of the reader */
while (read_avail > 0) {
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/ICP.cc
----------------------------------------------------------------------
diff --git a/proxy/ICP.cc b/proxy/ICP.cc
index 89232a8..b750ebb 100644
--- a/proxy/ICP.cc
+++ b/proxy/ICP.cc
@@ -165,7 +165,6 @@ static ClassAllocator<ICPPeerReadCont> ICPPeerReadContAllocator("ICPPeerReadCont
static Action *default_action = NULL;
-
ICPHandlerCont::ICPHandlerCont(ICPProcessor *icpP) : PeriodicCont(icpP)
{
}
@@ -1745,7 +1744,6 @@ ICPProcessor::start()
_mcastCB_handler = new ICPHandlerCont(this);
SET_CONTINUATION_HANDLER(_mcastCB_handler, (ICPHandlerContHandler)&ICPHandlerCont::TossEvent);
-
//
// Build ICP peer list and setup listen sockets
//
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/ICPConfig.cc
----------------------------------------------------------------------
diff --git a/proxy/ICPConfig.cc b/proxy/ICPConfig.cc
index 6c84198..ae6fd16 100644
--- a/proxy/ICPConfig.cc
+++ b/proxy/ICPConfig.cc
@@ -622,8 +622,10 @@ ICPConfiguration::icp_config_change_callback(void *data, void *value, int startu
++n_colons;
}
if (n_colons != colons_per_entry) {
- RecSignalWarning(REC_SIGNAL_CONFIG_ERROR, "read icp.config, invalid syntax, line %d: expected %d fields, found %d", ln,
- colons_per_entry, n_colons);
+ RecSignalWarning(REC_SIGNAL_CONFIG_ERROR, "read icp.config, invalid "
+ "syntax, line %d: expected %d "
+ "fields, found %d",
+ ln, colons_per_entry, n_colons);
error = 1;
break;
}
@@ -850,7 +852,6 @@ ParentSiblingPeer::GetICPPort()
return _pconfig->GetICPPort();
}
-
sockaddr *
ParentSiblingPeer::GetIP()
{
@@ -1388,7 +1389,6 @@ dumpICPstats()
}
}
-
void
ICPProcessor::DumpICPConfig()
{
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/ICPProcessor.cc
----------------------------------------------------------------------
diff --git a/proxy/ICPProcessor.cc b/proxy/ICPProcessor.cc
index 7978bf9..2cd53a1 100644
--- a/proxy/ICPProcessor.cc
+++ b/proxy/ICPProcessor.cc
@@ -49,7 +49,6 @@ ICPProcessorExt::start()
_ICPpr->start();
}
-
Action *
ICPProcessorExt::ICPQuery(Continuation *c, URL *url)
{
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/ICPProcessor.h
----------------------------------------------------------------------
diff --git a/proxy/ICPProcessor.h b/proxy/ICPProcessor.h
index 08f1945..1039dde 100644
--- a/proxy/ICPProcessor.h
+++ b/proxy/ICPProcessor.h
@@ -21,7 +21,6 @@
limitations under the License.
*/
-
/****************************************************************************
ICPProcessor.h
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/ICPlog.h
----------------------------------------------------------------------
diff --git a/proxy/ICPlog.h b/proxy/ICPlog.h
index bf11d8f..cb74449 100644
--- a/proxy/ICPlog.h
+++ b/proxy/ICPlog.h
@@ -21,7 +21,6 @@
limitations under the License.
*/
-
/****************************************************************************
ICPlog.h
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/IPAllow.cc
----------------------------------------------------------------------
diff --git a/proxy/IPAllow.cc b/proxy/IPAllow.cc
index 8a88866..f5fbe9e 100644
--- a/proxy/IPAllow.cc
+++ b/proxy/IPAllow.cc
@@ -94,7 +94,6 @@ IpAllow::release(IpAllow *lookup)
// End API functions
//
-
IpAllow::IpAllow(const char *config_var, const char *name, const char *action_val) : module_name(name), action(action_val)
{
ats_scoped_str config_path(RecConfigReadConfigPath(config_var));
@@ -207,7 +206,8 @@ IpAllow::BuildTable()
SignalError(errBuf, alarmAlready);
} else {
// INKqa05845
- // Search for "action=ip_allow method=PURGE method=GET ..." or "action=ip_deny method=PURGE method=GET ...".
+ // Search for "action=ip_allow method=PURGE method=GET ..." or
+ // "action=ip_deny method=PURGE method=GET ...".
char *label, *val;
uint32_t acl_method_mask = 0;
AclRecord::MethodSet nonstandard_methods;
@@ -278,7 +278,8 @@ IpAllow::BuildTable()
_map.fill(&addr1, &addr2, reinterpret_cast<void *>(_acls.length() - 1));
} else {
snprintf(errBuf, sizeof(errBuf), "%s discarding %s entry at line %d : %s", module_name, config_file_path, line_num,
- "Invalid action/method specified"); // changed by YTS Team, yamsat bug id -59022
+ "Invalid action/method specified"); // changed by YTS Team,
+ // yamsat bug id -59022
SignalError(errBuf, alarmAlready);
}
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/InkAPITest.cc
----------------------------------------------------------------------
diff --git a/proxy/InkAPITest.cc b/proxy/InkAPITest.cc
index 25b99da..06ccab5 100644
--- a/proxy/InkAPITest.cc
+++ b/proxy/InkAPITest.cc
@@ -72,7 +72,6 @@ SDK_RPRINT(RegressionTest *t, const char *api_name, const char *testcase_name, i
return (l);
}
-
/*
REGRESSION_TEST(SDK_<test_name>)(RegressionTest *t, int atype, int *pstatus)
@@ -133,7 +132,6 @@ REGRESSION_TEST(SDK_API_TSTrafficServerVersionGet)(RegressionTest *test, int /*
return;
}
-
////////////////////////////////////////////////
// SDK_API_TSPluginDirGet
//
@@ -178,7 +176,6 @@ REGRESSION_TEST(SDK_API_TSPluginDirGet)(RegressionTest *test, int /* atype ATS_U
return;
}
-
/* TSConfig */
////////////////////////////////////////////////
// SDK_API_TSConfig
@@ -288,8 +285,10 @@ server_handler(TSCont contp, TSEvent event, void *data)
params->vc = (TSVConn)data;
TSVConnRead((TSVConn)data, contp, params->buffer, 100);
} else if (event == TS_EVENT_VCONN_EOS) {
- // The server end of the test passes if it receives an EOF event. This means that it must have
- // connected to the endpoint. Since this always happens *after* the accept, we know that it is
+ // The server end of the test passes if it receives an EOF event. This means
+ // that it must have
+ // connected to the endpoint. Since this always happens *after* the accept,
+ // we know that it is
// safe to delete the params.
TSContDestroy(contp);
@@ -354,9 +353,11 @@ client_handler(TSCont contp, TSEvent event, void *data)
SDK_RPRINT(params->test, params->api, "TSNetConnect", TC_PASS, "ok");
- // XXX We really ought to do a write/read exchange with the server. The sleep above works around this.
+ // XXX We really ought to do a write/read exchange with the server. The
+ // sleep above works around this.
- // Looks good from the client end. Next we disconnect so that the server end can set the final test status.
+ // Looks good from the client end. Next we disconnect so that the server end
+ // can set the final test status.
TSVConnClose((TSVConn)data);
}
@@ -463,10 +464,8 @@ REGRESSION_TEST(SDK_API_TSPortDescriptor)(RegressionTest *test, int /* atype ATS
// - remove it from the cache
// - try to read it (should faild)
-
#define OBJECT_SIZE 100000 // size of the object we'll write/read/remove in cache
-
RegressionTest *SDK_Cache_test;
int *SDK_Cache_pstatus;
static char content[OBJECT_SIZE];
@@ -635,7 +634,6 @@ cache_handler(TSCont contp, TSEvent event, void *data)
}
Debug(UTDBG_TAG "_cache_write", "finishing up [d]");
-
if (TSVIOBufferGet(cache_vconn->write_vio) != cache_vconn->bufp) {
SDK_RPRINT(SDK_Cache_test, "TSVIOBufferGet", "TestCase1", TC_FAIL, "write_vio corrupted");
*SDK_Cache_pstatus = REGRESSION_TEST_FAILED;
@@ -686,14 +684,12 @@ cache_handler(TSCont contp, TSEvent event, void *data)
Debug(UTDBG_TAG "_cache_write", "finishing up [h]");
-
// start to read data out of cache
read_counter++;
TSCacheRead(contp, cache_vconn->key);
Debug(UTDBG_TAG "_cache_read", "starting read [i]");
return 1;
-
case TS_EVENT_VCONN_WRITE_READY:
Debug(UTDBG_TAG "_cache_event", "TS_EVENT_VCONN_WRITE_READY %d %p", event, data);
if ((TSVIO)data != cache_vconn->write_vio) {
@@ -1199,7 +1195,6 @@ REGRESSION_TEST(SDK_API_TSThread)(RegressionTest *test, int /* atype ATS_UNUSED
}
}
-
//////////////////////////////////////////////
// SDK_API_TSThread
//
@@ -1346,7 +1341,6 @@ cont_handler(TSCont /* contp ATS_UNUSED */, TSEvent /* event ATS_UNUSED */, void
return 0;
}
-
REGRESSION_TEST(SDK_API_TSContCreate)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
*pstatus = REGRESSION_TEST_INPROGRESS;
@@ -1371,7 +1365,6 @@ REGRESSION_TEST(SDK_API_TSContCreate)(RegressionTest *test, int /* atype ATS_UNU
TSContDestroy(contp);
}
-
//////////////////////////////////////////////
// SDK_API_TSCont
//
@@ -1412,7 +1405,6 @@ cont_data_handler(TSCont contp, TSEvent /* event ATS_UNUSED */, void * /* edata
return 0;
}
-
REGRESSION_TEST(SDK_API_TSContDataGet)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
*pstatus = REGRESSION_TEST_INPROGRESS;
@@ -1432,7 +1424,6 @@ REGRESSION_TEST(SDK_API_TSContDataGet)(RegressionTest *test, int /* atype ATS_UN
TSContSchedule(contp, 0, TS_THREAD_POOL_DEFAULT);
}
-
//////////////////////////////////////////////
// SDK_API_TSCont
//
@@ -1601,7 +1592,6 @@ REGRESSION_TEST(SDK_API_TSIOBufferCreate)(RegressionTest *test, int /* atype ATS
return;
}
-
//////////////////////////////////////////////
// SDK_API_TSIOBuffer
//
@@ -1639,7 +1629,6 @@ REGRESSION_TEST(SDK_API_TSIOBufferProduce)(RegressionTest *test, int /* atype AT
return;
}
-
//////////////////////////////////////////////
// SDK_API_TSIOBuffer
//
@@ -1733,7 +1722,6 @@ REGRESSION_TEST(SDK_API_TSIOBufferStart)(RegressionTest *test, int /* atype ATS_
return;
}
-
//////////////////////////////////////////////
// SDK_API_TSIOBuffer
//
@@ -1747,7 +1735,8 @@ REGRESSION_TEST(SDK_API_TSIOBufferCopy)(RegressionTest *test, int /* atype ATS_U
bool test_passed = false;
*pstatus = REGRESSION_TEST_INPROGRESS;
- char input_buf[] = "This is the test for TSIOBufferCopy, TSIOBufferWrite, TSIOBufferReaderCopy";
+ char input_buf[] = "This is the test for TSIOBufferCopy, TSIOBufferWrite, "
+ "TSIOBufferReaderCopy";
char output_buf[1024];
TSIOBuffer bufp = TSIOBufferSizedCreate(TS_IOBUFFER_SIZE_INDEX_4K);
TSIOBuffer bufp2 = TSIOBufferSizedCreate(TS_IOBUFFER_SIZE_INDEX_4K);
@@ -1860,7 +1849,6 @@ REGRESSION_TEST(SDK_API_TSIOBufferBlockNext)(RegressionTest *test, int /* atype
return;
}
-
REGRESSION_TEST(SDK_API_TSContSchedule)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
*pstatus = REGRESSION_TEST_INPROGRESS;
@@ -1916,7 +1904,6 @@ typedef struct {
unsigned int magic;
} SocketTest;
-
// This func is called by us from mytest_handler to test TSHttpTxnClientIPGet
static int
checkHttpTxnClientIPGet(SocketTest *test, void *data)
@@ -1924,7 +1911,8 @@ checkHttpTxnClientIPGet(SocketTest *test, void *data)
sockaddr const *ptr;
in_addr_t ip;
TSHttpTxn txnp = (TSHttpTxn)data;
- in_addr_t actual_ip = htonl(INADDR_LOOPBACK); /* 127.0.0.1 is expected because the client is on the same machine */
+ in_addr_t actual_ip = htonl(INADDR_LOOPBACK); /* 127.0.0.1 is expected because the client is on the
+ same machine */
ptr = TSHttpTxnClientAddrGet(txnp);
if (ptr == 0 || INADDR_ANY == (ip = ats_ip4_addr_cast(ptr))) {
@@ -1945,12 +1933,14 @@ checkHttpTxnClientIPGet(SocketTest *test, void *data)
return TS_EVENT_CONTINUE;
}
-// This func is called by us from mytest_handler to check for TSHttpTxnNextHopIPGet
+// This func is called by us from mytest_handler to check for
+// TSHttpTxnNextHopIPGet
static int
checkHttpTxnNextHopIPGet(SocketTest *test, void *data)
{
TSHttpTxn txnp = (TSHttpTxn)data;
- in_addr_t actual_ip = htonl(INADDR_LOOPBACK); /* 127.0.0.1 is expected because the client is on the same machine */
+ in_addr_t actual_ip = htonl(INADDR_LOOPBACK); /* 127.0.0.1 is expected because the client is on the
+ same machine */
sockaddr const *ptr;
in_addr_t nexthopip;
@@ -1974,7 +1964,6 @@ checkHttpTxnNextHopIPGet(SocketTest *test, void *data)
return TS_EVENT_CONTINUE;
}
-
// This func is called by us from mytest_handler to test TSHttpTxnServerIPGet
static int
checkHttpTxnServerIPGet(SocketTest *test, void *data)
@@ -1982,7 +1971,8 @@ checkHttpTxnServerIPGet(SocketTest *test, void *data)
sockaddr const *ptr;
in_addr_t ip;
TSHttpTxn txnp = (TSHttpTxn)data;
- in_addr_t actual_ip = htonl(INADDR_LOOPBACK); /* 127.0.0.1 is expected because the client is on the same machine */
+ in_addr_t actual_ip = htonl(INADDR_LOOPBACK); /* 127.0.0.1 is expected because the client is on the
+ same machine */
ptr = TSHttpTxnServerAddrGet(txnp);
if (0 == ptr || 0 == (ip = ats_ip4_addr_cast(ptr))) {
@@ -2000,11 +1990,11 @@ checkHttpTxnServerIPGet(SocketTest *test, void *data)
SDK_RPRINT(test->regtest, "TSHttpTxnServerIPGet", "TestCase1", TC_FAIL, "Value's Mismatch");
}
-
return TS_EVENT_CONTINUE;
}
-// This func is called by us from mytest_handler to test TSHttpTxnIncomingAddrGet
+// This func is called by us from mytest_handler to test
+// TSHttpTxnIncomingAddrGet
static int
checkHttpTxnIncomingAddrGet(SocketTest *test, void *data)
{
@@ -2174,7 +2164,6 @@ checkHttpTxnServerRespGet(SocketTest *test, void *data)
return TS_EVENT_CONTINUE;
}
-
// This func is called both by us when scheduling EVENT_IMMEDIATE
// And by HTTP SM for registered hooks
static int
@@ -2329,7 +2318,6 @@ mytest_handler(TSCont contp, TSEvent event, void *data)
return TS_EVENT_IMMEDIATE;
}
-
EXCLUSIVE_REGRESSION_TEST(SDK_API_HttpHookAdd)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
*pstatus = REGRESSION_TEST_INPROGRESS;
@@ -2368,7 +2356,10 @@ EXCLUSIVE_REGRESSION_TEST(SDK_API_HttpHookAdd)(RegressionTest *test, int /* atyp
/* Create a client transaction */
socktest->browser = synclient_txn_create();
- char *request = generate_request(HTTP_HOOK_TEST_REQUEST_ID); // this request has a no-cache that prevents caching
+ char *request = generate_request(HTTP_HOOK_TEST_REQUEST_ID); // this request
+ // has a no-cache
+ // that prevents
+ // caching
synclient_txn_send_request(socktest->browser, request);
TSfree(request);
@@ -2380,7 +2371,6 @@ EXCLUSIVE_REGRESSION_TEST(SDK_API_HttpHookAdd)(RegressionTest *test, int /* atyp
return;
}
-
//////////////////////////////////////////////
// SDK_API_TSUrl
//
@@ -2572,7 +2562,6 @@ REGRESSION_TEST(SDK_API_TSUrl)(RegressionTest *test, int /* atype ATS_UNUSED */,
((query == NULL) ? "" : "?"), ((query == NULL) ? "" : query), ((fragment == NULL) ? "" : "#"),
((fragment == NULL) ? "" : fragment));
-
// Set Functions
bufp1 = TSMBufferCreate();
@@ -2735,7 +2724,6 @@ REGRESSION_TEST(SDK_API_TSUrl)(RegressionTest *test, int /* atype ATS_UNUSED */,
SDK_RPRINT(test, "TSUrlCopy", "TestCase1", TC_FAIL, "Values don't match");
}
-
// String Test Case 2
url_string_from_2 = TSUrlStringGet(bufp2, url_loc2, &tmp_len);
if (strcmp(url_string_from_2, url_expected_string) == 0) {
@@ -2829,22 +2817,38 @@ print_results:
(test_passed_string1 == false) || (test_passed_string2 == false) || (test_passed_print == false) ||
(test_passed_length1 == false) || (test_passed_length2 == false) || (test_passed_type == false)) {
/*** Debugging the test itself....
- (test_passed_create == false)?printf("test_passed_create is false\n"):printf("");
- (test_passed_destroy == false)?printf("test_passed_destroy is false\n"):printf("");
- (test_passed_user == false)?printf("test_passed_user is false\n"):printf("");
- (test_passed_password == false)?printf("test_passed_password is false\n"):printf("");
- (test_passed_host == false)?printf("test_passed_host is false\n"):printf("");
- (test_passed_port == false)?printf("test_passed_port is false\n"):printf("");
- (test_passed_path == false)?printf("test_passed_path is false\n"):printf("");
- (test_passed_params == false)?printf("test_passed_params is false\n"):printf("");
- (test_passed_query == false)?printf("test_passed_query is false\n"):printf("");
- (test_passed_fragment == false)?printf("test_passed_fragment is false\n"):printf("");
- (test_passed_copy == false)?printf("test_passed_copy is false\n"):printf("");
- (test_passed_string1 == false)?printf("test_passed_string1 is false\n"):printf("");
- (test_passed_string2 == false)?printf("test_passed_string2 is false\n"):printf("");
- (test_passed_length1 == false)?printf("test_passed_length1 is false\n"):printf("");
- (test_passed_length2 == false)?printf("test_passed_length2 is false\n"):printf("");
- (test_passed_type == false)?printf("test_passed_type is false\n"):printf("");
+ (test_passed_create == false)?printf("test_passed_create is
+ false\n"):printf("");
+ (test_passed_destroy == false)?printf("test_passed_destroy is
+ false\n"):printf("");
+ (test_passed_user == false)?printf("test_passed_user is
+ false\n"):printf("");
+ (test_passed_password == false)?printf("test_passed_password is
+ false\n"):printf("");
+ (test_passed_host == false)?printf("test_passed_host is
+ false\n"):printf("");
+ (test_passed_port == false)?printf("test_passed_port is
+ false\n"):printf("");
+ (test_passed_path == false)?printf("test_passed_path is
+ false\n"):printf("");
+ (test_passed_params == false)?printf("test_passed_params is
+ false\n"):printf("");
+ (test_passed_query == false)?printf("test_passed_query is
+ false\n"):printf("");
+ (test_passed_fragment == false)?printf("test_passed_fragment is
+ false\n"):printf("");
+ (test_passed_copy == false)?printf("test_passed_copy is
+ false\n"):printf("");
+ (test_passed_string1 == false)?printf("test_passed_string1 is
+ false\n"):printf("");
+ (test_passed_string2 == false)?printf("test_passed_string2 is
+ false\n"):printf("");
+ (test_passed_length1 == false)?printf("test_passed_length1 is
+ false\n"):printf("");
+ (test_passed_length2 == false)?printf("test_passed_length2 is
+ false\n"):printf("");
+ (test_passed_type == false)?printf("test_passed_type is
+ false\n"):printf("");
.....***********/
*pstatus = REGRESSION_TEST_FAILED;
} else {
@@ -2874,7 +2878,8 @@ print_results:
//////////////////////////////////////////////
/**
- * If you change value of any constant in this function then reflect that change in variable expected_iobuf.
+ * If you change value of any constant in this function then reflect that change
+ * in variable expected_iobuf.
*/
REGRESSION_TEST(SDK_API_TSHttpHdr)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
@@ -2939,7 +2944,6 @@ REGRESSION_TEST(SDK_API_TSHttpHdr)(RegressionTest *test, int /* atype ATS_UNUSED
bool try_print_function = true;
bool test_buffer_created = true;
-
*pstatus = REGRESSION_TEST_INPROGRESS;
bufp1 = TSMBufferCreate();
@@ -2958,7 +2962,6 @@ REGRESSION_TEST(SDK_API_TSHttpHdr)(RegressionTest *test, int /* atype ATS_UNUSED
SDK_RPRINT(test, "TSHttpHdrCreate", "All Test Cases", TC_FAIL, "Cannot run test as unable to allocate MBuffers");
}
-
// Type
if (test_passed_Http_Hdr_Create == true) {
if ((TSHttpHdrTypeSet(bufp1, hdr_loc1, TS_HTTP_TYPE_REQUEST) == TS_ERROR) ||
@@ -3365,7 +3368,6 @@ REGRESSION_TEST(SDK_API_TSHttpHdr)(RegressionTest *test, int /* atype ATS_UNUSED
SDK_RPRINT(test, "TSHttpHdrClone", "All Test Cases", TC_PASS, "Cannot run test as TSHttpHdrCreate has failed");
}
-
// LengthGet
if (test_passed_Http_Hdr_Create == true) {
actual_length = TSHttpHdrLengthGet(bufp1, hdr_loc1);
@@ -3485,7 +3487,6 @@ REGRESSION_TEST(SDK_API_TSHttpHdr)(RegressionTest *test, int /* atype ATS_UNUSED
return;
}
-
//////////////////////////////////////////////
// SDK_API_TSMimeHdrField
//
@@ -3554,7 +3555,6 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
TSMLoc field_loc14 = (TSMLoc)NULL;
TSMLoc field_loc15 = (TSMLoc)NULL;
-
const char *field1Name = "field1";
const char *field2Name = "field2";
const char *field3Name = "field3";
@@ -3722,7 +3722,6 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
SDK_RPRINT(test, "TSMimeHdrFieldCreate", "All Test Case", TC_FAIL, "Cannot run test as Test for TSMimeHdrCreate Failed");
}
-
// TSMimeHdrFieldNameGet&Set
if (test_passed_Mime_Hdr_Field_Create == true) {
if ((TSMimeHdrFieldNameSet(bufp1, mime_loc1, field_loc11, field1Name, -1) == TS_ERROR) ||
@@ -3753,7 +3752,6 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
"Cannot run test as Test for TSMBufferFieldCreate Failed");
}
-
// TSMimeHdrFieldAppend, TSMimeHdrFieldGet, TSMimeHdrFieldNext
if (test_passed_Mime_Hdr_Field_Name == true) {
if ((TSMimeHdrFieldAppend(bufp1, mime_loc1, field_loc11) != TS_SUCCESS) ||
@@ -3765,8 +3763,8 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
} else {
if (TS_NULL_MLOC == (test_field_loc11 = TSMimeHdrFieldGet(bufp1, mime_loc1, 0))) {
SDK_RPRINT(test, "TSMimeHdrFieldAppend", "TestCase1|2|3|4|5", TC_FAIL, "TSMimeHdrFieldGet Returns TS_NULL_MLOC");
- SDK_RPRINT(test, "TSMimeHdrFieldNext", "TestCase1", TC_FAIL,
- "Cannot Test TSMimeHdrFieldNext as TSMimeHdrFieldGet Returns TS_NULL_MLOC");
+ SDK_RPRINT(test, "TSMimeHdrFieldNext", "TestCase1", TC_FAIL, "Cannot Test TSMimeHdrFieldNext as TSMimeHdrFieldGet "
+ "Returns TS_NULL_MLOC");
SDK_RPRINT(test, "TSMimeHdrFieldGet", "TestCase1", TC_FAIL, "TSMimeHdrFieldGet Returns TS_NULL_MLOC");
} else {
if (compare_field_names(test, bufp1, mime_loc1, field_loc11, bufp1, mime_loc1, test_field_loc11) == TS_ERROR) {
@@ -3849,8 +3847,8 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
(TSHandleMLocRelease(bufp1, mime_loc1, test_field_loc13) == TS_ERROR) ||
(TSHandleMLocRelease(bufp1, mime_loc1, test_field_loc14) == TS_ERROR) ||
(TSHandleMLocRelease(bufp1, mime_loc1, test_field_loc15) == TS_ERROR)) {
- SDK_RPRINT(test, "TSMimeHdrFieldAppend/Next/Get", "", TC_FAIL,
- "Unable to release handle using TSHandleMLocRelease. Can be bad handle.");
+ SDK_RPRINT(test, "TSMimeHdrFieldAppend/Next/Get", "", TC_FAIL, "Unable to release handle using TSHandleMLocRelease. Can be "
+ "bad handle.");
}
}
} else {
@@ -3858,7 +3856,6 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
"Cannot run test as Test for TSMimeHdrFieldNameGet&Set Failed");
}
-
// TSMimeHdrFieldsCount
if (test_passed_Mime_Hdr_Field_Create == true) {
if ((numberOfFields = TSMimeHdrFieldsCount(bufp1, mime_loc1)) < 0) {
@@ -3891,7 +3888,8 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
SDK_RPRINT(test, "TSMimeHdrFieldsCount", "TestCase1", TC_FAIL, "Cannot run Test as TSMimeHdrFieldCreate failed");
}
- // TSMimeHdrFieldValueStringInsert, TSMimeHdrFieldValueStringGet, TSMimeHdrFieldValueStringSet
+ // TSMimeHdrFieldValueStringInsert, TSMimeHdrFieldValueStringGet,
+ // TSMimeHdrFieldValueStringSet
if (test_passed_Mime_Hdr_Field_Create == true) {
if ((TSMimeHdrFieldValueStringInsert(bufp1, mime_loc1, field_loc11, -1, field1Value2, -1) == TS_ERROR) ||
(TSMimeHdrFieldValueStringInsert(bufp1, mime_loc1, field_loc11, 0, field1Value1, -1) == TS_ERROR) ||
@@ -3901,9 +3899,11 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
SDK_RPRINT(test, "TSMimeHdrFieldValueStringInsert", "TestCase1|2|3|4|5", TC_FAIL,
"TSMimeHdrFieldValueStringInsert Returns TS_ERROR");
SDK_RPRINT(test, "TSMimeHdrFieldValueStringGet", "TestCase1&2&3&4&5", TC_FAIL,
- "Cannot run Test as TSMimeHdrFieldValueStringInsert returns TS_ERROR");
+ "Cannot run Test as TSMimeHdrFieldValueStringInsert "
+ "returns TS_ERROR");
SDK_RPRINT(test, "TSMimeHdrFieldValueStringSet", "TestCase1", TC_FAIL,
- "Cannot run Test as TSMimeHdrFieldValueStringInsert returns TS_ERROR");
+ "Cannot run Test as TSMimeHdrFieldValueStringInsert returns "
+ "TS_ERROR");
} else {
field1Value1Get = TSMimeHdrFieldValueStringGet(bufp1, mime_loc1, field_loc11, 0, &lengthField1Value1);
field1Value2Get = TSMimeHdrFieldValueStringGet(bufp1, mime_loc1, field_loc11, 1, &lengthField1Value2);
@@ -3942,16 +3942,16 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
} else {
SDK_RPRINT(test, "TSMimeHdrFieldValueStringInsert", "TestCase1|2|3|4|5", TC_PASS, "Value's Don't Match");
SDK_RPRINT(test, "TSMimeHdrFieldValueStringGet", "TestCase1|2|3|4|5", TC_PASS, "Value's Don't Match");
- SDK_RPRINT(test, "TSMimeHdrFieldValueStringSet", "TestCase1", TC_FAIL,
- "TSMimeHdrFieldValueStringSet cannot be tested as TSMimeHdrFieldValueStringInsert|Get failed");
+ SDK_RPRINT(test, "TSMimeHdrFieldValueStringSet", "TestCase1", TC_FAIL, "TSMimeHdrFieldValueStringSet cannot be tested as "
+ "TSMimeHdrFieldValueStringInsert|Get failed");
}
}
} else {
SDK_RPRINT(test, "TSMimeHdrFieldValueStringInsert&Set&Get", "All", TC_FAIL, "Cannot run Test as TSMimeHdrFieldCreate failed");
}
-
- // TSMimeHdrFieldValueDateInsert, TSMimeHdrFieldValueDateGet, TSMimeHdrFieldValueDateSet
+ // TSMimeHdrFieldValueDateInsert, TSMimeHdrFieldValueDateGet,
+ // TSMimeHdrFieldValueDateSet
if (test_passed_Mime_Hdr_Field_Create == true) {
if (TSMimeHdrFieldValueDateInsert(bufp1, mime_loc1, field_loc12, field2Value1) == TS_ERROR) {
SDK_RPRINT(test, "TSMimeHdrFieldValueDateInsert", "TestCase1", TC_FAIL, "TSMimeHdrFieldValueDateInsert Returns TS_ERROR");
@@ -3981,8 +3981,8 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
} else {
SDK_RPRINT(test, "TSMimeHdrFieldValueDateInsert", "TestCase1", TC_PASS, "Value's Don't Match");
SDK_RPRINT(test, "TSMimeHdrFieldValueDateGet", "TestCase1", TC_PASS, "Value's Don't Match");
- SDK_RPRINT(test, "TSMimeHdrFieldValueDateSet", "TestCase1", TC_FAIL,
- "TSMimeHdrFieldValueDateSet cannot be tested as TSMimeHdrFieldValueDateInsert|Get failed");
+ SDK_RPRINT(test, "TSMimeHdrFieldValueDateSet", "TestCase1", TC_FAIL, "TSMimeHdrFieldValueDateSet cannot be tested as "
+ "TSMimeHdrFieldValueDateInsert|Get failed");
}
}
} else {
@@ -3990,8 +3990,8 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
"Cannot run Test as TSMimeHdrFieldCreate failed");
}
-
- // TSMimeHdrFieldValueIntInsert, TSMimeHdrFieldValueIntGet, TSMimeHdrFieldValueIntSet
+ // TSMimeHdrFieldValueIntInsert, TSMimeHdrFieldValueIntGet,
+ // TSMimeHdrFieldValueIntSet
if (test_passed_Mime_Hdr_Field_Create == true) {
if ((TSMimeHdrFieldValueIntInsert(bufp1, mime_loc1, field_loc13, -1, field3Value2) == TS_ERROR) ||
(TSMimeHdrFieldValueIntInsert(bufp1, mime_loc1, field_loc13, 0, field3Value1) == TS_ERROR) ||
@@ -4030,15 +4030,16 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
} else {
SDK_RPRINT(test, "TSMimeHdrFieldValueIntInsert", "TestCase1|2|3|4|5", TC_PASS, "Value's Don't Match");
SDK_RPRINT(test, "TSMimeHdrFieldValueIntGet", "TestCase1|2|3|4|5", TC_PASS, "Value's Don't Match");
- SDK_RPRINT(test, "TSMimeHdrFieldValueIntSet", "TestCase1", TC_FAIL,
- "TSMimeHdrFieldValueIntSet cannot be tested as TSMimeHdrFieldValueIntInsert|Get failed");
+ SDK_RPRINT(test, "TSMimeHdrFieldValueIntSet", "TestCase1", TC_FAIL, "TSMimeHdrFieldValueIntSet cannot be tested as "
+ "TSMimeHdrFieldValueIntInsert|Get failed");
}
}
} else {
SDK_RPRINT(test, "TSMimeHdrFieldValueIntInsert&Set&Get", "All", TC_FAIL, "Cannot run Test as TSMimeHdrFieldCreate failed");
}
- // TSMimeHdrFieldValueUintInsert, TSMimeHdrFieldValueUintGet, TSMimeHdrFieldValueUintSet
+ // TSMimeHdrFieldValueUintInsert, TSMimeHdrFieldValueUintGet,
+ // TSMimeHdrFieldValueUintSet
if (test_passed_Mime_Hdr_Field_Create == true) {
if ((TSMimeHdrFieldValueUintInsert(bufp1, mime_loc1, field_loc14, -1, field4Value2) == TS_ERROR) ||
(TSMimeHdrFieldValueUintInsert(bufp1, mime_loc1, field_loc14, 0, field4Value1) == TS_ERROR) ||
@@ -4077,8 +4078,8 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
} else {
SDK_RPRINT(test, "TSMimeHdrFieldValueUintInsert", "TestCase1|2|3|4|5", TC_PASS, "Value's Don't Match");
SDK_RPRINT(test, "TSMimeHdrFieldValueUintGet", "TestCase1|2|3|4|5", TC_PASS, "Value's Don't Match");
- SDK_RPRINT(test, "TSMimeHdrFieldValueUintSet", "TestCase1", TC_FAIL,
- "TSMimeHdrFieldValueUintSet cannot be tested as TSMimeHdrFieldValueUintInsert|Get failed");
+ SDK_RPRINT(test, "TSMimeHdrFieldValueUintSet", "TestCase1", TC_FAIL, "TSMimeHdrFieldValueUintSet cannot be tested as "
+ "TSMimeHdrFieldValueUintInsert|Get failed");
}
}
} else {
@@ -4098,8 +4099,8 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
test_passed_Mime_Hdr_Field_Length_Get = true;
}
-
- // TSMimeHdrFieldValueAppend, TSMimeHdrFieldValueDelete, TSMimeHdrFieldValuesCount, TSMimeHdrFieldValuesClear
+ // TSMimeHdrFieldValueAppend, TSMimeHdrFieldValueDelete,
+ // TSMimeHdrFieldValuesCount, TSMimeHdrFieldValuesClear
if (test_passed_Mime_Hdr_Field_Create == true) {
if ((TSMimeHdrFieldValueStringInsert(bufp1, mime_loc1, field_loc15, -1, field5Value1, -1) == TS_ERROR) ||
@@ -4107,13 +4108,17 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
(TSMimeHdrFieldValueStringInsert(bufp1, mime_loc1, field_loc15, -1, field5Value3, -1) == TS_ERROR) ||
(TSMimeHdrFieldValueUintInsert(bufp1, mime_loc1, field_loc15, -1, field5Value4) == TS_ERROR)) {
SDK_RPRINT(test, "TSMimeHdrFieldValueAppend", "TestCase1", TC_FAIL,
- "TSMimeHdrFieldValueString|Int|UintInsert returns TS_ERROR. Cannot create field for testing.");
+ "TSMimeHdrFieldValueString|Int|UintInsert returns TS_ERROR. "
+ "Cannot create field for testing.");
SDK_RPRINT(test, "TSMimeHdrFieldValueDelete", "TestCase1", TC_FAIL,
- "TSMimeHdrFieldValueString|Int|UintInsert returns TS_ERROR. Cannot create field for testing.");
+ "TSMimeHdrFieldValueString|Int|UintInsert returns TS_ERROR. "
+ "Cannot create field for testing.");
SDK_RPRINT(test, "TSMimeHdrFieldValuesCount", "TestCase1", TC_FAIL,
- "TSMimeHdrFieldValueString|Int|UintInsert returns TS_ERROR. Cannot create field for testing.");
+ "TSMimeHdrFieldValueString|Int|UintInsert returns TS_ERROR. "
+ "Cannot create field for testing.");
SDK_RPRINT(test, "TSMimeHdrFieldValuesClear", "TestCase1", TC_FAIL,
- "TSMimeHdrFieldValueString|Int|UintInsert returns TS_ERROR. Cannot create field for testing.");
+ "TSMimeHdrFieldValueString|Int|UintInsert returns TS_ERROR. "
+ "Cannot create field for testing.");
} else {
if (TSMimeHdrFieldValueAppend(bufp1, mime_loc1, field_loc15, 0, field5Value1Append, -1) == TS_ERROR) {
SDK_RPRINT(test, "TSMimeHdrFieldValueAppend", "TestCase1", TC_FAIL, "TSMimeHdrFieldValueAppend returns TS_ERROR");
@@ -4150,7 +4155,8 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
if ((strncmp(fieldValueDeleteGet, field5Value3, lengthFieldValueDeleteGet) == 0) &&
(lengthFieldValueDeleteGet == (int)strlen(field5Value3))) {
SDK_RPRINT(test, "TSMimeHdrFieldValueDelete", "TestCase1", TC_FAIL,
- "Value not deleted from field or incorrect index deleted from field.");
+ "Value not deleted from field or incorrect index deleted "
+ "from field.");
} else {
SDK_RPRINT(test, "TSMimeHdrFieldValueDelete", "TestCase1", TC_PASS, "ok");
test_passed_Mime_Hdr_Field_Value_Delete = true;
@@ -4231,10 +4237,12 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
SDK_RPRINT(test, "TSMimeHdrDestroy", "TestCase1", TC_PASS, "ok");
test_passed_Mime_Hdr_Destroy = true;
}
- /** Commented out as Traffic Server was crashing. Will have to look into it. */
+ /** Commented out as Traffic Server was crashing. Will have to look into it.
+ */
/*
if (TSHandleMLocRelease(bufp1,TS_NULL_MLOC,mime_loc1)==TS_ERROR) {
- SDK_RPRINT(test,"TSHandleMLocRelease","TSMimeHdrDestroy",TC_FAIL,"unable to release handle using TSHandleMLocRelease");
+ SDK_RPRINT(test,"TSHandleMLocRelease","TSMimeHdrDestroy",TC_FAIL,"unable
+ to release handle using TSHandleMLocRelease");
}
*/
} else {
@@ -4254,7 +4262,6 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
SDK_RPRINT(test, "TSMimeHdrDestroy", "TestCase1", TC_FAIL, "Cannot run test as TSMimeHdrCreate failed");
}
-
if ((test_passed_MBuffer_Create == true) && (test_passed_Mime_Hdr_Create == true) &&
(test_passed_Mime_Hdr_Field_Create == true) && (test_passed_Mime_Hdr_Field_Name == true) &&
(test_passed_Mime_Hdr_Field_Append == true) && (test_passed_Mime_Hdr_Field_Get == true) &&
@@ -4277,7 +4284,6 @@ REGRESSION_TEST(SDK_API_TSMimeHdrField)(RegressionTest *test, int /* atype ATS_U
return;
}
-
//////////////////////////////////////////////
// SDK_API_TSHttpHdrParse
//
@@ -4365,9 +4371,13 @@ convert_http_hdr_to_string(TSMBuffer bufp, TSMLoc hdr_loc)
REGRESSION_TEST(SDK_API_TSHttpHdrParse)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
- const char *req =
- "GET http://www.example.com/ HTTP/1.1\r\nmimefield1:field1value1,field1value2\r\nmimefield2:field2value1,field2value2\r\n\r\n";
- const char *resp = "HTTP/1.1 200 OK\r\n1mimefield:1field1value,1field2value\r\n2mimefield:2field1value,2field2value\r\n\r\n";
+ const char *req = "GET http://www.example.com/ "
+ "HTTP/"
+ "1.1\r\nmimefield1:field1value1,field1value2\r\nmimefield2:"
+ "field2value1,field2value2\r\n\r\n";
+ const char *resp = "HTTP/1.1 200 "
+ "OK\r\n1mimefield:1field1value,1field2value\r\n2mimefield:"
+ "2field1value,2field2value\r\n\r\n";
const char *start;
const char *end;
char *temp;
@@ -4476,7 +4486,6 @@ REGRESSION_TEST(SDK_API_TSHttpHdrParse)(RegressionTest *test, int /* atype ATS_U
return;
}
-
//////////////////////////////////////////////
// SDK_API_TSMimeHdrParse
//
@@ -4604,11 +4613,11 @@ compare_field_values(RegressionTest *test, TSMBuffer bufp1, TSMLoc hdr_loc1, TSM
return TS_SUCCESS;
}
-
REGRESSION_TEST(SDK_API_TSMimeHdrParse)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
- const char *parse_string =
- "field1:field1Value1,field1Value2\r\nfield2:10,-34,45\r\nfield3:field3Value1,23\r\nfield2: 2345, field2Value2\r\n\r\n";
+ const char *parse_string = "field1:field1Value1,field1Value2\r\nfield2:10,-"
+ "34,45\r\nfield3:field3Value1,23\r\nfield2: 2345, "
+ "field2Value2\r\n\r\n";
const char *DUPLICATE_FIELD_NAME = "field2";
const char *REMOVE_FIELD_NAME = "field3";
@@ -4708,7 +4717,6 @@ REGRESSION_TEST(SDK_API_TSMimeHdrParse)(RegressionTest *test, int /* atype ATS_U
SDK_RPRINT(test, "TSMimeHdrLengthGet", "TestCase1", TC_FAIL, "Cannot run test as unable to create a parser");
}
-
// HOW DO I CHECK FOR PARSER CLEAR????
if (test_passed_parser_create == true) {
TSMimeParserClear(parser);
@@ -4718,7 +4726,6 @@ REGRESSION_TEST(SDK_API_TSMimeHdrParse)(RegressionTest *test, int /* atype ATS_U
SDK_RPRINT(test, "TSMimeParserClear", "TestCase1", TC_FAIL, "Cannot run test as unable to create a parser");
}
-
if (test_passed_parser_create == true) {
TSMimeParserDestroy(parser);
SDK_RPRINT(test, "TSMimeParserDestroy", "TestCase1", TC_PASS, "ok");
@@ -5028,15 +5035,16 @@ REGRESSION_TEST(SDK_API_TSUrlParse)(RegressionTest *test, int /* atype ATS_UNUSE
"http://www.example.com/homepage.cgi;ab?abc=def#abc", "http://abc:def@www.example.com:3426/homepage.cgi;ab?abc=def#abc",
"https://abc:def@www.example.com:3426/homepage.cgi;ab?abc=def#abc",
"ftp://abc:def@www.example.com:3426/homepage.cgi;ab?abc=def#abc",
- "file:///c:/test.dat;ab?abc=def#abc", // Note: file://c: is malformed URL because no host is present.
- "file:///test.dat;ab?abc=def#abc", "foo://bar.com/baz/",
- "http://a.b.com/xx.jpg?newpath=http://b.c.com" // https://issues.apache.org/jira/browse/TS-1635
+ "file:///c:/test.dat;ab?abc=def#abc", // Note: file://c: is
+ // malformed URL because no
+ // host is present.
+ "file:///test.dat;ab?abc=def#abc", "foo://bar.com/baz/", "http://a.b.com/xx.jpg?newpath=http://"
+ "b.c.com" // https://issues.apache.org/jira/browse/TS-1635
};
static int const num_urls = sizeof(urls) / sizeof(urls[0]);
bool test_passed[num_urls] = {false};
-
const char *start;
const char *end;
char *temp;
@@ -5049,7 +5057,6 @@ REGRESSION_TEST(SDK_API_TSUrlParse)(RegressionTest *test, int /* atype ATS_UNUSE
*pstatus = REGRESSION_TEST_INPROGRESS;
-
int idx;
for (idx = 0; idx < num_urls; idx++) {
char const *url = urls[idx];
@@ -5096,7 +5103,6 @@ REGRESSION_TEST(SDK_API_TSUrlParse)(RegressionTest *test, int /* atype ATS_UNUSE
*pstatus = REGRESSION_TEST_PASSED;
}
-
return;
}
@@ -5118,7 +5124,6 @@ typedef struct {
TSTextLogObject log;
} LogTestData;
-
static int
log_test_handler(TSCont contp, TSEvent event, void * /* edata ATS_UNUSED */)
{
@@ -5167,7 +5172,6 @@ log_test_handler(TSCont contp, TSEvent event, void * /* edata ATS_UNUSED */)
*(data->pstatus) = REGRESSION_TEST_PASSED;
SDK_RPRINT(data->test, "TSTextLogObject", "TestCase1", TC_PASS, "ok");
-
// figure out the matainfo file for cleanup.
// code from MetaInfo::_build_name(const char *filename)
int i = -1, l = 0;
@@ -5213,7 +5217,8 @@ REGRESSION_TEST(SDK_API_TSTextLog)(RegressionTest *test, int /* atype ATS_UNUSED
char logname[PATH_NAME_MAX];
char fullpath_logname[PATH_NAME_MAX];
- /* Generate a random log file name, so if we run the test several times, we won't use the
+ /* Generate a random log file name, so if we run the test several times, we
+ won't use the
same log file name. */
ats_scoped_str tmp(RecConfigReadLogDir());
snprintf(logname, sizeof(logname), "RegressionTestLog%d.log", (int)getpid());
@@ -5254,7 +5259,6 @@ REGRESSION_TEST(SDK_API_TSTextLog)(RegressionTest *test, int /* atype ATS_UNUSED
return;
}
-
//////////////////////////////////////////////
// SDK_API_TSMgmtGet
//
@@ -5315,9 +5319,9 @@ REGRESSION_TEST(SDK_API_TSMgmtGet)(RegressionTest *test, int /* atype ATS_UNUSED
SDK_RPRINT(test, "TSMgmtStringGet", "TestCase1.4", TC_FAIL, "can not get value of param %s", CONFIG_PARAM_STRING_NAME);
err = 1;
} else if (strcmp(svalue, CONFIG_PARAM_STRING_VALUE) != 0) {
- SDK_RPRINT(test, "TSMgmtStringGet", "TestCase1.4", TC_FAIL,
- "got incorrect value of param %s, should have been \"%s\", found \"%s\"", CONFIG_PARAM_STRING_NAME,
- CONFIG_PARAM_STRING_VALUE, svalue);
+ SDK_RPRINT(test, "TSMgmtStringGet", "TestCase1.4", TC_FAIL, "got incorrect value of param %s, should have been \"%s\", "
+ "found \"%s\"",
+ CONFIG_PARAM_STRING_NAME, CONFIG_PARAM_STRING_VALUE, svalue);
err = 1;
} else {
SDK_RPRINT(test, "TSMgmtStringGet", "TestCase1.4", TC_PASS, "ok");
@@ -5333,7 +5337,6 @@ REGRESSION_TEST(SDK_API_TSMgmtGet)(RegressionTest *test, int /* atype ATS_UNUSED
return;
}
-
//////////////////////////////////////////////
// SDK_API_TSConstant
//
@@ -5349,7 +5352,6 @@ REGRESSION_TEST(SDK_API_TSMgmtGet)(RegressionTest *test, int /* atype ATS_UNUSED
} \
}
-
typedef enum {
ORIG_TS_PARSE_ERROR = -1,
ORIG_TS_PARSE_DONE = 0,
@@ -5365,10 +5367,8 @@ typedef enum {
typedef enum {
ORIG_TS_HTTP_STATUS_NONE = 0,
-
ORIG_TS_HTTP_STATUS_CONTINUE = 100,
ORIG_TS_HTTP_STATUS_SWITCHING_PROTOCOL = 101,
-
ORIG_TS_HTTP_STATUS_OK = 200,
ORIG_TS_HTTP_STATUS_CREATED = 201,
ORIG_TS_HTTP_STATUS_ACCEPTED = 202,
@@ -5376,14 +5376,12 @@ typedef enum {
ORIG_TS_HTTP_STATUS_NO_CONTENT = 204,
ORIG_TS_HTTP_STATUS_RESET_CONTENT = 205,
ORIG_TS_HTTP_STATUS_PARTIAL_CONTENT = 206,
-
ORIG_TS_HTTP_STATUS_MULTIPLE_CHOICES = 300,
ORIG_TS_HTTP_STATUS_MOVED_PERMANENTLY = 301,
ORIG_TS_HTTP_STATUS_MOVED_TEMPORARILY = 302,
ORIG_TS_HTTP_STATUS_SEE_OTHER = 303,
ORIG_TS_HTTP_STATUS_NOT_MODIFIED = 304,
ORIG_TS_HTTP_STATUS_USE_PROXY = 305,
-
ORIG_TS_HTTP_STATUS_BAD_REQUEST = 400,
ORIG_TS_HTTP_STATUS_UNAUTHORIZED = 401,
ORIG_TS_HTTP_STATUS_PAYMENT_REQUIRED = 402,
@@ -5400,7 +5398,6 @@ typedef enum {
ORIG_TS_HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 413,
ORIG_TS_HTTP_STATUS_REQUEST_URI_TOO_LONG = 414,
ORIG_TS_HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 415,
-
ORIG_TS_HTTP_STATUS_INTERNAL_SERVER_ERROR = 500,
ORIG_TS_HTTP_STATUS_NOT_IMPLEMENTED = 501,
ORIG_TS_HTTP_STATUS_BAD_GATEWAY = 502,
@@ -5440,20 +5437,16 @@ typedef enum {
ORIG_TS_EVENT_TIMEOUT = 2,
ORIG_TS_EVENT_ERROR = 3,
ORIG_TS_EVENT_CONTINUE = 4,
-
ORIG_TS_EVENT_VCONN_READ_READY = 100,
ORIG_TS_EVENT_VCONN_WRITE_READY = 101,
ORIG_TS_EVENT_VCONN_READ_COMPLETE = 102,
ORIG_TS_EVENT_VCONN_WRITE_COMPLETE = 103,
ORIG_TS_EVENT_VCONN_EOS = 104,
-
ORIG_TS_EVENT_NET_CONNECT = 200,
ORIG_TS_EVENT_NET_CONNECT_FAILED = 201,
ORIG_TS_EVENT_NET_ACCEPT = 202,
ORIG_TS_EVENT_NET_ACCEPT_FAILED = 204,
-
ORIG_TS_EVENT_HOST_LOOKUP = 500,
-
ORIG_TS_EVENT_CACHE_OPEN_READ = 1102,
ORIG_TS_EVENT_CACHE_OPEN_READ_FAILED = 1103,
ORIG_TS_EVENT_CACHE_OPEN_WRITE = 1108,
@@ -5466,7 +5459,6 @@ typedef enum {
ORIG_TS_EVENT_CACHE_SCAN_OPERATION_BLOCKED = 1123,
ORIG_TS_EVENT_CACHE_SCAN_OPERATION_FAILED = 1124,
ORIG_TS_EVENT_CACHE_SCAN_DONE = 1125,
-
ORIG_TS_EVENT_HTTP_CONTINUE = 60000,
ORIG_TS_EVENT_HTTP_ERROR = 60001,
ORIG_TS_EVENT_HTTP_READ_REQUEST_HDR = 60002,
@@ -5483,7 +5475,6 @@ typedef enum {
ORIG_TS_EVENT_HTTP_SSN_START = 60013,
ORIG_TS_EVENT_HTTP_SSN_CLOSE = 60014,
ORIG_TS_EVENT_HTTP_CACHE_LOOKUP_COMPLETE = 60015,
-
ORIG_TS_EVENT_MGMT_UPDATE = 60100
} ORIG_TSEvent;
@@ -5524,7 +5515,6 @@ typedef enum {
ORIG_TS_SUCCESS = 0,
} ORIG_TSReturnCode;
-
REGRESSION_TEST(SDK_API_TSConstant)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
*pstatus = REGRESSION_TEST_INPROGRESS;
@@ -5541,7 +5531,6 @@ REGRESSION_TEST(SDK_API_TSConstant)(RegressionTest *test, int /* atype ATS_UNUSE
PRINT_DIFF(TS_HTTP_STATUS_OK);
PRINT_DIFF(TS_HTTP_STATUS_CREATED);
-
PRINT_DIFF(TS_HTTP_STATUS_ACCEPTED);
PRINT_DIFF(TS_HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION);
PRINT_DIFF(TS_HTTP_STATUS_NO_CONTENT);
@@ -5665,7 +5654,6 @@ REGRESSION_TEST(SDK_API_TSConstant)(RegressionTest *test, int /* atype ATS_UNUSE
PRINT_DIFF(TS_ERROR);
PRINT_DIFF(TS_SUCCESS);
-
if (test_passed) {
*pstatus = REGRESSION_TEST_PASSED;
} else {
@@ -5684,7 +5672,6 @@ REGRESSION_TEST(SDK_API_TSConstant)(RegressionTest *test, int /* atype ATS_UNUSE
// TSHttpTxnParentProxySet
//////////////////////////////////////////////
-
typedef struct {
RegressionTest *test;
int *pstatus;
@@ -5727,7 +5714,6 @@ checkHttpTxnParentProxy(ContData *data, TSHttpTxn txnp)
return TS_EVENT_CONTINUE;
}
-
static int
ssn_handler(TSCont contp, TSEvent event, void *edata)
{
@@ -5856,7 +5842,6 @@ ssn_handler(TSCont contp, TSEvent event, void *edata)
return 0;
}
-
EXCLUSIVE_REGRESSION_TEST(SDK_API_HttpSsn)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
*pstatus = REGRESSION_TEST_INPROGRESS;
@@ -6018,9 +6003,7 @@ cache_hook_handler(TSCont contp, TSEvent event, void *edata)
}
TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE);
- }
-
- break;
+ } break;
case TS_EVENT_IMMEDIATE:
case TS_EVENT_TIMEOUT:
@@ -6039,7 +6022,8 @@ cache_hook_handler(TSCont contp, TSEvent event, void *edata)
/* Browser got the response. test is over. clean up */
{
- /* If this is the first time, then the response is in cache and we should make */
+ /* If this is the first time, then the response is in cache and we should
+ * make */
/* another request to get cache hit */
if (data->first_time == true) {
data->first_time = false;
@@ -6081,7 +6065,6 @@ cache_hook_handler(TSCont contp, TSEvent event, void *edata)
return 0;
}
-
EXCLUSIVE_REGRESSION_TEST(SDK_API_HttpTxnCache)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
*pstatus = REGRESSION_TEST_INPROGRESS;
@@ -6378,7 +6361,8 @@ transformable(TSHttpTxn txnp, TransformTestData *data)
// XXX - Can't return TS_ERROR because that is a different type
// -bcall 7/24/07
// if (resp_status == TS_ERROR) {
- // SDK_RPRINT(data->test,"TSHttpTxnTransform","",TC_FAIL,"[transformable]: TSHttpHdrStatusGet returns TS_ERROR");
+ // SDK_RPRINT(data->test,"TSHttpTxnTransform","",TC_FAIL,"[transformable]:
+ // TSHttpHdrStatusGet returns TS_ERROR");
// }
return 0; /* not a 200 */
@@ -6456,7 +6440,8 @@ transform_hook_handler(TSCont contp, TSEvent event, void *edata)
if (transformable(txnp, data)) {
transform_add(txnp, data);
}
- /* Call TransformedRespCache or UntransformedRespCache depending on request */
+ /* Call TransformedRespCache or UntransformedRespCache depending on request
+ */
{
TSMBuffer bufp;
TSMLoc hdr;
@@ -6644,7 +6629,6 @@ transform_hook_handler(TSCont contp, TSEvent event, void *edata)
return 0;
}
-
EXCLUSIVE_REGRESSION_TEST(SDK_API_HttpTxnTransform)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
*pstatus = REGRESSION_TEST_INPROGRESS;
@@ -6809,9 +6793,7 @@ altinfo_hook_handler(TSCont contp, TSEvent event, void *edata)
TSHttpAltInfoQualitySet(infop, 0.5);
SDK_RPRINT(data->test, "TSHttpAltInfoQualitySet", "TestCase", TC_PASS, "ok");
- }
-
- break;
+ } break;
case TS_EVENT_IMMEDIATE:
case TS_EVENT_TIMEOUT:
@@ -6830,7 +6812,8 @@ altinfo_hook_handler(TSCont contp, TSEvent event, void *edata)
/* Browser got the response. test is over. clean up */
{
- /* If this is the first time, then both the responses are in cache and we should make */
+ /* If this is the first time, then both the responses are in cache and we
+ * should make */
/* another request to get cache hit */
if (data->first_time == true) {
data->first_time = false;
@@ -6840,7 +6823,8 @@ altinfo_hook_handler(TSCont contp, TSEvent event, void *edata)
/* Send another similar client request */
synclient_txn_send_request(data->browser3, data->request3);
- /* Register to HTTP hooks that are called in case of alternate selection */
+ /* Register to HTTP hooks that are called in case of alternate selection
+ */
TSHttpHookAdd(TS_HTTP_SELECT_ALT_HOOK, contp);
TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
return 0;
@@ -6881,7 +6865,6 @@ altinfo_hook_handler(TSCont contp, TSEvent event, void *edata)
return 0;
}
-
EXCLUSIVE_REGRESSION_TEST(SDK_API_HttpAltInfo)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
*pstatus = REGRESSION_TEST_INPROGRESS;
@@ -6927,7 +6910,6 @@ EXCLUSIVE_REGRESSION_TEST(SDK_API_HttpAltInfo)(RegressionTest *test, int /* atyp
return;
}
-
//////////////////////////////////////////////
// SDK_API_TSHttpConnect
//
@@ -6941,7 +6923,8 @@ EXCLUSIVE_REGRESSION_TEST(SDK_API_HttpAltInfo)(RegressionTest *test, int /* atyp
//
// Same test strategy:
// - create a synthetic server listening on port A
-// - use HttpConnect to send a request to TS for an url on a remote host H, port B
+// - use HttpConnect to send a request to TS for an url on a remote host H,
+// port B
// - use TxnIntercept or TxnServerIntercept to forward the request
// to the synthetic server on local host, port A
// - make sure response is correct
@@ -6967,7 +6950,6 @@ typedef struct {
unsigned long magic;
} ConnectTestData;
-
static int
cont_test_handler(TSCont contp, TSEvent event, void *edata)
{
@@ -7069,7 +7051,6 @@ done:
return TS_EVENT_IMMEDIATE;
}
-
EXCLUSIVE_REGRESSION_TEST(SDK_API_TSHttpConnectIntercept)(RegressionTest *test, int /* atype */, int *pstatus)
{
*pstatus = REGRESSION_TEST_INPROGRESS;
@@ -7111,7 +7092,6 @@ EXCLUSIVE_REGRESSION_TEST(SDK_API_TSHttpConnectIntercept)(RegressionTest *test,
return;
}
-
EXCLUSIVE_REGRESSION_TEST(SDK_API_TSHttpConnectServerIntercept)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
*pstatus = REGRESSION_TEST_INPROGRESS;
@@ -7130,7 +7110,8 @@ EXCLUSIVE_REGRESSION_TEST(SDK_API_TSHttpConnectServerIntercept)(RegressionTest *
/* Register to hook READ_REQUEST */
TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, cont_test);
- /* This is cool ! we can use the code written for the synthetic server and client in InkAPITest.cc */
+ /* This is cool ! we can use the code written for the synthetic server and
+ * client in InkAPITest.cc */
data->os = synserver_create(SYNSERVER_DUMMY_PORT);
data->browser = synclient_txn_create();
@@ -7151,7 +7132,6 @@ EXCLUSIVE_REGRESSION_TEST(SDK_API_TSHttpConnectServerIntercept)(RegressionTest *
return;
}
-
////////////////////////////////////////////////
// SDK_API_OVERRIDABLE_CONFIGS
//
@@ -7221,7 +7201,6 @@ REGRESSION_TEST(SDK_API_OVERRIDABLE_CONFIGS)(RegressionTest *test, int /* atype
const char *test_string = "The Apache Traffic Server";
int len;
-
s->init();
*pstatus = REGRESSION_TEST_INPROGRESS;
@@ -7303,11 +7282,15 @@ REGRESSION_TEST(SDK_API_OVERRIDABLE_CONFIGS)(RegressionTest *test, int /* atype
REGRESSION_TEST(SDK_API_ENCODING)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
- const char *url = "http://www.example.com/foo?fie= \"#%<>[]\\^`{}~&bar={test}&fum=Apache Traffic Server";
- const char *url_encoded =
- "http://www.example.com/foo?fie=%20%22%23%25%3C%3E%5B%5D%5C%5E%60%7B%7D%7E&bar=%7Btest%7D&fum=Apache%20Traffic%20Server";
- const char *url_base64 =
- "aHR0cDovL3d3dy5leGFtcGxlLmNvbS9mb28/ZmllPSAiIyU8PltdXF5ge31+JmJhcj17dGVzdH0mZnVtPUFwYWNoZSBUcmFmZmljIFNlcnZlcg==";
+ const char *url = "http://www.example.com/foo?fie= "
+ "\"#%<>[]\\^`{}~&bar={test}&fum=Apache Traffic Server";
+ const char *url_encoded = "http://www.example.com/"
+ "foo?fie=%20%22%23%25%3C%3E%5B%5D%5C%5E%60%7B%7D%"
+ "7E&bar=%7Btest%7D&fum=Apache%20Traffic%20Server";
+ const char *url_base64 = "aHR0cDovL3d3dy5leGFtcGxlLmNvbS9mb28/"
+ "ZmllPSAiIyU8PltdXF5ge31+"
+ "JmJhcj17dGVzdH0mZnVtPUFwYWNoZSBUcmFmZmljIFNlcnZlcg="
+ "=";
const char *url2 = "http://www.example.com/"; // No Percent encoding necessary
char buf[1024];
size_t length;
@@ -7390,7 +7373,6 @@ REGRESSION_TEST(SDK_API_ENCODING)(RegressionTest *test, int /* atype ATS_UNUSED
return;
}
-
////////////////////////////////////////////////
// SDK_API_DEBUG_NAME_LOOKUPS
//
@@ -7418,7 +7400,6 @@ REGRESSION_TEST(SDK_API_DEBUG_NAME_LOOKUPS)(RegressionTest *test, int /* atype A
SDK_RPRINT(test, "TSHttpServerStateNameLookup", "TestCase1", TC_PASS, "ok");
}
-
str = TSHttpHookNameLookup(TS_HTTP_READ_RESPONSE_HDR_HOOK);
if ((strlen(str) != strlen(hook_name) || strcmp(str, hook_name))) {
SDK_RPRINT(test, "TSHttpHookNameLookup", "TestCase1", TC_FAIL, "Failed on %d, expected %s, got %s",
@@ -7428,7 +7409,6 @@ REGRESSION_TEST(SDK_API_DEBUG_NAME_LOOKUPS)(RegressionTest *test, int /* atype A
SDK_RPRINT(test, "TSHttpHookNameLookup", "TestCase1", TC_PASS, "ok");
}
-
str = TSHttpEventNameLookup(TS_EVENT_IMMEDIATE);
if ((strlen(str) != strlen(event_name) || strcmp(str, event_name))) {
SDK_RPRINT(test, "TSHttpEventNameLookup", "TestCase1", TC_FAIL, "Failed on %d, expected %s, got %s", TS_EVENT_IMMEDIATE,
@@ -7438,7 +7418,6 @@ REGRESSION_TEST(SDK_API_DEBUG_NAME_LOOKUPS)(RegressionTest *test, int /* atype A
SDK_RPRINT(test, "TSHttpEventNameLookup", "TestCase1", TC_PASS, "ok");
}
-
*pstatus = success ? REGRESSION_TEST_PASSED : REGRESSION_TEST_FAILED;
return;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/InkAPITestTool.cc
----------------------------------------------------------------------
diff --git a/proxy/InkAPITestTool.cc b/proxy/InkAPITestTool.cc
index b5e6707..5328b5e 100644
--- a/proxy/InkAPITestTool.cc
+++ b/proxy/InkAPITestTool.cc
@@ -125,7 +125,6 @@ typedef struct {
unsigned int magic;
} ClientTxn;
-
//////////////////////////////////////////////////////////////////////////////
// DECLARATIONS
//////////////////////////////////////////////////////////////////////////////
@@ -136,7 +135,6 @@ static char *generate_request(int test_case);
static char *generate_response(const char *request);
static int get_request_id(TSHttpTxn txnp);
-
/* client side */
static ClientTxn *synclient_txn_create(void);
static int synclient_txn_delete(ClientTxn *txn);
@@ -174,7 +172,6 @@ get_body_ptr(const char *request)
return (ptr != NULL) ? (ptr + 4) : NULL;
}
-
/* Caller must free returned request */
static char *
generate_request(int test_case)
@@ -276,13 +273,13 @@ generate_request(int test_case)
return request;
}
-
/* Caller must free returned response */
static char *
generate_response(const char *request)
{
// define format for response
-// Each response contains a field X-Response-ID that contains the id of the testcase
+// Each response contains a field X-Response-ID that contains the id of the
+// testcase
#define HTTP_REQUEST_TESTCASE_FORMAT \
"GET %1024s HTTP/1.%d\r\n" \
"X-Request-ID: %d\r\n"
@@ -360,7 +357,6 @@ generate_response(const char *request)
"\r\n" \
"Body for response 10"
-
int test_case, match, http_version;
char *response = (char *)TSmalloc(RESPONSE_MAX_SIZE + 1);
@@ -409,7 +405,6 @@ generate_response(const char *request)
return response;
}
-
// This routine can be called by tests, from the READ_REQUEST_HDR_HOOK
// to figure out the id of a test message
// Returns id/-1 in case of error
@@ -437,7 +432,6 @@ get_request_id(TSHttpTxn txnp)
return id;
}
-
//////////////////////////////////////////////////////////////////////////////
// SOCKET CLIENT
//////////////////////////////////////////////////////////////////////////////
@@ -540,7 +534,6 @@ synclient_txn_send_request_to_vc(ClientTxn *txn, char *request, TSVConn vc)
return 1;
}
-
static int
synclient_txn_read_response(TSCont contp)
{
@@ -616,7 +609,6 @@ synclient_txn_read_response_handler(TSCont contp, TSEvent event, void * /* data
return 1;
}
-
static int
synclient_txn_write_request(TSCont contp)
{
@@ -689,7 +681,6 @@ synclient_txn_write_request_handler(TSCont contp, TSEvent event, void * /* data
return TS_EVENT_IMMEDIATE;
}
-
static int
synclient_txn_connect_handler(TSCont contp, TSEvent event, void *data)
{
@@ -729,7 +720,6 @@ synclient_txn_connect_handler(TSCont contp, TSEvent event, void *data)
return TS_EVENT_IMMEDIATE;
}
-
static int
synclient_txn_main_handler(TSCont contp, TSEvent event, void *data)
{
@@ -740,7 +730,6 @@ synclient_txn_main_handler(TSCont contp, TSEvent event, void *data)
return (*handler)(contp, event, data);
}
-
//////////////////////////////////////////////////////////////////////////////
// SOCKET SERVER
//////////////////////////////////////////////////////////////////////////////
@@ -840,7 +829,6 @@ synserver_accept_handler(TSCont contp, TSEvent event, void *data)
return TS_EVENT_IMMEDIATE;
}
-
static int
synserver_txn_close(TSCont contp)
{
@@ -865,7 +853,6 @@ synserver_txn_close(TSCont contp)
return TS_EVENT_IMMEDIATE;
}
-
static int
synserver_txn_write_response(TSCont contp)
{
@@ -904,7 +891,6 @@ synserver_txn_write_response(TSCont contp)
return TS_EVENT_IMMEDIATE;
}
-
static int
synserver_txn_write_response_handler(TSCont contp, TSEvent event, void * /* data ATS_UNUSED */)
{
@@ -940,7 +926,6 @@ synserver_txn_write_response_handler(TSCont contp, TSEvent event, void * /* data
return TS_EVENT_IMMEDIATE;
}
-
static int
synserver_txn_read_request(TSCont contp)
{
@@ -1019,7 +1004,6 @@ synserver_txn_read_request_handler(TSCont contp, TSEvent event, void * /* data A
return TS_EVENT_IMMEDIATE;
}
-
static int
synserver_txn_main_handler(TSCont contp, TSEvent event, void *data)
{
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/InkIOCoreAPI.cc
----------------------------------------------------------------------
diff --git a/proxy/InkIOCoreAPI.cc b/proxy/InkIOCoreAPI.cc
index 58492d3..bb5676f 100644
--- a/proxy/InkIOCoreAPI.cc
+++ b/proxy/InkIOCoreAPI.cc
@@ -46,7 +46,6 @@
#define sdk_assert(EX) ((void)((EX) ? (void)0 : _TSReleaseAssert(#EX, __FILE__, __LINE__)))
#endif
-
TSReturnCode
sdk_sanity_check_mutex(TSMutex mutex)
{
@@ -63,7 +62,6 @@ sdk_sanity_check_mutex(TSMutex mutex)
return TS_SUCCESS;
}
-
TSReturnCode
sdk_sanity_check_hostlookup_structure(TSHostLookupResult data)
{
@@ -86,7 +84,6 @@ sdk_sanity_check_iocore_structure(void *data)
TSReturnCode sdk_sanity_check_continuation(TSCont cont);
TSReturnCode sdk_sanity_check_null_ptr(void *ptr);
-
////////////////////////////////////////////////////////////////////
//
// Threads
@@ -168,7 +165,6 @@ TSThreadSelf(void)
return ithread;
}
-
////////////////////////////////////////////////////////////////////
//
// Mutexes
@@ -229,7 +225,6 @@ TSMutexLock(TSMutex mutexp)
MUTEX_TAKE_LOCK((ProxyMutex *)mutexp, this_ethread());
}
-
TSReturnCode
TSMutexLockTry(TSMutex mutexp)
{
@@ -401,7 +396,6 @@ INKUDPSendTo(TSCont contp, INKUDPConn udp, unsigned int ip, int port, char *data
return reinterpret_cast<TSAction>(conn->send((Continuation *)contp, packet));
}
-
TSAction
INKUDPRecvFrom(TSCont contp, INKUDPConn udp)
{
@@ -488,7 +482,6 @@ INKUDPPacketGet(INKUDPacketQueue queuep)
return NULL;
}
-
/* Buffers */
TSIOBuffer
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/Main.h
----------------------------------------------------------------------
diff --git a/proxy/Main.h b/proxy/Main.h
index b1f3c9b..95a68a6 100644
--- a/proxy/Main.h
+++ b/proxy/Main.h
@@ -28,7 +28,6 @@
#include "Regression.h"
#include "I_Version.h"
-
//
// Constants
//
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/ParentSelection.cc
----------------------------------------------------------------------
diff --git a/proxy/ParentSelection.cc b/proxy/ParentSelection.cc
index cd30180..12862f9 100644
--- a/proxy/ParentSelection.cc
+++ b/proxy/ParentSelection.cc
@@ -305,7 +305,6 @@ ParentConfigParams::findParent(HttpRequestData *rdata, ParentResult *result)
}
}
-
void
ParentConfigParams::recordRetrySuccess(ParentResult *result)
{
@@ -1016,7 +1015,6 @@ setup_socks_servers(ParentRecord *rec_arr, int len)
return 0;
}
-
void
SocksServerConfig::reconfigure()
{
@@ -1107,7 +1105,6 @@ request_to_data(HttpRequestData *req, sockaddr const *srcip, sockaddr const *dst
http_parser_clear(&parser);
}
-
static int passes;
static int fails;
@@ -1154,7 +1151,8 @@ EXCLUSIVE_REGRESSION_TEST(PARENTSELECTION)(RegressionTest * /* t ATS_UNUSED */,
// Test 1
tbl[0] = '\0';
ST(1)
- T("dest_domain=. parent=red:37412,orange:37412,yellow:37412 round_robin=strict\n")
+ T("dest_domain=. parent=red:37412,orange:37412,yellow:37412 "
+ "round_robin=strict\n")
REBUILD int c, red = 0, orange = 0, yellow = 0;
for (c = 0; c < 21; c++) {
REINIT br(request, "fruit_basket.net");
@@ -1166,7 +1164,8 @@ EXCLUSIVE_REGRESSION_TEST(PARENTSELECTION)(RegressionTest * /* t ATS_UNUSED */,
// Test 2
ST(2)
tbl[0] = '\0';
- T("dest_domain=. parent=green:4325,blue:4325,indigo:4325,violet:4325 round_robin=false\n")
+ T("dest_domain=. parent=green:4325,blue:4325,indigo:4325,violet:4325 "
+ "round_robin=false\n")
REBUILD int g = 0, b = 0, i = 0, v = 0;
for (c = 0; c < 17; c++) {
REINIT br(request, "fruit_basket.net");
@@ -1182,23 +1181,26 @@ EXCLUSIVE_REGRESSION_TEST(PARENTSELECTION)(RegressionTest * /* t ATS_UNUSED */,
tbl[0] = '\0';
#define TEST_IP4_ADDR "209.131.62.14"
#define TEST_IP6_ADDR "BEEF:DEAD:ABBA:CAFE:1337:1E1F:5EED:C0FF"
- T("dest_ip=" TEST_IP4_ADDR " parent=cat:37,dog:24 round_robin=strict\n") /* L1 */
- T("dest_ip=" TEST_IP6_ADDR " parent=zwoop:37,jMCg:24 round_robin=strict\n") /* L1 */
- T("dest_host=www.pilot.net parent=pilot_net:80\n") /* L2 */
- T("url_regex=snoopy parent=odie:80,garfield:80 round_robin=true\n") /* L3 */
- T("dest_domain=i.am parent=amy:80,katie:80,carissa:771 round_robin=false\n") /* L4 */
- T("dest_domain=microsoft.net time=03:00-22:10 parent=zoo.net:341\n") /* L5 */
- T("dest_domain=microsoft.net time=0:00-02:59 parent=zoo.net:347\n") /* L6 */
- T("dest_domain=microsoft.net time=22:11-23:59 parent=zoo.edu:111\n") /* L7 */
- T("dest_domain=imac.net port=819 parent=genie:80 round_robin=strict\n") /* L8 */
- T("dest_ip=172.34.61.211 port=3142 parent=orangina:80 go_direct=false\n") /* L9 */
- T("url_regex=miffy prefix=furry/rabbit parent=nintje:80 go_direct=false\n") /* L10 */
- T("url_regex=kitty suffix=tif parent=hello:80 round_robin=strict go_direct=false\n") /* L11 */
- T("url_regex=cyclops method=get parent=turkey:80\n") /* L12 */
- T("url_regex=cyclops method=post parent=club:80\n") /* L13 */
- T("url_regex=cyclops method=put parent=sandwich:80\n") /* L14 */
- T("url_regex=cyclops method=trace parent=mayo:80\n") /* L15 */
- T("dest_host=pluto scheme=HTTP parent=strategy:80\n") /* L16 */
+ T("dest_ip=" TEST_IP4_ADDR " parent=cat:37,dog:24 round_robin=strict\n") /* L1 */
+ T("dest_ip=" TEST_IP6_ADDR " parent=zwoop:37,jMCg:24 round_robin=strict\n") /* L1 */
+ T("dest_host=www.pilot.net parent=pilot_net:80\n") /* L2 */
+ T("url_regex=snoopy parent=odie:80,garfield:80 round_robin=true\n") /* L3 */
+ T("dest_domain=i.am parent=amy:80,katie:80,carissa:771 round_robin=false\n") /* L4 */
+ T("dest_domain=microsoft.net time=03:00-22:10 parent=zoo.net:341\n") /* L5 */
+ T("dest_domain=microsoft.net time=0:00-02:59 parent=zoo.net:347\n") /* L6 */
+ T("dest_domain=microsoft.net time=22:11-23:59 parent=zoo.edu:111\n") /* L7 */
+ T("dest_domain=imac.net port=819 parent=genie:80 round_robin=strict\n") /* L8
+ */
+ T("dest_ip=172.34.61.211 port=3142 parent=orangina:80 go_direct=false\n") /* L9
+ */
+ T("url_regex=miffy prefix=furry/rabbit parent=nintje:80 go_direct=false\n") /* L10 */
+ T("url_regex=kitty suffix=tif parent=hello:80 round_robin=strict "
+ "go_direct=false\n") /* L11 */
+ T("url_regex=cyclops method=get parent=turkey:80\n") /* L12 */
+ T("url_regex=cyclops method=post parent=club:80\n") /* L13 */
+ T("url_regex=cyclops method=put parent=sandwich:80\n") /* L14 */
+ T("url_regex=cyclops method=trace parent=mayo:80\n") /* L15 */
+ T("dest_host=pluto scheme=HTTP parent=strategy:80\n") /* L16 */
REBUILD
// Test 3
IpEndpoint ip;
@@ -1245,7 +1247,8 @@ EXCLUSIVE_REGRESSION_TEST(PARENTSELECTION)(RegressionTest * /* t ATS_UNUSED */,
// FP RE(verify(result,PARENT_SPECIFIED,"genie",80),8)
// Test 7 - N Parent Table
tbl[0] = '\0';
- T("dest_domain=rabbit.net parent=fuzzy:80,fluffy:80,furry:80,frisky:80 round_robin=strict go_direct=true\n")
+ T("dest_domain=rabbit.net parent=fuzzy:80,fluffy:80,furry:80,frisky:80 "
+ "round_robin=strict go_direct=true\n")
REBUILD
// Test 8
ST(8) REINIT br(request, "i.am.rabbit.net");
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/Plugin.cc
----------------------------------------------------------------------
diff --git a/proxy/Plugin.cc b/proxy/Plugin.cc
index 6927fa1..0572193 100644
--- a/proxy/Plugin.cc
+++ b/proxy/Plugin.cc
@@ -57,7 +57,8 @@ PluginRegInfo::PluginRegInfo()
PluginRegInfo::~PluginRegInfo()
{
- // We don't support unloading plugins once they are successfully loaded, so assert
+ // We don't support unloading plugins once they are successfully loaded, so
+ // assert
// that we don't accidentally attempt this.
ink_release_assert(this->plugin_registered == false);
ink_release_assert(this->link.prev == NULL);
@@ -91,7 +92,8 @@ plugin_load(int argc, char *argv[], bool validateOnly)
}
}
- // elevate the access to read files as root if compiled with capabilities, if not
+ // elevate the access to read files as root if compiled with capabilities, if
+ // not
// change the effective user to root
{
#if TS_USE_POSIX_CAP
@@ -200,7 +202,6 @@ plugin_expand(char *arg)
break;
}
-
not_found:
Warning("plugin.config: unable to find parameter %s", arg);
return NULL;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/PluginVC.cc
----------------------------------------------------------------------
diff --git a/proxy/PluginVC.cc b/proxy/PluginVC.cc
index 66f2d1b..318a08c 100644
--- a/proxy/PluginVC.cc
+++ b/proxy/PluginVC.cc
@@ -53,7 +53,8 @@
PluginVC, there a two locks. The one we got from our PluginVCCore and
the lock from the state machine using the PluginVC. The read side
lock & the write side lock must be the same. The regular net processor has
- this constraint as well. In order to handle scheduling of retry events cleanly,
+ this constraint as well. In order to handle scheduling of retry events
+ cleanly,
we have two event pointers, one for each lock. sm_lock_retry_event can only
be changed while holding the using state machine's lock and
core_lock_retry_event can only be manipulated while holding the PluginVC's
@@ -492,7 +493,6 @@ PluginVC::process_write_side(bool other_side_call)
Debug("pvc", "[%u] %s: process_write_side", core_obj->id, PVC_TYPE);
need_write_process = false;
-
// Check the state of our write buffer as well as ntodo
int64_t ntodo = write_state.vio.ntodo();
if (ntodo == 0) {
@@ -559,7 +559,6 @@ PluginVC::process_write_side(bool other_side_call)
}
}
-
// void PluginVC::process_read_side()
//
// This function may only be called while holding
@@ -727,7 +726,8 @@ PluginVC::process_close()
core_obj->attempt_delete();
}
-// void PluginVC::process_timeout(Event** e, int event_to_send, Event** our_eptr)
+// void PluginVC::process_timeout(Event** e, int event_to_send, Event**
+// our_eptr)
//
// Handles sending timeout event to the VConnection. e is the event we got
// which indicates the timeout. event_to_send is the event to the
@@ -1127,7 +1127,6 @@ PluginVCCore::state_send_accept(int /* event ATS_UNUSED */, void * /* data ATS_U
return 0;
}
-
// void PluginVCCore::attempt_delete()
//
// Mutex must be held when calling this function
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/Prefetch.cc
----------------------------------------------------------------------
diff --git a/proxy/Prefetch.cc b/proxy/Prefetch.cc
index 521aa83..02cef58 100644
--- a/proxy/Prefetch.cc
+++ b/proxy/Prefetch.cc
@@ -21,7 +21,6 @@
limitations under the License.
*/
-
#include "Prefetch.h"
#include "HdrUtils.h"
#include "HttpCompat.h"
@@ -51,20 +50,20 @@ struct html_tag prefetch_allowable_html_tags[] = {
// this attribute table is hard coded. It has to be the same size as
// the prefetch_allowable_html_tags table
-struct html_tag prefetch_allowable_html_attrs[] = {
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {NULL, NULL},
- {"rel", "stylesheet"}, // We want to prefetch the .css files that are common; make sure this matches {"link", "href"}
- {NULL, NULL}};
+struct html_tag prefetch_allowable_html_attrs[] = {{NULL, NULL},
+ {NULL, NULL},
+ {NULL, NULL},
+ {NULL, NULL},
+ {NULL, NULL},
+ {NULL, NULL},
+ {NULL, NULL},
+ {NULL, NULL},
+ {NULL, NULL},
+ {NULL, NULL},
+ {NULL, NULL},
+ {"rel", "stylesheet"}, // We want to prefetch the .css files that are
+ // common; make sure this matches {"link", "href"}
+ {NULL, NULL}};
static const char *PREFETCH_FIELD_RECURSION;
static int PREFETCH_FIELD_LEN_RECURSION;
@@ -529,15 +528,19 @@ PrefetchTransform::redirect(HTTPHdr *resp)
char *req_url = NULL;
char *redirect_url = NULL;
- /* Check for responses validity. If the response is valid, determine the status of the response.
+ /* Check for responses validity. If the response is valid, determine the
+ status of the response.
We need to find out if there was a redirection (301, 302, 303, 307).
*/
if ((resp != NULL) && (resp->valid())) {
response_status = resp->status_get();
- /* OK, so we got the response. Now if the response is a redirect we have to check if we also
- got a Location: header. This indicates the new location where our object is located.
- If refirect_url was not found, letz falter back to just a recursion. Since
+ /* OK, so we got the response. Now if the response is a redirect we have to
+ check if we also
+ got a Location: header. This indicates the new location where our object
+ is located.
+ If refirect_url was not found, letz falter back to just a recursion.
+ Since
we might find the url in the body.
*/
if (resp->presence(MIME_PRESENCE_LOCATION)) {
@@ -620,7 +623,6 @@ PrefetchTransform::hash_add(char *s)
if (normalize_url(s, &str_len) > 0)
Debug("PrefetchParserURLs", "Normalized URL: %s\n", s);
-
INK_MD5 hash;
MD5Context().hash_immediate(hash, s, str_len);
index = hash.slice32(1) % HASH_TABLE_LENGTH;
@@ -636,7 +638,6 @@ PrefetchTransform::hash_add(char *s)
return *e;
}
-
#define IS_RECURSIVE_PREFETCH(req_ip) (prefetch_config->max_recursion > 0 && ats_is_ip_loopback(&req_ip))
static void
@@ -731,7 +732,6 @@ check_n_attach_prefetch_transform(HttpSM *sm, HTTPHdr *resp, bool from_cache)
}
}
-
static int
PrefetchPlugin(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata)
{
@@ -775,7 +775,8 @@ PrefetchPlugin(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata)
TSHttpTxnReenable(reinterpret_cast<TSHttpTxn>(sm), TS_EVENT_HTTP_CONTINUE);
- // Debug("PrefetchPlugin", "Returning after check_n_attach_prefetch_transform()\n");
+ // Debug("PrefetchPlugin", "Returning after
+ // check_n_attach_prefetch_transform()\n");
return 0;
}
@@ -1428,10 +1429,10 @@ Lcheckcookie:
request->field_delete(MIME_FIELD_COOKIE, MIME_LEN_COOKIE);
}
- DUMP_HEADER("PrefetchCookies", req_hdr, (int64_t)0,
- "Request Header for the top page used as the base for the new request with Cookies");
- DUMP_HEADER("PrefetchCookies", resp_hdr, (int64_t)0,
- "Response Header for the top page used as the base for the new request with Cookies");
+ DUMP_HEADER("PrefetchCookies", req_hdr, (int64_t)0, "Request Header for the top page used as the base for the new "
+ "request with Cookies");
+ DUMP_HEADER("PrefetchCookies", resp_hdr, (int64_t)0, "Response Header for the top page used as the base for the new "
+ "request with Cookies");
DUMP_HEADER("PrefetchCookies", request, (int64_t)0, "Request Header with Cookies generated by Prefetch Parser");
}
@@ -1844,7 +1845,8 @@ config_read_proto(TSPrefetchBlastData &blast, const char *str)
else { // this is a multicast address:
if (strncasecmp("multicast:", str, 10) == 0) {
if (0 != ats_ip_pton(str, ats_ip_sa_cast(&blast.ip))) {
- Error("PrefetchProcessor: Address specified for multicast does not seem to "
+ Error("PrefetchProcessor: Address specified for multicast does not "
+ "seem to "
"be of the form multicast:ip_addr (eg: multicast:224.0.0.1)");
return 1;
} else {
@@ -1904,7 +1906,8 @@ PrefetchConfiguration::readConfiguration()
conf_path = RecConfigReadConfigPath("proxy.config.prefetch.config_file");
if (!conf_path) {
- Warning("PrefetchProcessor: No prefetch configuration file specified. Prefetch disabled\n");
+ Warning("PrefetchProcessor: No prefetch configuration file specified. "
+ "Prefetch disabled\n");
goto Lerror;
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/Prefetch.h
----------------------------------------------------------------------
diff --git a/proxy/Prefetch.h b/proxy/Prefetch.h
index 5ca323b..fed5093 100644
--- a/proxy/Prefetch.h
+++ b/proxy/Prefetch.h
@@ -409,7 +409,6 @@ public:
IOBufferReader *reader;
};
-
#define PREFETCH_CONFIG_UPDATE_TIMEOUT (HRTIME_SECOND * 60)
#endif // PREFETCH
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/ProtoSM.h
----------------------------------------------------------------------
diff --git a/proxy/ProtoSM.h b/proxy/ProtoSM.h
index 848e37e..3e32c1b 100644
--- a/proxy/ProtoSM.h
+++ b/proxy/ProtoSM.h
@@ -142,7 +142,6 @@ ProtoVCTable<VCTentry, max_entries>::cleanup_all()
}
}
-
template <class VCTentry, int max_entries>
inline bool
ProtoVCTable<VCTentry, max_entries>::is_table_clear()
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/ProtocolProbeSessionAccept.cc
----------------------------------------------------------------------
diff --git a/proxy/ProtocolProbeSessionAccept.cc b/proxy/ProtocolProbeSessionAccept.cc
index f512aa1..a15421a 100644
--- a/proxy/ProtocolProbeSessionAccept.cc
+++ b/proxy/ProtocolProbeSessionAccept.cc
@@ -30,7 +30,8 @@
static bool
proto_is_spdy(IOBufferReader *reader)
{
- // SPDY clients have to start by sending a control frame (the high bit is set). Let's assume
+ // SPDY clients have to start by sending a control frame (the high bit is
+ // set). Let's assume
// that no other protocol could possibly ever set this bit!
return ((uint8_t)(*reader)[0]) == 0x80u;
}
@@ -63,7 +64,8 @@ struct ProtocolProbeTrampoline : public Continuation, public ProtocolProbeSessio
: Continuation(mutex), probeParent(probe)
{
this->iobuf = new_MIOBuffer(buffer_size_index);
- reader = iobuf->alloc_reader(); // reader must be allocated only on a new MIOBuffer.
+ reader = iobuf->alloc_reader(); // reader must be allocated only on a new
+ // MIOBuffer.
SET_HANDLER(&ProtocolProbeTrampoline::ioCompletionEvent);
}
@@ -100,7 +102,8 @@ struct ProtocolProbeTrampoline : public Continuation, public ProtocolProbeSessio
goto done;
}
- // SPDY clients have to start by sending a control frame (the high bit is set). Let's assume
+ // SPDY clients have to start by sending a control frame (the high bit is
+ // set). Let's assume
// that no other protocol could possibly ever set this bit!
if (proto_is_spdy(reader)) {
key = PROTO_SPDY;
@@ -118,7 +121,8 @@ struct ProtocolProbeTrampoline : public Continuation, public ProtocolProbeSessio
goto done;
}
- // Directly invoke the session acceptor, letting it take ownership of the input buffer.
+ // Directly invoke the session acceptor, letting it take ownership of the
+ // input buffer.
probeParent->endpoint[key]->accept(netvc, this->iobuf, reader);
delete this;
return EVENT_CONT;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/ProtocolProbeSessionAccept.h
----------------------------------------------------------------------
diff --git a/proxy/ProtocolProbeSessionAccept.h b/proxy/ProtocolProbeSessionAccept.h
index 9b9e54c..b2fe18d 100644
--- a/proxy/ProtocolProbeSessionAccept.h
+++ b/proxy/ProtocolProbeSessionAccept.h
@@ -59,7 +59,8 @@ private:
/** Child acceptors, index by @c ProtoGroupKey
- We pass on the actual accept to one of these after doing protocol sniffing.
+ We pass on the actual accept to one of these after doing protocol
+ sniffing.
We make it one larger and leave the last entry NULL so we don't have to
do range checks on the enum value.
*/
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/ProxyClientSession.h
----------------------------------------------------------------------
diff --git a/proxy/ProxyClientSession.h b/proxy/ProxyClientSession.h
index 4ed616c..aa4177c 100644
--- a/proxy/ProxyClientSession.h
+++ b/proxy/ProxyClientSession.h
@@ -29,7 +29,8 @@
#include "InkAPIInternal.h"
// Emit a debug message conditional on whether this particular client session
-// has debugging enabled. This should only be called from within a client session
+// has debugging enabled. This should only be called from within a client
+// session
// member function.
#define DebugSsn(ssn, tag, ...) DebugSpecific((ssn)->debug(), tag, __VA_ARGS__)
@@ -103,7 +104,8 @@ public:
static int64_t next_connection_id();
protected:
- // XXX Consider using a bitwise flags variable for the following flags, so that we can make the best
+ // XXX Consider using a bitwise flags variable for the following flags, so
+ // that we can make the best
// use of internal alignment padding.
// Session specific debug flag.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/ReverseProxy.h
----------------------------------------------------------------------
diff --git a/proxy/ReverseProxy.h b/proxy/ReverseProxy.h
index 680401a..88b1d74 100644
--- a/proxy/ReverseProxy.h
+++ b/proxy/ReverseProxy.h
@@ -57,7 +57,8 @@ extern remap_plugin_info *remap_pi_list;
int init_reverse_proxy();
// Both Return true if a remapping was made and false otherwise
-// ebalsa@ Y! -- this happens in the remapProcessor now for the reverse proxy case (not CDN or BlindTunnel)
+// ebalsa@ Y! -- this happens in the remapProcessor now for the reverse proxy
+// case (not CDN or BlindTunnel)
bool request_url_remap(HttpTransact::State *s, HTTPHdr *request_header, char **redirect_url,
unsigned int filter_mask = URL_REMAP_FILTER_NONE);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1c06db83/proxy/Show.h
----------------------------------------------------------------------
diff --git a/proxy/Show.h b/proxy/Show.h
index e6d8498..52481c9 100644
--- a/proxy/Show.h
+++ b/proxy/Show.h
@@ -151,5 +151,4 @@ public:
}
};
-
#endif