[24/50] git commit: add TS-2082
add TS-2082 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/db8052d5 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/db8052d5 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/db8052d5 Branch: refs/heads/5.0.x Commit: db8052d5760fb1882057561b8e4250b6939235df Parents: 5140b18 Author: Zhao Yongming ming@gmail.com Authored: Sat Dec 7 14:57:00 2013 +0800 Committer: Zhao Yongming ming@gmail.com Committed: Sat Dec 7 14:57:00 2013 +0800 -- CHANGES | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/db8052d5/CHANGES -- diff --git a/CHANGES b/CHANGES index eca1bad..6745047 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2082] remove STANDALONE_IOCORE and NON_MODULAR defines + *) [TS-312] Add option to always share keep-alive connections to the origin server *) [TS-2419] Don't close client connection when responding with a 204 and there is no body @@ -96,8 +98,6 @@ Changes with Apache Traffic Server 4.2.0 *) [TS-2303] Incorrect docs for negative_caching_enabled. Author: Thomas Jackson jacksontj...@gmail.com - *) [TS-2082] fix build with --enable-standalone-iocore. - *) [TS-2712] Explicitly use subdir-objects in automake init. *) [TS-2309] Allow mod_generator plugin for lighttpd to accept SI postfixes.
[18/50] git commit: TS-1146: fix the CentOS5 build
TS-1146: fix the CentOS5 build Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a10b8090 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a10b8090 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a10b8090 Branch: refs/heads/5.0.x Commit: a10b8090fcb1dc8fa745df9b12d15596ec76cc4d Parents: 358e926 Author: James Peach jpe...@apache.org Authored: Fri Dec 6 16:09:43 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Fri Dec 6 16:09:43 2013 -0800 -- iocore/net/SSLUtils.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a10b8090/iocore/net/SSLUtils.cc -- diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc index f7b5f4b..686194b 100644 --- a/iocore/net/SSLUtils.cc +++ b/iocore/net/SSLUtils.cc @@ -70,6 +70,9 @@ typedef SSL_METHOD * ink_ssl_method_t; #endif #if TS_USE_TLS_TICKETS +static int ssl_callback_session_ticket(SSL *, unsigned char *, unsigned char *, EVP_CIPHER_CTX *, HMAC_CTX *, int); +#endif /* TS_USE_TLS_TICKETS */ + struct ssl_ticket_key_t { unsigned char key_name[16]; @@ -77,10 +80,7 @@ struct ssl_ticket_key_t unsigned char aes_key[16]; }; -static int ssl_callback_session_ticket(SSL *, unsigned char *, unsigned char *, EVP_CIPHER_CTX *, HMAC_CTX *, int); static int ssl_session_ticket_index = 0; -#endif /* TS_USE_TLS_TICKETS */ - static ProxyMutex ** sslMutexArray; static bool open_ssl_initialized = false;
[44/50] git commit: doc: link hostdb proposal
doc: link hostdb proposal Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/61005266 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/61005266 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/61005266 Branch: refs/heads/5.0.x Commit: 610052660e2a75014b7fafcc794cf723d966d5f0 Parents: ab57e59 Author: James Peach jpe...@apache.org Authored: Tue Dec 10 12:32:16 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Tue Dec 10 12:32:16 2013 -0800 -- doc/arch/index.en.rst | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/61005266/doc/arch/index.en.rst -- diff --git a/doc/arch/index.en.rst b/doc/arch/index.en.rst index 5f21f8b..51f5b83 100644 --- a/doc/arch/index.en.rst +++ b/doc/arch/index.en.rst @@ -31,3 +31,4 @@ Contents: :maxdepth: 2 cache/cache.en + proposals/hostdb.en
[14/50] git commit: Another typo fix
Another typo fix Last code part was not well formatted. Sorry for missing it at first time Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/82ad4efc Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/82ad4efc Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/82ad4efc Branch: refs/heads/5.0.x Commit: 82ad4efcc899c9cf570cc143981c706f257a9893 Parents: eaaf889 Author: Jean Baptiste Favre git...@jbfavre.org Authored: Fri Dec 6 22:19:22 2013 +0100 Committer: Jean Baptiste Favre git...@jbfavre.org Committed: Fri Dec 6 22:19:22 2013 +0100 -- .../sample-buffered-null-transformation-plugin.en.rst| 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/82ad4efc/doc/sdk/http-transformation-plugin/sample-buffered-null-transformation-plugin.en.rst -- diff --git a/doc/sdk/http-transformation-plugin/sample-buffered-null-transformation-plugin.en.rst b/doc/sdk/http-transformation-plugin/sample-buffered-null-transformation-plugin.en.rst index 866eb61..f1e1b3a 100644 --- a/doc/sdk/http-transformation-plugin/sample-buffered-null-transformation-plugin.en.rst +++ b/doc/sdk/http-transformation-plugin/sample-buffered-null-transformation-plugin.en.rst @@ -193,11 +193,11 @@ transform: #. The ``handle_output`` function writes the buffer to the output vconnection: -.. code-block:: c + .. code-block:: c - data-output_vio = - TSVConnWrite (output_conn, contp, data-output_reader, - TSIOBufferReaderAvail (data-output_reader) ); + data-output_vio = + TSVConnWrite (output_conn, contp, data-output_reader, + TSIOBufferReaderAvail (data-output_reader) ); The following diagram illustrates the write to the output vconnection:
[05/50] git commit: TS-2401: Add RecConfigReadLogDir() to wrap proxy.config.log.logfile_dir access
TS-2401: Add RecConfigReadLogDir() to wrap proxy.config.log.logfile_dir access Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a1162d83 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a1162d83 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a1162d83 Branch: refs/heads/5.0.x Commit: a1162d8368a3f6a3401a31983ac90181f5a11782 Parents: b6288c4 Author: James Peach jpe...@apache.org Authored: Tue Dec 3 13:25:11 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Thu Dec 5 20:33:49 2013 -0800 -- lib/records/I_RecCore.h | 4 lib/records/RecCore.cc | 17 + proxy/InkAPITest.cc | 5 ++--- proxy/logging/LogConfig.cc | 12 ++-- proxy/shared/DiagsConfig.cc | 9 + 5 files changed, 26 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a1162d83/lib/records/I_RecCore.h -- diff --git a/lib/records/I_RecCore.h b/lib/records/I_RecCore.h index 8462752..39d2e9d 100644 --- a/lib/records/I_RecCore.h +++ b/lib/records/I_RecCore.h @@ -53,6 +53,10 @@ char * RecConfigReadRuntimeDir(); // MUST release the result with ats_free(). char * RecConfigReadSnapshotDir(); +// Return a copy of the system's log directory, taking proxy.config.log.logfile_dir into account. The caller +// MUST release the result with ats_free(). +char * RecConfigReadLogDir(); + // Return a copy of a configuration file that is relative to sysconfdir. The relative path to the configuration // file is specified in the configuration variable named by file_variable. If the configuration variable has no // value, NULL is returned. The caller MUST release the result with ats_free(). http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a1162d83/lib/records/RecCore.cc -- diff --git a/lib/records/RecCore.cc b/lib/records/RecCore.cc index 6c17cc9..96cddfc 100644 --- a/lib/records/RecCore.cc +++ b/lib/records/RecCore.cc @@ -1071,6 +1071,23 @@ RecConfigReadRuntimeDir() } //- +// RecConfigReadLogDir +//- +char * +RecConfigReadLogDir() +{ + char buf[PATH_NAME_MAX + 1]; + + buf[0] = '\0'; + RecGetRecordString(proxy.config.log.logfile_dir, buf, PATH_NAME_MAX); + if (strlen(buf) 0) { +return Layout::get()-relative(buf); + } else { +return ats_strdup(Layout::get()-logdir); + } +} + +//- // RecConfigReadSnapshotDir. //- char * http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a1162d83/proxy/InkAPITest.cc -- diff --git a/proxy/InkAPITest.cc b/proxy/InkAPITest.cc index 3e0ce3a..8f97a88 100644 --- a/proxy/InkAPITest.cc +++ b/proxy/InkAPITest.cc @@ -5340,10 +5340,9 @@ REGRESSION_TEST(SDK_API_TSTextLog) (RegressionTest * test, int /* atype ATS_UNUS /* Generate a random log file name, so if we run the test several times, we won't use the same log file name. */ - char *tmp = REC_ConfigReadString(proxy.config.log.logfile_dir); + xptrchar tmp(RecConfigReadLogDir()); snprintf(logname, sizeof(logname), RegressionTestLog%d.log, (int) getpid()); - snprintf(fullpath_logname, sizeof(fullpath_logname), %s/%s, tmp, logname); - // ats_free(tmp); + snprintf(fullpath_logname, sizeof(fullpath_logname), %s/%s, (const char *)tmp, logname); unlink(fullpath_logname); retVal = TSTextLogObjectCreate(logname, TS_LOG_MODE_ADD_TIMESTAMP, log); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a1162d83/proxy/logging/LogConfig.cc -- diff --git a/proxy/logging/LogConfig.cc b/proxy/logging/LogConfig.cc index 5810e8f..133ea21 100644 --- a/proxy/logging/LogConfig.cc +++ b/proxy/logging/LogConfig.cc @@ -240,16 +240,8 @@ LogConfig::read_configuration_variables() hostname = ptr; } - ptr = REC_ConfigReadString(proxy.config.log.logfile_dir); - if (ptr != NULL) { -ats_free(logfile_dir); -// Make it relative from Layout -logfile_dir = Layout::get()-relative(ptr); -ats_free(ptr); - } else { -ats_free(logfile_dir); -logfile_dir = ats_strdup(Layout::get()-logdir); - } + ats_free(logfile_dir); + logfile_dir = RecConfigReadLogDir(); if (access(logfile_dir, R_OK | W_OK | X_OK) == -1) { // Try 'system_root_dir/var/log/trafficserver' directory
[21/50] git commit: TS-312: Add option to always share keep-alive connections to the origin server
TS-312: Add option to always share keep-alive connections to the origin server Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/d6ab7482 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/d6ab7482 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/d6ab7482 Branch: refs/heads/5.0.x Commit: d6ab7482489be6b79d911f55564afb707c7004d6 Parents: 960c3f8 Author: Bryan Call bc...@apache.org Authored: Fri Dec 6 17:04:50 2013 -0800 Committer: Bryan Call bc...@apache.org Committed: Fri Dec 6 17:04:50 2013 -0800 -- CHANGES | 2 ++ mgmt/RecordsConfig.cc| 2 ++ proxy/http/HttpConfig.cc | 1 + proxy/http/HttpConfig.h | 1 + proxy/http/HttpSM.cc | 16 +++- 5 files changed, 13 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d6ab7482/CHANGES -- diff --git a/CHANGES b/CHANGES index cacc5ad..eca1bad 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-312] Add option to always share keep-alive connections to the origin server + *) [TS-2419] Don't close client connection when responding with a 204 and there is no body *) [TS-1146] Add RFC 5077 TLS session ticket support. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d6ab7482/mgmt/RecordsConfig.cc -- diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index a54e018..bf3674e 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -456,6 +456,8 @@ RecordElement RecordsConfig[] = { , {RECT_CONFIG, proxy.config.http.origin_min_keep_alive_connections, RECD_INT, 0, RECU_DYNAMIC, RR_NULL, RECC_STR, ^[0-9]+$, RECA_NULL} , + {RECT_CONFIG, proxy.config.http.attach_sever_session_to_client, RECD_INT, 0, RECU_DYNAMIC, RR_NULL, RECC_INT, [0-1], RECA_NULL} + , // ## // # HTTP referer filtering # http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d6ab7482/proxy/http/HttpConfig.cc -- diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc index 3c8109d..d36b3cc 100644 --- a/proxy/http/HttpConfig.cc +++ b/proxy/http/HttpConfig.cc @@ -1145,6 +1145,7 @@ HttpConfig::startup() HttpEstablishStaticConfigLongLong(c.oride.server_tcp_init_cwnd, proxy.config.http.server_tcp_init_cwnd); HttpEstablishStaticConfigLongLong(c.oride.origin_max_connections, proxy.config.http.origin_max_connections); HttpEstablishStaticConfigLongLong(c.origin_min_keep_alive_connections, proxy.config.http.origin_min_keep_alive_connections); + HttpEstablishStaticConfigLongLong(c.attach_server_session_to_client, proxy.config.http.attach_server_session_to_client); HttpEstablishStaticConfigByte(c.parent_proxy_routing_enable, proxy.config.http.parent_proxy_routing_enable); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d6ab7482/proxy/http/HttpConfig.h -- diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h index 033ee7f..a663e2f 100644 --- a/proxy/http/HttpConfig.h +++ b/proxy/http/HttpConfig.h @@ -640,6 +640,7 @@ public: MgmtInt server_max_connections; MgmtInt origin_min_keep_alive_connections; // TODO: This one really ought to be overridable, but difficult right now. + MgmtInt attach_server_session_to_client; MgmtByte parent_proxy_routing_enable; MgmtByte disable_ssl_parenting; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d6ab7482/proxy/http/HttpSM.cc -- diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 503ac9b..1ae8615 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -2934,15 +2934,13 @@ HttpSM::tunnel_handler_server(int event, HttpTunnelProducer * p) server_session-server_trans_stat--; HTTP_DECREMENT_DYN_STAT(http_current_server_transactions_stat); -// If the client is still around, attach the server session -// to so the next ka request can use it. We bind privately to the -// client to add some degree of affinity to the system. However, -// we turn off private binding when outbound connections are being -// limit since it makes it too expensive to initiate a purge of idle -// server keep-alive sessions -if (ua_session t_state.client_info.keep_alive == HTTP_KEEPALIVE -t_state.http_config_param-server_max_connections = 0 -t_state.txn_conf-origin_max_connections
[49/50] git commit: Merge branch 'master' into 5.0.x
Merge branch 'master' into 5.0.x Conflicts: CHANGES iocore/cache/CacheRead.cc Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/d6a7a9c4 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/d6a7a9c4 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/d6a7a9c4 Branch: refs/heads/5.0.x Commit: d6a7a9c4efeb0f85509b633a14acd896dc8eb3e4 Parents: c63666b 3388fd8 Author: Leif Hedstrom zw...@apache.org Authored: Sat Dec 14 14:44:55 2013 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Sat Dec 14 14:44:55 2013 -0700 -- .gitattributes |1 - CHANGES | 70 + Makefile.am |6 +- build/crypto.m4 | 48 + ci/jenkins/git-jenkins-setup.sh | 55 + ci/jenkins/git-jenkins-update.sh| 44 + ci/jenkins/jobs.yaml|8 +- ci/jenkins/records.config |3 - ci/regression |1 + cmd/traffic_cop/traffic_cop.cc | 18 +- cmd/traffic_top/stats.h |4 +- configure.ac| 72 +- doc/Makefile.am | 19 +- doc/admin/event-logging-formats.en.rst |3 + doc/admin/faqs.en.rst |2 +- doc/admin/index.en.rst |8 + doc/admin/performance-tuning.en.rst | 54 + doc/arch/cache/cache-appendix.en.rst|6 +- doc/arch/cache/tier-storage.en.rst |2 +- doc/arch/index.en.rst |1 + doc/conf.py | 44 +- doc/reference/api/TSUrlCreate.en.rst| 144 +- doc/reference/api/TSUrlHostGet.en.rst | 79 + doc/reference/api/TSUrlHostSet.en.rst | 74 + doc/reference/api/TSUrlPercentEncode.en.rst | 67 + doc/reference/api/TSUrlStringGet.en.rst | 67 + doc/reference/api/index.en.rst |4 + doc/reference/commands/traffic_server.en.rst|2 - .../configuration/records.config.en.rst | 108 +- doc/reference/configuration/remap.config.en.rst | 53 +- .../configuration/ssl_multicert.config.en.rst | 57 +- .../configuration/storage.config.en.rst |5 + doc/reference/plugins/balancer.en.rst | 18 +- doc/reference/plugins/cacheurl.en.rst | 30 +- doc/reference/plugins/index.en.rst |6 +- doc/reference/plugins/regex_remap.en.rst| 27 +- doc/reference/plugins/ts_lua.en.rst | 584 doc/reference/plugins/xdebug.en.rst | 45 + doc/sdk/http-hooks-and-transactions.en.rst | 85 +- .../adding-hooks.en.rst | 14 +- ...e-buffered-null-transformation-plugin.en.rst | 10 +- .../unable-to-debug-tags.en.rst |4 +- example/app-template/app-template.cc| 19 +- iocore/Makefile.am |7 +- iocore/aio/AIO.cc |2 +- iocore/aio/Makefile.am |1 - iocore/cache/Cache.cc | 73 +- iocore/cache/CacheHosting.cc| 42 +- iocore/cache/CacheHttp.cc | 16 +- iocore/cache/CachePages.cc |2 - iocore/cache/CachePagesInternal.cc |4 - iocore/cache/CacheRead.cc | 21 +- iocore/cache/CacheWrite.cc |4 + iocore/cache/I_CacheDefs.h |2 +- iocore/cache/Makefile.am| 12 - iocore/cache/Notes |3 - iocore/cache/P_CacheHosting.h |5 +- iocore/cache/P_CacheInternal.h | 12 +- iocore/cache/Store.cc | 12 +- iocore/cluster/ClusterAPI.cc|7 - iocore/cluster/ClusterHandlerBase.cc|5 +- iocore/cluster/ClusterMachine.cc| 12 +- iocore/cluster/ClusterProcessor.cc |2 - iocore/cluster/Makefile.am |2 - iocore/cluster/P_ClusterCache.h |2 - iocore/cluster/P_ClusterInternal.h |2 - iocore/dns/DNS.cc |1 - iocore/dns/Makefile.am |9 - iocore/dns/P_DNSProcessor.h | 26 + iocore/dns/P_SplitDNSProcessor.h| 27 - iocore/eventsystem/Makefile.am |1 - iocore/hostdb/HostDB.cc | 65 +- iocore/hostdb/Makefile.am | 10 -
[35/50] git commit: doc: fix various sphinx syntax errors
doc: fix various sphinx syntax errors Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/5e256d25 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/5e256d25 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/5e256d25 Branch: refs/heads/5.0.x Commit: 5e256d253eeb3554cd942f8349032deb4b9c8afa Parents: 8b6ab74 Author: James Peach jpe...@apache.org Authored: Sat Dec 7 19:59:15 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Tue Dec 10 09:19:35 2013 -0800 -- doc/reference/plugins/balancer.en.rst | 18 ++ doc/reference/plugins/index.en.rst| 4 ++-- 2 files changed, 8 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5e256d25/doc/reference/plugins/balancer.en.rst -- diff --git a/doc/reference/plugins/balancer.en.rst b/doc/reference/plugins/balancer.en.rst index 4fba905..43aa3ed 100644 --- a/doc/reference/plugins/balancer.en.rst +++ b/doc/reference/plugins/balancer.en.rst @@ -24,18 +24,16 @@ Balancer Plugin This is a plugin for Traffic Server, that allows you to configure mapping rules. -To use this plugin, configure a remap.config rule like +To use this plugin, configure a remap.config rule like this:: -:: map http://foo.com http://bar.com @plugin=balancer.so @pparam=rotation:news The To-Url in the remap.config rule is generally not used, unless the lookup completely fails (i.e. this is a backup URL for extreme error cases). -This is a list of all available options (set via @pparam): +This is a list of all available options (set via @pparam):: -:: rotation The name of the rotation (e.g. news) [to-host in remap] hash What to hash on, url, path, cookie, ip, header (primary) hash2 Optional, secondary hash, to hash within a multi-host bucket @@ -46,28 +44,24 @@ not specified, we will default to the same name as used in the To URL in the remap rule. The bucket width specifies how many hosts a particular hash bucket -should contain, for example: +should contain, for example:: -:: @pparam=bucketw:2 The hash parameter can be used zero or more times, without it, no hashing is done at all. If you have more than one hash keys, they are -concatenated in the order specified. For example: +concatenated in the order specified. For example:: -:: @pparam=hash:ip @pparam=hash:cookie/B -The header hash key takes a required extra value, for example: +The header hash key takes a required extra value, for example:: -:: @pparam=hash:header/Host For cookie hash keys, you can optionally specify an identifier for which cookie to use (without it, the entire cookie header is used). For -example: +example:: -:: @pparam=hash:cookie/B The secondary hash (hash2) is used to provide stickiness within a http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5e256d25/doc/reference/plugins/index.en.rst -- diff --git a/doc/reference/plugins/index.en.rst b/doc/reference/plugins/index.en.rst index 875b325..4001acc 100644 --- a/doc/reference/plugins/index.en.rst +++ b/doc/reference/plugins/index.en.rst @@ -51,8 +51,8 @@ Experimental plugins Plugins that are considered experimental are located in the -```plugins/experimental`` https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;a=tree;f=plugins/experimental;hb=HEAD`_ -directory in the Apache Traffic Server source tree. Exmperimental plugins can be compiled by passing the +`plugins/experimental https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;a=tree;f=plugins/experimental;hb=HEAD`_ +directory of the Apache Traffic Server source tree. Exmperimental plugins can be compiled by passing the `--enable-experimental-plugins` option to `configure`:: $ autoconf -i
[36/50] git commit: TS-2426: add the xdebug plugin
TS-2426: add the xdebug plugin The xdebug plugin scans X-Debug header values and emits the requested debug information. The plugin is named after the X- prefix of the headers that is scans and emits. The values we scan for are names of debug headers. The first header to be supported is X-Cache-Key, which report the cache lookup URL used buy the request. the second header supported is the Via header, which causes a verbose Via header to be emitted for the request. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/14667c65 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/14667c65 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/14667c65 Branch: refs/heads/5.0.x Commit: 14667c65ff72d6af5da9bec62c41548076093091 Parents: 5e256d2 Author: James Peach jpe...@apache.org Authored: Tue Dec 3 15:03:36 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Tue Dec 10 09:26:51 2013 -0800 -- CHANGES | 3 + configure.ac | 1 + plugins/experimental/Makefile.am | 23 +-- plugins/experimental/xdebug/xdebug.cc | 217 + 4 files changed, 234 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/14667c65/CHANGES -- diff --git a/CHANGES b/CHANGES index 49488e9..30afc6c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + + *) [TS-2426] Add a new plugin, xdebug, for cache debugging using HTTP headers. + *) [TS-2077] Remove pipeline configurations, they were no-op's anyways. We still support pipelining (we always do), it's just not treated specially (or optimized). http://git-wip-us.apache.org/repos/asf/trafficserver/blob/14667c65/configure.ac -- diff --git a/configure.ac b/configure.ac index fd41a1b..c16f89f 100644 --- a/configure.ac +++ b/configure.ac @@ -1935,6 +1935,7 @@ AC_CONFIG_FILES([ plugins/experimental/tcp_info/Makefile plugins/experimental/healthchecks/Makefile plugins/experimental/remap_stats/Makefile + plugins/experimental/xdebug/Makefile plugins/gzip/Makefile plugins/libloader/Makefile plugins/header_filter/Makefile http://git-wip-us.apache.org/repos/asf/trafficserver/blob/14667c65/plugins/experimental/Makefile.am -- diff --git a/plugins/experimental/Makefile.am b/plugins/experimental/Makefile.am index b0e4d98..3d5a453 100644 --- a/plugins/experimental/Makefile.am +++ b/plugins/experimental/Makefile.am @@ -15,19 +15,22 @@ # limitations under the License. if BUILD_EXPERIMENTAL_PLUGINS + SUBDIRS = \ - lua \ - ts_lua \ + authproxy \ buffer_upload \ - esi \ - rfc5861 \ - tcp_info \ - custom_redirect \ - metalink \ - spdy \ channel_stats \ - authproxy \ + custom_redirect \ + esi \ geoip_acl \ healthchecks \ - remap_stats + lua \ + metalink \ + remap_stats \ + rfc5861 \ + spdy \ + tcp_info \ + ts_lua \ + xdebug + endif http://git-wip-us.apache.org/repos/asf/trafficserver/blob/14667c65/plugins/experimental/xdebug/xdebug.cc -- diff --git a/plugins/experimental/xdebug/xdebug.cc b/plugins/experimental/xdebug/xdebug.cc new file mode 100644 index 000..e33ffa3 --- /dev/null +++ b/plugins/experimental/xdebug/xdebug.cc @@ -0,0 +1,217 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include ts/ts.h +#include stdlib.h +#include strings.h + +// The name of the debug request header. This should probably be configurable. +#define X_DEBUG_HEADER X-Debug + +#define XHEADER_X_CACHE_KEY 0x0004u + +static int XArgIndex = 0; +static TSCont XInjectHeadersCont = NULL; + +// Return the length of a string literal. +template int N unsigned
[15/50] git commit: TS-1146: consistently apply 2char indentation
TS-1146: consistently apply 2char indentation Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/0850f4c3 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/0850f4c3 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/0850f4c3 Branch: refs/heads/5.0.x Commit: 0850f4c3a833a76779be65b769fc0e239e6fc93f Parents: eaaf889 Author: James Peach jpe...@apache.org Authored: Fri Dec 6 14:38:40 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Fri Dec 6 14:39:10 2013 -0800 -- iocore/net/SSLUtils.cc | 141 ++-- 1 file changed, 71 insertions(+), 70 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0850f4c3/iocore/net/SSLUtils.cc -- diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc index a958b4a..ce1d383 100644 --- a/iocore/net/SSLUtils.cc +++ b/iocore/net/SSLUtils.cc @@ -50,9 +50,9 @@ #ifndef evp_md_func #ifdef OPENSSL_NO_SHA256 -#define evp_md_func EVP_sha1() +#define evp_md_func EVP_sha1() #else -#define evp_md_func EVP_sha256() +#define evp_md_func EVP_sha256() #endif #endif @@ -64,9 +64,9 @@ typedef SSL_METHOD * ink_ssl_method_t; struct ssl_ticket_key_t { -unsigned char key_name[16]; -unsigned char hmac_secret[16]; -unsigned char aes_key[16]; + unsigned char key_name[16]; + unsigned char hmac_secret[16]; + unsigned char aes_key[16]; }; static ProxyMutex ** sslMutexArray; @@ -76,24 +76,24 @@ static int ssl_session_ticket_index = 0; struct ats_file_bio { -ats_file_bio(const char * path, const char * mode) - : bio(BIO_new_file(path, mode)) { -} + ats_file_bio(const char * path, const char * mode) +: bio(BIO_new_file(path, mode)) { + } -~ats_file_bio() { -(void)BIO_set_close(bio, BIO_CLOSE); -BIO_free(bio); -} + ~ats_file_bio() { +(void)BIO_set_close(bio, BIO_CLOSE); +BIO_free(bio); + } -operator bool() const { -return bio != NULL; -} + operator bool() const { +return bio != NULL; + } -BIO * bio; + BIO * bio; private: -ats_file_bio(const ats_file_bio); -ats_file_bio operator=(const ats_file_bio); + ats_file_bio(const ats_file_bio); + ats_file_bio operator=(const ats_file_bio); }; static unsigned long @@ -238,13 +238,13 @@ ssl_context_enable_tickets(SSL_CTX * ctx, const char * ticket_key_path) ticket_key_data = readIntoBuffer(ticket_key_path, __func__, ticket_key_len); if (!ticket_key_data) { - Error(failed to read SSL session ticket key from %s, (const char *)ticket_key_path); - goto fail; +Error(failed to read SSL session ticket key from %s, (const char *)ticket_key_path); +goto fail; } if (ticket_key_len 48) { - Error(SSL session ticket key from %s is too short (48 bytes are required), (const char *)ticket_key_path); - goto fail; +Error(SSL session ticket key from %s is too short (48 bytes are required), (const char *)ticket_key_path); +goto fail; } ticket_key = NEW(new ssl_ticket_key_t()); @@ -256,13 +256,13 @@ ssl_context_enable_tickets(SSL_CTX * ctx, const char * ticket_key_path) // SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB constant. we set the callback first // so that we don't leave a ticket_key pointer attached if it fails. if (SSL_CTX_set_tlsext_ticket_key_cb(ctx, ssl_callback_session_ticket) == 0) { - Error(failed to set session ticket callback); - goto fail; +Error(failed to set session ticket callback); +goto fail; } if (SSL_CTX_set_ex_data(ctx, ssl_session_ticket_index, ticket_key) == 0) { - Error (failed to set session ticket data to ctx); - goto fail; +Error (failed to set session ticket data to ctx); +goto fail; } SSL_CTX_clear_options(ctx, SSL_OP_NO_TICKET); @@ -581,12 +581,12 @@ fail: static char * asn1_strdup(ASN1_STRING * s) { -// Make sure we have an 8-bit encoding. -ink_assert(ASN1_STRING_type(s) == V_ASN1_IA5STRING || - ASN1_STRING_type(s) == V_ASN1_UTF8STRING || - ASN1_STRING_type(s) == V_ASN1_PRINTABLESTRING); + // Make sure we have an 8-bit encoding. + ink_assert(ASN1_STRING_type(s) == V_ASN1_IA5STRING || +ASN1_STRING_type(s) == V_ASN1_UTF8STRING || +ASN1_STRING_type(s) == V_ASN1_PRINTABLESTRING); -return ats_strndup((const char *)ASN1_STRING_data(s), ASN1_STRING_length(s)); + return ats_strndup((const char *)ASN1_STRING_data(s), ASN1_STRING_length(s)); } // Given a certificate and it's corresponding SSL_CTX context, insert hash @@ -686,8 +686,8 @@ ssl_store_ssl_context( // Session tickets are enabled by default. Disable if explicitly requested. if (session_ticket_enabled == 0) { -
[28/50] git commit: Bump sphinx docs version to match autoconf
Bump sphinx docs version to match autoconf Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/b57a8095 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/b57a8095 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/b57a8095 Branch: refs/heads/5.0.x Commit: b57a80952416ba7edba13d03b402e77c53733515 Parents: a2de1c0 Author: James Peach jpe...@apache.org Authored: Sat Dec 7 20:32:56 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Sat Dec 7 20:32:56 2013 -0800 -- doc/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b57a8095/doc/conf.py -- diff --git a/doc/conf.py b/doc/conf.py index 6b19426..43c8f1b 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -69,9 +69,9 @@ copyright = u'2013, d...@trafficserver.apache.org' # update a reasonable version number here. # # The short X.Y version. -version = '4.1' +version = '4.2' # The full version, including alpha/beta/rc tags. -release = '4.1.x' +release = '4.2.x' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.
[02/50] git commit: TS-2401: Replace system_root_dir with Layout::prefix
TS-2401: Replace system_root_dir with Layout::prefix Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fa100cff Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fa100cff Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fa100cff Branch: refs/heads/5.0.x Commit: fa100cffa77b33c723ad0236876477a3c054bac1 Parents: bb26f42 Author: James Peach jpe...@apache.org Authored: Wed Nov 27 14:50:48 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Thu Dec 5 20:33:48 2013 -0800 -- example/app-template/app-template.cc | 8 +++- iocore/hostdb/HostDB.cc | 2 +- lib/records/I_RecDefs.h | 1 - mgmt/Main.cc | 9 - proxy/InkAPI.cc | 2 +- proxy/Main.cc| 10 +- proxy/logging/LogStandalone.cc | 1 - 7 files changed, 14 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fa100cff/example/app-template/app-template.cc -- diff --git a/example/app-template/app-template.cc b/example/app-template/app-template.cc index d4d63cd..fefff13 100644 --- a/example/app-template/app-template.cc +++ b/example/app-template/app-template.cc @@ -53,7 +53,6 @@ int system_num_of_processors = ink_number_of_processors(); int system_num_of_net_threads = DEFAULT_NUMBER_OF_THREADS; int system_num_of_udp_threads = DEFAULT_NUMBER_OF_UDP_THREADS; -char system_root_dir[PATH_NAME_MAX + 1]; char system_runtime_dir[PATH_NAME_MAX + 1]; char system_config_directory[PATH_NAME_MAX + 1]; char system_log_dir[PATH_NAME_MAX + 1]; @@ -158,17 +157,16 @@ int main(int argc, char * argv[]) } // Get TS directories - ink_strlcpy(system_root_dir, Layout::get()-prefix, sizeof(system_root_dir)); ink_strlcpy(system_config_directory, Layout::get()-sysconfdir, sizeof(system_config_directory)); ink_strlcpy(system_runtime_dir, Layout::get()-runtimedir, sizeof(system_runtime_dir)); ink_strlcpy(system_log_dir, Layout::get()-logdir, sizeof(system_log_dir)); - if (system_root_dir[0] (chdir(system_root_dir) 0)) { -fprintf(stderr,unable to change to root directory \%s\ [%d '%s']\n, system_root_dir, errno, strerror(errno)); + if (chdir(Layout::get()-prefix) 0) { +fprintf(stderr,unable to change to root directory \%s\ [%d '%s']\n, Layout::get()-prefix, errno, strerror(errno)); fprintf(stderr, please set correct path in env variable TS_ROOT \n); _exit(1); } else { -printf([tsapp] using root directory '%s'\n,system_root_dir); +printf([tsapp] using root directory '%s'\n, Layou::get()-prefix); } // Diags http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fa100cff/iocore/hostdb/HostDB.cc -- diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc index 0b114b4..0ffd5bc 100644 --- a/iocore/hostdb/HostDB.cc +++ b/iocore/hostdb/HostDB.cc @@ -391,7 +391,7 @@ HostDBCache::start(int flags) REC_ReadConfigInt32(storage_size, proxy.config.hostdb.storage_size); if (storage_path[0] != '/') { -Layout::relative_to(storage_path, PATH_NAME_MAX, system_root_dir, storage_path); +Layout::relative_to(storage_path, PATH_NAME_MAX, Layout::get()-prefix, storage_path); } Debug(hostdb, Storage path is %s, storage_path); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fa100cff/lib/records/I_RecDefs.h -- diff --git a/lib/records/I_RecDefs.h b/lib/records/I_RecDefs.h index 9a22613..4517357 100644 --- a/lib/records/I_RecDefs.h +++ b/lib/records/I_RecDefs.h @@ -177,7 +177,6 @@ typedef int (*RecRawStatSyncCb) (const char *name, RecDataT data_type, RecData * // System Defaults -extern char system_root_dir[PATH_NAME_MAX + 1]; extern char system_runtime_dir[PATH_NAME_MAX + 1]; extern char system_config_directory[PATH_NAME_MAX + 1]; extern char system_log_dir[PATH_NAME_MAX + 1]; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fa100cff/mgmt/Main.cc -- diff --git a/mgmt/Main.cc b/mgmt/Main.cc index 59d697a..a48686b 100644 --- a/mgmt/Main.cc +++ b/mgmt/Main.cc @@ -78,7 +78,6 @@ static char action_tags[1024] = ; static bool proxy_on = true; // TODO: Check if really need those -char system_root_dir[PATH_NAME_MAX + 1]; char system_runtime_dir[PATH_NAME_MAX + 1]; char system_config_directory[PATH_NAME_MAX + 1]; char system_log_dir[PATH_NAME_MAX + 1]; @@ -301,13 +300,14 @@ init_dirs() static void chdir_root() { + const char * prefix = Layout::get()-prefix; - if (system_root_dir[0]
[38/50] git commit: TS-2426: add xdebug plugin Makefile.am
TS-2426: add xdebug plugin Makefile.am Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/5cce7365 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/5cce7365 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/5cce7365 Branch: refs/heads/5.0.x Commit: 5cce7365fff855589a5107333871b213d3784ec4 Parents: 399e27c Author: James Peach jpe...@apache.org Authored: Tue Dec 10 10:07:07 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Tue Dec 10 10:07:07 2013 -0800 -- plugins/experimental/xdebug/Makefile.am | 22 ++ 1 file changed, 22 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5cce7365/plugins/experimental/xdebug/Makefile.am -- diff --git a/plugins/experimental/xdebug/Makefile.am b/plugins/experimental/xdebug/Makefile.am new file mode 100644 index 000..452c210 --- /dev/null +++ b/plugins/experimental/xdebug/Makefile.am @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# License); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +include $(top_srcdir)/build/plugins.mk + +pkglib_LTLIBRARIES = xdebug.la +xdebug_la_SOURCES = xdebug.cc +xdebug_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS) +
[23/50] git commit: TS-2082: remove NON_MODULAR define
TS-2082: remove NON_MODULAR define Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/5140b18d Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/5140b18d Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/5140b18d Branch: refs/heads/5.0.x Commit: 5140b18d0c15be1b532edab8c92b00b7c862324f Parents: 51ce9ae Author: Zhao Yongming ming@gmail.com Authored: Thu Nov 7 18:53:14 2013 +0800 Committer: Zhao Yongming ming@gmail.com Committed: Sat Dec 7 14:30:19 2013 +0800 -- iocore/cache/Cache.cc| 11 +- iocore/cache/CachePages.cc | 2 -- iocore/cache/CachePagesInternal.cc | 4 iocore/cluster/ClusterAPI.cc | 7 --- iocore/cluster/ClusterHandlerBase.cc | 5 + iocore/cluster/ClusterProcessor.cc | 2 -- iocore/cluster/P_ClusterCache.h | 2 -- iocore/cluster/P_ClusterInternal.h | 2 -- iocore/hostdb/HostDB.cc | 34 --- iocore/hostdb/MultiCache.cc | 6 -- iocore/net/I_Socks.h | 3 +-- iocore/net/UnixNetPages.cc | 4 iocore/net/UnixNetProcessor.cc | 4 lib/ts/ink_config.h.in | 1 - 14 files changed, 3 insertions(+), 84 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5140b18d/iocore/cache/Cache.cc -- diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc index 39688a7..711b7c9 100644 --- a/iocore/cache/Cache.cc +++ b/iocore/cache/Cache.cc @@ -25,10 +25,8 @@ #include P_Cache.h // Cache Inspector and State Pages -#ifdef NON_MODULAR #include P_CacheTest.h #include StatPages.h -#endif #include I_Layout.h @@ -580,7 +578,7 @@ static const int DEFAULT_CACHE_OPTIONS = (O_RDWR | _O_ATTRIB_OVERLAPPED); int CacheProcessor::start_internal(int flags) { -#ifdef NON_MODULAR + ink_assert((int)TS_EVENT_CACHE_OPEN_READ == (int)CACHE_EVENT_OPEN_READ); ink_assert((int)TS_EVENT_CACHE_OPEN_READ_FAILED == (int)CACHE_EVENT_OPEN_READ_FAILED); ink_assert((int)TS_EVENT_CACHE_OPEN_WRITE == (int)CACHE_EVENT_OPEN_WRITE); @@ -593,7 +591,6 @@ CacheProcessor::start_internal(int flags) ink_assert((int)TS_EVENT_CACHE_SCAN_OPERATION_BLOCKED == (int)CACHE_EVENT_SCAN_OPERATION_BLOCKED); ink_assert((int)TS_EVENT_CACHE_SCAN_OPERATION_FAILED == (int)CACHE_EVENT_SCAN_OPERATION_FAILED); ink_assert((int)TS_EVENT_CACHE_SCAN_DONE == (int)CACHE_EVENT_SCAN_DONE); -#endif #if AIO_MODE == AIO_MODE_NATIVE int etype = ET_NET; @@ -2218,12 +2215,10 @@ AIO_Callback_handler::handle_disk_failure(int /* event ATS_UNUSED */, void *data int Cache::open_done() { -#ifdef NON_MODULAR Action *register_ShowCache(Continuation * c, HTTPHdr * h); Action *register_ShowCacheInternal(Continuation *c, HTTPHdr *h); statPagesManager.register_http(cache, register_ShowCache); statPagesManager.register_http(cache-internal, register_ShowCacheInternal); -#endif if (total_good_nvol == 0) { ready = CACHE_INIT_FAILED; cacheProcessor.cacheInitialized(); @@ -2645,7 +2640,6 @@ Cache::lookup(Continuation *cont, CacheKey *key, CacheFragType type, char *hostn return ACTION_RESULT_DONE; } -#ifdef NON_MODULAR Action * Cache::lookup(Continuation *cont, CacheURL *url, CacheFragType type) { @@ -2656,7 +2650,6 @@ Cache::lookup(Continuation *cont, CacheURL *url, CacheFragType type) const char *hostname = url-host_get(len); return lookup(cont, md5, type, (char *) hostname, len); } -#endif int CacheVC::removeEvent(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */) @@ -3417,7 +3410,6 @@ ink_cache_init(ModuleVersion v) #endif } -#ifdef NON_MODULAR // Action * CacheProcessor::open_read(Continuation *cont, URL *url, bool cluster_cache_local, CacheHTTPHdr *request, @@ -3483,4 +3475,3 @@ CacheProcessor::remove(Continuation *cont, URL *url, bool cluster_cache_local, C return caches[frag_type]-remove(cont, md5, frag_type, true, false, const_castchar*(hostname), len); } -#endif http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5140b18d/iocore/cache/CachePages.cc -- diff --git a/iocore/cache/CachePages.cc b/iocore/cache/CachePages.cc index e30dba0..08ef4b7 100644 --- a/iocore/cache/CachePages.cc +++ b/iocore/cache/CachePages.cc @@ -23,7 +23,6 @@ #include P_Cache.h -#ifdef NON_MODULAR #include api/ts/ts.h #include Show.h #include I_Tasks.h @@ -640,4 +639,3 @@ ShowCache::handleCacheScanCallback(int event, Event *e) } } -#endif // NON_MODULAR
[07/50] git commit: TS-2401: Remove system_config_directory
TS-2401: Remove system_config_directory Remove all the places the global system_config_directory is used, replacing it with Layout::get()-sysconfdir where appropriate. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/67306a71 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/67306a71 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/67306a71 Branch: refs/heads/5.0.x Commit: 67306a71da65f135ff85c2f4d9b966122fa5590a Parents: f438ab4 Author: James Peach jpe...@apache.org Authored: Mon Dec 2 14:48:49 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Thu Dec 5 20:33:49 2013 -0800 -- example/app-template/app-template.cc | 7 --- lib/records/I_RecCore.h | 11 +++- lib/records/I_RecDefs.h | 3 - lib/records/RecCore.cc | 34 mgmt/FileManager.cc | 92 +-- mgmt/FileManager.h | 1 - mgmt/LocalManager.cc | 18 ++ mgmt/LocalManager.h | 4 +- mgmt/Main.cc | 18 ++ mgmt/Main.h | 1 - mgmt/Rollback.cc | 34 +++- mgmt/Rollback.h | 1 - mgmt/cluster/VMap.cc | 13 ++--- mgmt/web2/WebIntrMain.cc | 4 +- proxy/ControlMatcher.cc | 13 ++--- proxy/ControlMatcher.h | 5 +- proxy/ICPConfig.cc | 13 ++--- proxy/IPAllow.cc | 13 ++--- proxy/IPAllow.h | 1 - proxy/InkAPI.cc | 3 +- proxy/Main.cc| 35 +++- proxy/Plugin.cc | 32 +-- proxy/Plugin.h | 3 +- proxy/Prefetch.cc| 15 ++--- proxy/Update.cc | 10 ++-- proxy/http/HttpBodyFactory.cc| 27 - proxy/http/HttpBodyFactory.h | 1 - proxy/logging/LogConfig.cc | 30 -- proxy/logging/LogStandalone.cc | 4 -- proxy/sac.cc | 8 +-- 30 files changed, 151 insertions(+), 303 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/67306a71/example/app-template/app-template.cc -- diff --git a/example/app-template/app-template.cc b/example/app-template/app-template.cc index af23b2b..234bf77 100644 --- a/example/app-template/app-template.cc +++ b/example/app-template/app-template.cc @@ -53,8 +53,6 @@ int system_num_of_processors = ink_number_of_processors(); int system_num_of_net_threads = DEFAULT_NUMBER_OF_THREADS; int system_num_of_udp_threads = DEFAULT_NUMBER_OF_UDP_THREADS; -char system_config_directory[PATH_NAME_MAX + 1]; - //int system_remote_management_flag = DEFAULT_REMOTE_MANAGEMENT_FLAG; //Diags *diags = NULL; @@ -154,9 +152,6 @@ int main(int argc, char * argv[]) _exit(0); } - // Get TS directories - ink_strlcpy(system_config_directory, Layout::get()-sysconfdir, sizeof(system_config_directory)); - if (chdir(Layout::get()-prefix) 0) { fprintf(stderr,unable to change to root directory \%s\ [%d '%s']\n, Layout::get()-prefix, errno, strerror(errno)); fprintf(stderr, please set correct path in env variable TS_ROOT \n); @@ -226,8 +221,6 @@ int main(int argc, char * argv[]) // initialize logging (after event and net processor) //Log::init(system_remote_management_flag ? 0 : Log::NO_REMOTE_MANAGEMENT); - //plugin_init(system_config_directory); // plugin.config - // Create accept continuation MyAccept *a = new MyAccept; a-accept_port = tsapp_port; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/67306a71/lib/records/I_RecCore.h -- diff --git a/lib/records/I_RecCore.h b/lib/records/I_RecCore.h index 86f6595..44b0922 100644 --- a/lib/records/I_RecCore.h +++ b/lib/records/I_RecCore.h @@ -46,9 +46,18 @@ void RecConfigFileInit(void); int RecConfigFileParse(const char * path, RecConfigEntryCallback handler, bool inc_version); // Return a copy of the system's local state directory, taking proxy.config.local_state_dir into account. The -// caller MUST releease the result with ats_free(). +// caller MUST release the result with ats_free(). char * RecConfigReadRuntimeDir(); +// Return a copy of the system's snapshot directory, taking proxy.config.snapshot_dir into account. The caller +// MUST release the result with ats_free(). +char * RecConfigReadSnapshotDir(); + +// Return a copy of a configuration file that is relative to sysconfdir. The relative path to the configuration +// file is specified in the configuration
[04/50] git commit: TS-2401: update records.config layout documentation
TS-2401: update records.config layout documentation Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/ccc01b66 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/ccc01b66 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/ccc01b66 Branch: refs/heads/5.0.x Commit: ccc01b66370d4f617b8685b6ba755188344cc215 Parents: a1162d8 Author: James Peach jpe...@apache.org Authored: Thu Dec 5 20:29:52 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Thu Dec 5 20:33:49 2013 -0800 -- .../configuration/records.config.en.rst | 24 ++-- 1 file changed, 17 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ccc01b66/doc/reference/configuration/records.config.en.rst -- diff --git a/doc/reference/configuration/records.config.en.rst b/doc/reference/configuration/records.config.en.rst index 000ed19..bbe1a4d 100644 --- a/doc/reference/configuration/records.config.en.rst +++ b/doc/reference/configuration/records.config.en.rst @@ -166,9 +166,13 @@ System Variables The script executed before the :program:`traffic_manager` process spawns the :program:`traffic_server` process. -.. ts:cv:: CONFIG proxy.config.config_dir STRING config +.. ts:cv:: CONFIG proxy.config.config_dir STRING etc/trafficserver The directory that contains Traffic Server configuration files. + This is a read-only configuration option that contains the + ``SYSCONFDIR`` value specified at build time relative to the + installation prefic. THe ``$TS_ROOT`` environment variable can + be used alter the installation prefix at run time. .. ts:cv:: CONFIG proxy.config.alarm_email STRING :reloadable: @@ -200,8 +204,10 @@ A value of ``0`` means no signal will be sent. .. ts:cv:: CONFIG proxy.config.snapshot_dir STRING snapshots - The directory in which Traffic Server stores configuration snapshots on the local system. Unless you specify an absolute path, this - directory is located in the Traffic Server ``config`` directory. + The directory in which Traffic Server stores configuration + snapshots on the local system. Unless you specify an absolute + path, this directory is located in the Traffic Server ``SYSCONFDIR`` + directory. .. ts:cv:: CONFIG proxy.config.exec_thread.autoconfig INT 1 @@ -1293,9 +1299,11 @@ Customizable User Response Pages Enables (``1``) or disables (``0``) logging for customizable response pages. When enabled, Traffic Server records a message in the error log each time a customized response page is used or modified. -.. ts:cv:: CONFIG proxy.config.body_factory.template_sets_dir STRING config/body_factory +.. ts:cv:: CONFIG proxy.config.body_factory.template_sets_dir STRING etc/trafficserver/body_factory - The customizable response page default directory. + The customizable response page default directory. If this is a + relative path, Traffic Server resolves it relative to the + ``PREFIX`` directory. .. ts:cv:: CONFIG proxy.config.body_factory.response_suppression_mode INT 0 @@ -1556,10 +1564,12 @@ Logging Configuration The hostname of the machine running Traffic Server. -.. ts:cv:: CONFIG proxy.config.log.logfile_dir STRING install_dir\ ``/logs`` +.. ts:cv:: CONFIG proxy.config.log.logfile_dir STRING var/log/trafficserver :reloadable: - The full path to the logging directory. This can be an absolute path or a path relative to the directory in which Traffic Server is installed. + The path to the logging directory. This can be an absolute path + or a path relative to the ``PREFIX`` directory in which Traffic + Server is installed. .. note:: The directory you specify must already exist.
[09/50] git commit: TS-2401: Remove global system_log_dir
TS-2401: Remove global system_log_dir In the 2 places that actually look at this, we implement the predictable semantics of using proxy.config.log.logfile_dir (relative to $PREFIX) if it is specified. Otherwise we use the compile-time log directory. In either case, we never fall back to different directories. We either use the one specified by the operator or fail loudly and suddenly. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/88f51768 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/88f51768 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/88f51768 Branch: refs/heads/5.0.x Commit: 88f51768941ea440a19d8ff9ee5ef8907b72b782 Parents: bdd7af5 Author: James Peach jpe...@apache.org Authored: Wed Nov 27 15:51:49 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Thu Dec 5 20:33:49 2013 -0800 -- example/app-template/app-template.cc | 2 -- lib/records/I_RecDefs.h | 1 - mgmt/Main.cc | 9 proxy/Initialize.cc | 2 +- proxy/Main.cc| 13 --- proxy/logging/LogConfig.cc | 24 +--- proxy/logging/LogStandalone.cc | 1 - proxy/sac.cc | 8 --- proxy/shared/DiagsConfig.cc | 37 ++- 9 files changed, 32 insertions(+), 65 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/88f51768/example/app-template/app-template.cc -- diff --git a/example/app-template/app-template.cc b/example/app-template/app-template.cc index fefff13..5f8cb6d 100644 --- a/example/app-template/app-template.cc +++ b/example/app-template/app-template.cc @@ -55,7 +55,6 @@ int system_num_of_udp_threads = DEFAULT_NUMBER_OF_UDP_THREADS; char system_runtime_dir[PATH_NAME_MAX + 1]; char system_config_directory[PATH_NAME_MAX + 1]; -char system_log_dir[PATH_NAME_MAX + 1]; //int system_remote_management_flag = DEFAULT_REMOTE_MANAGEMENT_FLAG; @@ -159,7 +158,6 @@ int main(int argc, char * argv[]) // Get TS directories ink_strlcpy(system_config_directory, Layout::get()-sysconfdir, sizeof(system_config_directory)); ink_strlcpy(system_runtime_dir, Layout::get()-runtimedir, sizeof(system_runtime_dir)); - ink_strlcpy(system_log_dir, Layout::get()-logdir, sizeof(system_log_dir)); if (chdir(Layout::get()-prefix) 0) { fprintf(stderr,unable to change to root directory \%s\ [%d '%s']\n, Layout::get()-prefix, errno, strerror(errno)); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/88f51768/lib/records/I_RecDefs.h -- diff --git a/lib/records/I_RecDefs.h b/lib/records/I_RecDefs.h index 4517357..302b3c9 100644 --- a/lib/records/I_RecDefs.h +++ b/lib/records/I_RecDefs.h @@ -179,6 +179,5 @@ typedef int (*RecRawStatSyncCb) (const char *name, RecDataT data_type, RecData * // System Defaults extern char system_runtime_dir[PATH_NAME_MAX + 1]; extern char system_config_directory[PATH_NAME_MAX + 1]; -extern char system_log_dir[PATH_NAME_MAX + 1]; #endif http://git-wip-us.apache.org/repos/asf/trafficserver/blob/88f51768/mgmt/Main.cc -- diff --git a/mgmt/Main.cc b/mgmt/Main.cc index a48686b..c8e1a33 100644 --- a/mgmt/Main.cc +++ b/mgmt/Main.cc @@ -80,7 +80,6 @@ static bool proxy_on = true; // TODO: Check if really need those char system_runtime_dir[PATH_NAME_MAX + 1]; char system_config_directory[PATH_NAME_MAX + 1]; -char system_log_dir[PATH_NAME_MAX + 1]; char mgmt_path[PATH_NAME_MAX + 1]; @@ -287,14 +286,6 @@ init_dirs() mgmt_elog(0, please set 'proxy.config.local_state_dir'\n); _exit(1); } - - REC_ReadConfigString(buf, proxy.config.log.logfile_dir, PATH_NAME_MAX); - Layout::get()-relative(system_log_dir, PATH_NAME_MAX, buf); - if (access(system_log_dir, W_OK) == -1) { -mgmt_elog(0, unable to access() log dir'%s': %d, %s\n, system_log_dir, errno, strerror(errno)); -mgmt_elog(0, please set 'proxy.config.log.logfile_dir'\n); -_exit(1); - } } static void http://git-wip-us.apache.org/repos/asf/trafficserver/blob/88f51768/proxy/Initialize.cc -- diff --git a/proxy/Initialize.cc b/proxy/Initialize.cc index be296b2..54026ba 100644 --- a/proxy/Initialize.cc +++ b/proxy/Initialize.cc @@ -276,7 +276,7 @@ init_system_diags(char *bdt, char *bat) char diags_logpath[PATH_NAME_MAX + 1]; ink_filepath_make(diags_logpath, sizeof(diags_logpath), -system_log_dir, DIAGS_LOG_FILE); +Layout::get()-logdir,
[03/50] git commit: TS-2401: Remove unused global management_directory
TS-2401: Remove unused global management_directory Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/bb26f42a Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/bb26f42a Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/bb26f42a Branch: refs/heads/5.0.x Commit: bb26f42affd1983370439a0337b35dc66db80879 Parents: 563c1e9 Author: James Peach jpe...@apache.org Authored: Wed Nov 27 14:40:07 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Thu Dec 5 20:33:48 2013 -0800 -- doc/reference/commands/traffic_server.en.rst | 2 -- proxy/Main.cc| 12 proxy/Main.h | 1 - proxy/logging/LogStandalone.cc | 11 --- proxy/sac.cc | 3 --- 5 files changed, 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bb26f42a/doc/reference/commands/traffic_server.en.rst -- diff --git a/doc/reference/commands/traffic_server.en.rst b/doc/reference/commands/traffic_server.en.rst index 8ae9aab..442a369 100644 --- a/doc/reference/commands/traffic_server.en.rst +++ b/doc/reference/commands/traffic_server.en.rst @@ -52,8 +52,6 @@ Description .. option:: -M, --remote_management -.. option:: -d DIR, --management_dir DIR - .. option:: -C CMD, --command CMD .. option:: -k, --clear_hostdb http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bb26f42a/proxy/Main.cc -- diff --git a/proxy/Main.cc b/proxy/Main.cc index b5a3873..3cdd0f4 100644 --- a/proxy/Main.cc +++ b/proxy/Main.cc @@ -144,7 +144,6 @@ char cluster_host[MAXDNAME + 1] = DEFAULT_CLUSTER_HOST; static char command_string[512] = ; int remote_management_flag = DEFAULT_REMOTE_MANAGEMENT_FLAG; -char management_directory[PATH_NAME_MAX+1]; // Layout-sysconfdir char system_root_dir[PATH_NAME_MAX + 1]; // Layout-prefix char system_runtime_dir[PATH_NAME_MAX + 1]; // Layout-runtimedir char system_config_directory[PATH_NAME_MAX + 1]; // Layout-sysconfdir @@ -210,7 +209,6 @@ static const ArgumentDescription argument_descriptions[] = { {interval, 'i', Statistics Interval, I, show_statistics, PROXY_STATS_INTERVAL, NULL}, {remote_management, 'M', Remote Management, T, remote_management_flag, PROXY_REMOTE_MANAGEMENT, NULL}, - {management_dir, 'd', Management Directory, S255, management_directory, PROXY_MANAGEMENT_DIRECTORY, NULL}, {command, 'C', Maintenance Command to Execute, S511, command_string, PROXY_COMMAND_STRING, NULL}, {clear_hostdb, 'k', Clear HostDB on Startup, F, auto_clear_hostdb_flag, PROXY_CLEAR_HOSTDB, NULL}, {clear_cache, 'K', Clear Cache on Startup, F, cacheProcessor.auto_clear_flag, PROXY_CLEAR_CACHE, NULL}, @@ -347,15 +345,6 @@ initialize_process_manager() remote_management_flag = true; } - if (access(management_directory, R_OK) == -1) { -ink_strlcpy(management_directory, Layout::get()-sysconfdir, sizeof(management_directory)); -if (access(management_directory, R_OK) == -1) { - fprintf(stderr,unable to access() management path '%s': %d, %s\n, management_directory, errno, strerror(errno)); - fprintf(stderr,please set management path via command line '-d management directory'\n); - _exit(1); -} - } - RecProcessInit(remote_management_flag ? RECM_CLIENT : RECM_STAND_ALONE, diags); if (!remote_management_flag) { @@ -1303,7 +1292,6 @@ main(int /* argc ATS_UNUSED */, char **argv) // Before accessing file system initialize Layout engine Layout::create(); ink_strlcpy(system_root_dir, Layout::get()-prefix, sizeof(system_root_dir)); - ink_strlcpy(management_directory, Layout::get()-sysconfdir, sizeof(management_directory)); chdir_root(); // change directory to the install root of traffic server. process_args(argument_descriptions, countof(argument_descriptions), argv); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bb26f42a/proxy/Main.h -- diff --git a/proxy/Main.h b/proxy/Main.h index d7a9a12..363fffc 100644 --- a/proxy/Main.h +++ b/proxy/Main.h @@ -55,7 +55,6 @@ extern char cluster_host[MAXDNAME + 1]; extern int cluster_port_number; extern int remote_management_flag; -extern char management_directory[PATH_NAME_MAX + 1]; inkcoreapi extern int qt_accept_file_descriptor; inkcoreapi extern int cache_clustering_enabled; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bb26f42a/proxy/logging/LogStandalone.cc -- diff --git a/proxy/logging/LogStandalone.cc
[1/3] git commit: TS-2248 Segmentation fault HttpTunnel and throttling
Updated Branches: refs/heads/master b36a7e120 - 510c46aeb TS-2248 Segmentation fault HttpTunnel and throttling Reviews: amc and zwoop Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/40a49e31 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/40a49e31 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/40a49e31 Branch: refs/heads/master Commit: 40a49e312afe6846869fa3ce2808aaf4f6eb078f Parents: b36a7e1 Author: bettydramit b13621367...@gmail.com Authored: Sat Dec 28 13:53:46 2013 -0700 Committer: Leif Hedstrom l...@ogre.com Committed: Sat Dec 28 13:53:46 2013 -0700 -- proxy/http/HttpTunnel.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/40a49e31/proxy/http/HttpTunnel.cc -- diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc index 4ba3b33..ca2f60c 100644 --- a/proxy/http/HttpTunnel.cc +++ b/proxy/http/HttpTunnel.cc @@ -1190,15 +1190,14 @@ HttpTunnel::consumer_reenable(HttpTunnelConsumer* c) // greater) to the target, we use strict comparison only for // checking low water, otherwise the flow control can stall out. uint64_t backlog = (flow_state.enabled_p p-is_source()) - ? p-backlog(flow_state.high_water) - : 0; + ? p-backlog(flow_state.high_water) : 0; if (backlog = flow_state.high_water) { if (is_debug_tag_set(http_tunnel)) Debug(http_tunnel, Throttle %p % PRId64 / % PRId64, p, backlog, p-backlog()); p-throttle(); // p becomes srcp for future calls to this method } else { - if (srcp c-is_sink()) { + if (srcp srcp-alive c-is_sink()) { // Check if backlog is below low water - note we need to check // against the source producer, not necessarily the producer // for this consumer. We don't have to recompute the backlog
[2/3] git commit: Fix indentation and punctuations.
Fix indentation and punctuations. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6a88b7dd Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6a88b7dd Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6a88b7dd Branch: refs/heads/master Commit: 6a88b7dd5edbf59b794f329c722d1d531e36db30 Parents: 40a49e3 Author: Leif Hedstrom l...@ogre.com Authored: Sat Dec 28 14:03:59 2013 -0700 Committer: Leif Hedstrom l...@ogre.com Committed: Sat Dec 28 14:03:59 2013 -0700 -- CHANGES | 102 --- 1 file changed, 56 insertions(+), 46 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6a88b7dd/CHANGES -- diff --git a/CHANGES b/CHANGES index 29079c0..ca28d6c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,19 +1,21 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 - *) TS-2454: Fix undefined reference to `__sync_fetch_and_sub_8' on ARM 32bit system. + *) [TS-2454] Fix undefined reference to `__sync_fetch_and_sub_8' on ARM + 32bit system. *) [TS-2450] Fix assertion failure for T61String type. - *) [TS-2117] make hipes plugin build + *) [TS-2117] make hipes plugin build. *) [TS-2452] Can't access a deleted object. *) [TS-2363] Fix assertion of Unknown file format type!. - *) [TS-2448] Fix traffic_cop and traffic_manager to obey the proxy.config.local_state_dir setting. + *) [TS-2448] Fix traffic_cop and traffic_manager to obey the + proxy.config.local_state_dir setting. - *) [TS-2445] Fix problem with 204 responses closing POST requests + *) [TS-2445] Fix problem with 204 responses closing POST requests. *) [TS-2434] Use the FATAL error level to handle plugin errors. @@ -21,7 +23,7 @@ Changes with Apache Traffic Server 4.2.0 *) [TS-2436] Add a simple integration test harness. - *) [TS-2355] ATS 4.0.x crashes when using OpenSSL 1.0.1e + *) [TS-2355] ATS 4.0.x crashes when using OpenSSL 1.0.1e. *) [TS-2432] Fix a race in aio_err_callblk. @@ -29,42 +31,46 @@ Changes with Apache Traffic Server 4.2.0 *) [TS-2190] Remove cache.log from the cachurl plugin. - *) [TS-2426] Add a new plugin, xdebug, for cache debugging using HTTP headers. + *) [TS-2426] Add a new plugin, xdebug, for cache debugging using HTTP + headers. *) [TS-2077] Remove pipeline configurations, they were no-op's anyways. We still support pipelining (we always do), it's just not treated specially (or optimized). - *) [TS-2386] clean up unused files and codes -- round 4.2 + *) [TS-2386] clean up unused files and codes -- round 4.2. *) [TS-548] remove Initialize.cc Initialize.h - *) [TS-2082] remove STANDALONE_IOCORE FIXME_NONMODULAR and NON_MODULAR defines + *) [TS-2082] remove STANDALONE_IOCORE FIXME_NONMODULAR and NON_MODULAR + defines. - *) [TS-312] Add option to always share keep-alive connections to the origin server + *) [TS-312] Add option to always share keep-alive connections to the origin + server. - *) [TS-2419] Don't close client connection when responding with a 204 and there is no body + *) [TS-2419] Don't close client connection when responding with a 204 and + there is no body. *) [TS-1146] Add RFC 5077 TLS session ticket support. Author: Wei Sun sun...@yahoo-inc.com *) [TS-2401] Use Layout instead of global install path directories. - *) [TS-2420] Remove STAT_SYNC, CONF_SYNC, and REM_SYNC threads and schedule those - continuations in ET_TASK + *) [TS-2420] Remove STAT_SYNC, CONF_SYNC, and REM_SYNC threads and schedule + those continuations in ET_TASK. *) [TS-2372] Enable TLS perfect forward security with ECDHE. *) [TS-2416] Make TLS the session timeout threshold configurable. Author: Wei Sun sun...@yahoo-inc.com - *) [TS-2335] adding ts_lua plugin to experimental directory + *) [TS-2335] adding ts_lua plugin to experimental directory. *) [TS-2347] buffer_upload uses unsafe function tempnam(). Replace it - with mkstemp() + with mkstemp(). *) [TS-1815] Add thread number and port to accept thread name and - add the file descriptor number to the ET_AIO thread names + add the file descriptor number to the ET_AIO thread names. *) [TS-2415] Use standard continuations to release UrlRewrite objects. @@ -92,11 +98,12 @@ Changes with Apache Traffic Server 4.2.0 *) [TS-2374] Abort the producer if the none of it`s consumers is alive. - *) [TS-2330] Update proxy.config.body_factory.enable_customizations comments in records.config + *) [TS-2330] Update proxy.config.body_factory.enable_customizations comments + in
git commit: Fix description.
Updated Branches: refs/heads/master 510c46aeb - c04946933 Fix description. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/c0494693 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c0494693 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c0494693 Branch: refs/heads/master Commit: c04946933dd5525c992915ac2b73cfdac0e0380f Parents: 510c46a Author: Leif Hedstrom l...@ogre.com Authored: Sat Dec 28 14:44:59 2013 -0700 Committer: Leif Hedstrom l...@ogre.com Committed: Sat Dec 28 14:45:31 2013 -0700 -- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c0494693/CHANGES -- diff --git a/CHANGES b/CHANGES index 46c6802..69131c6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,7 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 - *) [TS-2248] Segmentation fault HttpTunnel and throttling. + *) [TS-2248] Segmentation fault in HttpTunnel with flow control. Author: bettydramit b13621367...@gmail.com. *) [TS-2454] Fix undefined reference to `__sync_fetch_and_sub_8' on ARM
git commit: TS-2463] Crash regression around slow-log feature
Updated Branches: refs/heads/master 101895767 - 5cc64bf45 TS-2463] Crash regression around slow-log feature This happens when logging a slow event, and fixes commit c290ce0df2a. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/5cc64bf4 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/5cc64bf4 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/5cc64bf4 Branch: refs/heads/master Commit: 5cc64bf4552f331d115ce595f8f28202fb4c455e Parents: 1018957 Author: Leif Hedstrom zw...@apache.org Authored: Tue Dec 31 11:01:39 2013 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Tue Dec 31 11:01:39 2013 -0700 -- CHANGES | 6 -- proxy/hdrs/HTTP.cc | 9 +++-- proxy/http/HttpSM.cc | 4 +++- 3 files changed, 14 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5cc64bf4/CHANGES -- diff --git a/CHANGES b/CHANGES index 168a087..96b7ba8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 - *) [TS-32] Fix ICP. - Author: Gota Adachi a...@iij.ad.jp + *) [TS-2463] Crash regression around slow-log feature, when logging an + event. This fixes commit c290ce0df2a. + + *) [TS-32] Fix ICP. Author: Gota Adachi a...@iij.ad.jp *) [TS-2248] Segmentation fault in HttpTunnel with flow control. Author: bettydramit b13621367...@gmail.com. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5cc64bf4/proxy/hdrs/HTTP.cc -- diff --git a/proxy/hdrs/HTTP.cc b/proxy/hdrs/HTTP.cc index 6ecaf35..b9b8dc6 100644 --- a/proxy/hdrs/HTTP.cc +++ b/proxy/hdrs/HTTP.cc @@ -1576,7 +1576,8 @@ class UrlPrintHack { }; char* -HTTPHdr::url_string_get(Arena* arena, int* length) { +HTTPHdr::url_string_get(Arena* arena, int* length) +{ char* zret = 0; UrlPrintHack hack(this); @@ -1594,7 +1595,11 @@ HTTPHdr::url_string_get(Arena* arena, int* length) { } int -HTTPHdr::url_print(char* buff, int length, int* offset, int* skip) { +HTTPHdr::url_print(char* buff, int length, int* offset, int* skip) +{ + ink_release_assert(offset); + ink_release_assert(skip); + int zret = 0; UrlPrintHack hack(this); if (hack.is_valid()) { http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5cc64bf4/proxy/http/HttpSM.cc -- diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index e224527..df9dac5 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -6596,8 +6596,10 @@ HttpSM::update_stats() ink_hrtime_from_msec(t_state.http_config_param-slow_log_threshold) total_time) { URL* url = t_state.hdr_info.client_request.url_get(); char url_string[256] = ; +int offset = 0; +int skip = 0; -t_state.hdr_info.client_request.url_print(url_string, sizeof url_string, 0, 0); +t_state.hdr_info.client_request.url_print(url_string, sizeof url_string, offset, skip); // unique id char unique_id_string[128] = ;
[2/2] git commit: Added TS-2459
Added TS-2459 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a407f5f9 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a407f5f9 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a407f5f9 Branch: refs/heads/master Commit: a407f5f98142e7ddcbff79f8d7a254e50c2447ed Parents: a19a444 Author: Leif Hedstrom zw...@apache.org Authored: Tue Dec 31 11:28:25 2013 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Tue Dec 31 11:28:25 2013 -0700 -- CHANGES | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a407f5f9/CHANGES -- diff --git a/CHANGES b/CHANGES index 96b7ba8..a799472 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2459] Fix wrong name for a couple of librecord APIs. +Author: Yu Qing happy_fish...@yahoo.com.cn. + *) [TS-2463] Crash regression around slow-log feature, when logging an event. This fixes commit c290ce0df2a.
[1/2] git commit: TS-2457 Protocol.c: change usage of atoi to strtol.
Updated Branches: refs/heads/master a407f5f98 - 3be2c67b8 TS-2457 Protocol.c: change usage of atoi to strtol. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/47982165 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/47982165 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/47982165 Branch: refs/heads/master Commit: 47982165a1f1beb0bb3d8145fcdf8447f59dbcad Parents: a407f5f Author: Radim Kolar h...@sendmail.cz Authored: Tue Dec 31 13:43:27 2013 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Tue Dec 31 13:43:27 2013 -0700 -- example/protocol/Protocol.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/47982165/example/protocol/Protocol.c -- diff --git a/example/protocol/Protocol.c b/example/protocol/Protocol.c index 5d71430..1258294 100644 --- a/example/protocol/Protocol.c +++ b/example/protocol/Protocol.c @@ -104,6 +104,7 @@ void TSPluginInit(int argc, const char *argv[]) { TSPluginRegistrationInfo info; + char *end; info.plugin_name = output-header; info.vendor_name = MyCompany; @@ -124,8 +125,9 @@ TSPluginInit(int argc, const char *argv[]) printf([protocol_plugin] Usage: protocol.so accept_port server_port\n); printf([protocol_plugin] Wrong arguments. Using deafult ports.\n); } else { -if (!isnan(atoi(argv[1]))) { - accept_port = atoi(argv[1]); +strtol(argv[1], end, 10); +if (*end == '\0') { + accept_port = strtol(argv[1], end, 10); TSDebug(protocol, using accept_port %d, accept_port); printf([protocol_plugin] using accept_port %d\n, accept_port); } else { @@ -133,8 +135,9 @@ TSPluginInit(int argc, const char *argv[]) printf(Using deafult port %d\n, accept_port); } -if (!isnan(atoi(argv[2]))) { - server_port = atoi(argv[2]); +strtol(argv[2], end, 10); +if (*end == '\0') { + server_port = strtol(argv[2], end, 10); TSDebug(protocol, using server_port %d, server_port); printf([protocol_plugin] using server_port %d\n, server_port); } else {
git commit: TS-2457 Fix usage around strtol, bad review on my part
Updated Branches: refs/heads/master 1ef600983 - 74af2183c TS-2457 Fix usage around strtol, bad review on my part Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/74af2183 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/74af2183 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/74af2183 Branch: refs/heads/master Commit: 74af2183c3641a3c0f2b7f024b17d5d0db814e93 Parents: 1ef6009 Author: Leif Hedstrom zw...@apache.org Authored: Tue Dec 31 19:54:29 2013 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Tue Dec 31 19:54:29 2013 -0700 -- example/protocol/Protocol.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/74af2183/example/protocol/Protocol.c -- diff --git a/example/protocol/Protocol.c b/example/protocol/Protocol.c index 1258294..d065c9d 100644 --- a/example/protocol/Protocol.c +++ b/example/protocol/Protocol.c @@ -105,6 +105,7 @@ TSPluginInit(int argc, const char *argv[]) { TSPluginRegistrationInfo info; char *end; + int tmp; info.plugin_name = output-header; info.vendor_name = MyCompany; @@ -125,9 +126,9 @@ TSPluginInit(int argc, const char *argv[]) printf([protocol_plugin] Usage: protocol.so accept_port server_port\n); printf([protocol_plugin] Wrong arguments. Using deafult ports.\n); } else { -strtol(argv[1], end, 10); +tmp = strtol(argv[1], end, 10); if (*end == '\0') { - accept_port = strtol(argv[1], end, 10); + accept_port = tmp; TSDebug(protocol, using accept_port %d, accept_port); printf([protocol_plugin] using accept_port %d\n, accept_port); } else { @@ -135,9 +136,9 @@ TSPluginInit(int argc, const char *argv[]) printf(Using deafult port %d\n, accept_port); } -strtol(argv[2], end, 10); +tmp = strtol(argv[2], end, 10); if (*end == '\0') { - server_port = strtol(argv[2], end, 10); + server_port = tmp; TSDebug(protocol, using server_port %d, server_port); printf([protocol_plugin] using server_port %d\n, server_port); } else {
[4/4] git commit: Added TS-1365 to CHANGES, fixed default config value in docs
Added TS-1365 to CHANGES, fixed default config value in docs Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f78c83a8 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f78c83a8 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f78c83a8 Branch: refs/heads/master Commit: f78c83a82d6eb6f2bfc23fc86ceb430121548049 Parents: 037d8cc Author: Leif Hedstrom zw...@apache.org Authored: Thu Jan 2 15:33:47 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Thu Jan 2 15:33:47 2014 -0700 -- CHANGES | 6 ++ doc/reference/configuration/records.config.en.rst | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f78c83a8/CHANGES -- diff --git a/CHANGES b/CHANGES index 6d01fca..7e4ae1e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,12 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-1365] Add a new configuration option, proxy.config.net.poll_timeout, + with the same behavior as the command line option --poll_timeout. Also + adjust AIO scheduling to correlate to this setting, to avoid additional + CPU load. Note that this configuration is generally not necessary to + configure, unless you are concerned with system idle CPU consumption. + *) [TS-2468] Bring back the load balancer plugin. *) [TS-2465] libxml2 detection generates an invalid linker path. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f78c83a8/doc/reference/configuration/records.config.en.rst -- diff --git a/doc/reference/configuration/records.config.en.rst b/doc/reference/configuration/records.config.en.rst index 08aaf1a..79e4975 100644 --- a/doc/reference/configuration/records.config.en.rst +++ b/doc/reference/configuration/records.config.en.rst @@ -2225,7 +2225,7 @@ Sockets Same as the command line option ``--accept_mss`` that sets the MSS for all incoming requests. -.. ts:cv:: CONFIG proxy.config.net.poll_timeout INT 0 +.. ts:cv:: CONFIG proxy.config.net.poll_timeout INT 10 (or 30 on Solaris) Same as the command line option ``--poll_timeout``, or ``-t``, which specifies the timeout used for the polling mechanism used. This timeout is
git commit: TS-1365 Added a little more help on how to avoid wasting CPU
Updated Branches: refs/heads/master 8901e65da - 17f0102cb TS-1365 Added a little more help on how to avoid wasting CPU Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/17f0102c Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/17f0102c Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/17f0102c Branch: refs/heads/master Commit: 17f0102cb9c6547f6e1eb40d23963225a8a80ba2 Parents: 8901e65 Author: Leif Hedstrom zw...@apache.org Authored: Thu Jan 2 19:40:12 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Thu Jan 2 19:40:15 2014 -0700 -- doc/reference/configuration/records.config.en.rst | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/17f0102c/doc/reference/configuration/records.config.en.rst -- diff --git a/doc/reference/configuration/records.config.en.rst b/doc/reference/configuration/records.config.en.rst index 79e4975..4c46d04 100644 --- a/doc/reference/configuration/records.config.en.rst +++ b/doc/reference/configuration/records.config.en.rst @@ -2243,6 +2243,7 @@ Sockets Reduce the number of worker threads (net-threads) Reduce the number of disk (AIO) threads + Make sure accept threads are enabled Undocumented
[01/50] git commit: TS-2445: Fix problem with 204 responses closing POST requests
Updated Branches: refs/heads/5.0.x 93e7027b4 - a44a12ab3 TS-2445: Fix problem with 204 responses closing POST requests Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/bd00203f Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/bd00203f Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/bd00203f Branch: refs/heads/5.0.x Commit: bd00203f2de428800e8531cd09baad20d0e99f0a Parents: 90af89c Author: finaldie hyzwowto...@gmail.com Authored: Thu Dec 19 15:54:22 2013 + Committer: Bryan Call bc...@apache.org Committed: Thu Dec 19 10:27:57 2013 -0800 -- proxy/http/HttpTransact.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bd00203f/proxy/http/HttpTransact.cc -- diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index 7f440d0..0fa2974 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -6753,7 +6753,7 @@ HttpTransact::handle_response_keep_alive_headers(State* s, HTTPVersion ver, HTTP ka_action = KA_DISABLED; } else if (heads-status_get() == HTTP_STATUS_NO_CONTENT - (s-current.server-transfer_encoding != NO_TRANSFER_ENCODING || s-hdr_info.request_content_length != 0)) { + (s-current.server-transfer_encoding != NO_TRANSFER_ENCODING || heads-get_content_length() != 0)) { // some systems hang until the connection closes when receiving a 204 regardless of the K-A headers // close if there is any body response from the origin ka_action = KA_CLOSE;
[21/50] git commit: TS-2248 Segmentation fault HttpTunnel and throttling
TS-2248 Segmentation fault HttpTunnel and throttling Reviews: amc and zwoop Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/40a49e31 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/40a49e31 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/40a49e31 Branch: refs/heads/5.0.x Commit: 40a49e312afe6846869fa3ce2808aaf4f6eb078f Parents: b36a7e1 Author: bettydramit b13621367...@gmail.com Authored: Sat Dec 28 13:53:46 2013 -0700 Committer: Leif Hedstrom l...@ogre.com Committed: Sat Dec 28 13:53:46 2013 -0700 -- proxy/http/HttpTunnel.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/40a49e31/proxy/http/HttpTunnel.cc -- diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc index 4ba3b33..ca2f60c 100644 --- a/proxy/http/HttpTunnel.cc +++ b/proxy/http/HttpTunnel.cc @@ -1190,15 +1190,14 @@ HttpTunnel::consumer_reenable(HttpTunnelConsumer* c) // greater) to the target, we use strict comparison only for // checking low water, otherwise the flow control can stall out. uint64_t backlog = (flow_state.enabled_p p-is_source()) - ? p-backlog(flow_state.high_water) - : 0; + ? p-backlog(flow_state.high_water) : 0; if (backlog = flow_state.high_water) { if (is_debug_tag_set(http_tunnel)) Debug(http_tunnel, Throttle %p % PRId64 / % PRId64, p, backlog, p-backlog()); p-throttle(); // p becomes srcp for future calls to this method } else { - if (srcp c-is_sink()) { + if (srcp srcp-alive c-is_sink()) { // Check if backlog is below low water - note we need to check // against the source producer, not necessarily the producer // for this consumer. We don't have to recompute the backlog
[04/50] git commit: proxy.config.remap.use_remap_processor is dead
proxy.config.remap.use_remap_processor is dead Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/2772ae65 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/2772ae65 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/2772ae65 Branch: refs/heads/5.0.x Commit: 2772ae65a5a3fb48fa241c6db3495d9a8bdf165f Parents: 2548cbc Author: James Peach jpe...@apache.org Authored: Tue Dec 17 14:51:45 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Fri Dec 20 15:16:18 2013 -0800 -- .../configuration/records.config.en.rst | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2772ae65/doc/reference/configuration/records.config.en.rst -- diff --git a/doc/reference/configuration/records.config.en.rst b/doc/reference/configuration/records.config.en.rst index 6170b46..c92f351 100644 --- a/doc/reference/configuration/records.config.en.rst +++ b/doc/reference/configuration/records.config.en.rst @@ -2152,17 +2152,6 @@ Scheduled Update Configuration time. This option prevents the scheduled update process from overburdening the host. -Remap Plugin Processor -== - -.. ts:cv:: CONFIG proxy.config.remap.use_remap_processor INT 0 - - Enables (``1``) or disables (``0``) the ability to run separate threads for remap plugin processing. - -.. ts:cv:: CONFIG proxy.config.remap.num_remap_threads INT 1 - - Specifies the number of threads that will be used for remap plugin rocessing. - Plug-in Configuration = @@ -2170,6 +2159,15 @@ Plug-in Configuration Specifies the location of Traffic Server plugins. +.. ts:cv:: CONFIG proxy.config.remap.num_remap_threads INT 0 + + When this variable is set to ``0``, plugin remap callbacks are + executed in line on network threads. If remap processing takes + significant time, this can be cause additional request latency. + Setting this variable to causes remap processing to take place + on a dedicated thread pool, freeing the network threads to service + additional requests. + Sockets ===
[19/50] git commit: TS-2454: Fix undefined reference to `__sync_fetch_and_sub_8' on ARM 32bit system
TS-2454: Fix undefined reference to `__sync_fetch_and_sub_8' on ARM 32bit system Signed-off-by: Yunkai Zhang yun...@redstar.celldoft.com Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8d8507f3 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8d8507f3 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8d8507f3 Branch: refs/heads/5.0.x Commit: 8d8507f3fb9108fdc58b8e7da924b12de8fcbcd0 Parents: a477817 Author: Yunkai Zhang yun...@redstar.celldoft.com Authored: Sat Dec 28 19:59:33 2013 +0800 Committer: Yunkai Zhang qiushu@taobao.com Committed: Sat Dec 28 20:10:16 2013 +0800 -- CHANGES | 2 ++ lib/ts/ink_atomic.h | 39 --- 2 files changed, 34 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8d8507f3/CHANGES -- diff --git a/CHANGES b/CHANGES index c17904a..29079c0 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) TS-2454: Fix undefined reference to `__sync_fetch_and_sub_8' on ARM 32bit system. + *) [TS-2450] Fix assertion failure for T61String type. *) [TS-2117] make hipes plugin build http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8d8507f3/lib/ts/ink_atomic.h -- diff --git a/lib/ts/ink_atomic.h b/lib/ts/ink_atomic.h index 51d87c0..fc8a9f3 100644 --- a/lib/ts/ink_atomic.h +++ b/lib/ts/ink_atomic.h @@ -50,6 +50,7 @@ typedef volatile int8_t vint8; typedef volatile int16_t vint16; typedef volatile int32_t vint32; typedef volatile int64_t vint64; +typedef volatile uint64_t vuint64; typedef volatile long vlong; typedef volatile void *vvoidp; @@ -57,6 +58,7 @@ typedef vint8 *pvint8; typedef vint16 *pvint16; typedef vint32 *pvint32; typedef vint64 *pvint64; +typedef vuint64 *pvuint64; typedef vlong *pvlong; typedef vvoidp *pvvoidp; @@ -194,9 +196,8 @@ ink_atomic_casint64_t(pvint64 mem, int64_t old, int64_t new_value) { return 0; } -template -inline int64_t -ink_atomic_incrementint64_t(pvint64 mem, int64_t value) { +templatetypename Amount static inline int64_t +ink_atomic_increment(pvint64 mem, Amount value) { int64_t curr; ink_mutex_acquire(__global_death); curr = *mem; @@ -205,10 +206,34 @@ ink_atomic_incrementint64_t(pvint64 mem, int64_t value) { return curr; } -template -inline int64_t -ink_atomic_incrementint64_t(pvint64 mem, int value) { - return ink_atomic_increment(mem, static_castint64_t(value)); +templatetypename Amount static inline int64_t +ink_atomic_decrement(pvint64 mem, Amount value) { + int64_t curr; + ink_mutex_acquire(__global_death); + curr = *mem; + *mem = curr - value; + ink_mutex_release(__global_death); + return curr; +} + +templatetypename Amount static inline uint64_t +ink_atomic_increment(pvuint64 mem, Amount value) { + uint64_t curr; + ink_mutex_acquire(__global_death); + curr = *mem; + *mem = curr + value; + ink_mutex_release(__global_death); + return curr; +} + +templatetypename Amount static inline uint64_t +ink_atomic_decrement(pvuint64 mem, Amount value) { + uint64_t curr; + ink_mutex_acquire(__global_death); + curr = *mem; + *mem = curr - value; + ink_mutex_release(__global_death); + return curr; } #endif /* Special hacks for ARM 32-bit */
[32/50] git commit: Added TS-2459
Added TS-2459 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a407f5f9 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a407f5f9 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a407f5f9 Branch: refs/heads/5.0.x Commit: a407f5f98142e7ddcbff79f8d7a254e50c2447ed Parents: a19a444 Author: Leif Hedstrom zw...@apache.org Authored: Tue Dec 31 11:28:25 2013 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Tue Dec 31 11:28:25 2013 -0700 -- CHANGES | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a407f5f9/CHANGES -- diff --git a/CHANGES b/CHANGES index 96b7ba8..a799472 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2459] Fix wrong name for a couple of librecord APIs. +Author: Yu Qing happy_fish...@yahoo.com.cn. + *) [TS-2463] Crash regression around slow-log feature, when logging an event. This fixes commit c290ce0df2a.
[23/50] git commit: Add TS-2248.
Add TS-2248. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/510c46ae Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/510c46ae Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/510c46ae Branch: refs/heads/5.0.x Commit: 510c46aebf217c9016655ba370db0618ac2e968d Parents: 6a88b7d Author: Leif Hedstrom l...@ogre.com Authored: Sat Dec 28 14:04:21 2013 -0700 Committer: Leif Hedstrom l...@ogre.com Committed: Sat Dec 28 14:04:21 2013 -0700 -- CHANGES | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/510c46ae/CHANGES -- diff --git a/CHANGES b/CHANGES index ca28d6c..46c6802 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2248] Segmentation fault HttpTunnel and throttling. + Author: bettydramit b13621367...@gmail.com. + *) [TS-2454] Fix undefined reference to `__sync_fetch_and_sub_8' on ARM 32bit system.
[49/50] git commit: TS-1365 Added a little more help on how to avoid wasting CPU
TS-1365 Added a little more help on how to avoid wasting CPU Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/17f0102c Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/17f0102c Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/17f0102c Branch: refs/heads/5.0.x Commit: 17f0102cb9c6547f6e1eb40d23963225a8a80ba2 Parents: 8901e65 Author: Leif Hedstrom zw...@apache.org Authored: Thu Jan 2 19:40:12 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Thu Jan 2 19:40:15 2014 -0700 -- doc/reference/configuration/records.config.en.rst | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/17f0102c/doc/reference/configuration/records.config.en.rst -- diff --git a/doc/reference/configuration/records.config.en.rst b/doc/reference/configuration/records.config.en.rst index 79e4975..4c46d04 100644 --- a/doc/reference/configuration/records.config.en.rst +++ b/doc/reference/configuration/records.config.en.rst @@ -2243,6 +2243,7 @@ Sockets Reduce the number of worker threads (net-threads) Reduce the number of disk (AIO) threads + Make sure accept threads are enabled Undocumented
[26/50] git commit: TS-32: FIX to perform multicast ICP communication
TS-32: FIX to perform multicast ICP communication Signed-off-by: Zhao Yongming ming@gmail.com Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/cf054cb3 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/cf054cb3 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/cf054cb3 Branch: refs/heads/5.0.x Commit: cf054cb3ad57157a05f0e4d37b5065950f6bcbc6 Parents: 05f7bfb Author: Gota Adachi a...@iij.ad.jp Authored: Tue Dec 24 15:15:55 2013 +0800 Committer: Zhao Yongming ming@gmail.com Committed: Sun Dec 29 18:42:01 2013 +0800 -- iocore/net/P_Connection.h| 1 + iocore/net/UnixConnection.cc | 10 -- lib/ts/ink_inet.cc | 2 +- proxy/ICP.cc | 1 + 4 files changed, 11 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf054cb3/iocore/net/P_Connection.h -- diff --git a/iocore/net/P_Connection.h b/iocore/net/P_Connection.h index 7abaa8e..e2fed75 100644 --- a/iocore/net/P_Connection.h +++ b/iocore/net/P_Connection.h @@ -131,6 +131,7 @@ struct Connection unsigned char mc_ttl = 1, bool mc_loopback = DISABLE_MC_LOOPBACK, Continuation * c = NULL); int setup_mc_receive(sockaddr const* from, + sockaddr const* my_addr, bool non_blocking = NON_BLOCKING, Connection * sendchan = NULL, Continuation * c = NULL); int close(); // 0 on success, -errno on failure http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf054cb3/iocore/net/UnixConnection.cc -- diff --git a/iocore/net/UnixConnection.cc b/iocore/net/UnixConnection.cc index 98b931a..9a03c0e 100644 --- a/iocore/net/UnixConnection.cc +++ b/iocore/net/UnixConnection.cc @@ -53,6 +53,7 @@ Connection::setup_mc_send( ink_assert(fd == NO_FD); int res = 0; int enable_reuseaddr = 1; + in_addr_t mc_if = ats_ip4_addr_cast(my_addr); if ((res = socketManager.mc_socket(my_addr-sa_family, SOCK_DGRAM, 0, non_blocking)) 0) goto Lerror; @@ -82,6 +83,9 @@ Connection::setup_mc_send( if ((res = safe_setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, (char *) mc_ttl, sizeof(mc_ttl)) 0)) goto Lerror; + // Set MultiCast Interface to specified value + if ((res = safe_setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, (char *) mc_if, sizeof(mc_if)) 0)) +goto Lerror; // Disable MultiCast loopback if requested if (!mc_loopback) { @@ -102,6 +106,7 @@ Lerror: int Connection::setup_mc_receive( sockaddr const* mc_addr, + sockaddr const* my_addr, bool non_blocking, Connection * sendChan, Continuation * c ) { ink_assert(fd == NO_FD); @@ -109,6 +114,7 @@ Connection::setup_mc_receive( (void) c; int res = 0; int enable_reuseaddr = 1; + IpAddr inaddr_any(INADDR_ANY); if ((res = socketManager.socket(mc_addr-sa_family, SOCK_DGRAM, 0)) 0) goto Lerror; @@ -123,7 +129,7 @@ Connection::setup_mc_receive( if ((res = safe_setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *) enable_reuseaddr, sizeof(enable_reuseaddr)) 0)) goto Lerror; - ats_ip_copy(addr, mc_addr); + addr.assign(inaddr_any, ats_ip_port_cast(mc_addr)); if ((res = socketManager.ink_bind(fd, addr.sa, ats_ip_size(addr.sa), IPPROTO_TCP)) 0) goto Lerror; @@ -136,7 +142,7 @@ Connection::setup_mc_receive( struct ip_mreq mc_request; // Add ourselves to the MultiCast group mc_request.imr_multiaddr.s_addr = ats_ip4_addr_cast(mc_addr); -mc_request.imr_interface.s_addr = INADDR_ANY; +mc_request.imr_interface.s_addr = ats_ip4_addr_cast(my_addr); if ((res = safe_setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *) mc_request, sizeof(mc_request)) 0)) goto Lerror; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf054cb3/lib/ts/ink_inet.cc -- diff --git a/lib/ts/ink_inet.cc b/lib/ts/ink_inet.cc index 397e7da..3221ab2 100644 --- a/lib/ts/ink_inet.cc +++ b/lib/ts/ink_inet.cc @@ -348,7 +348,7 @@ IpAddr::toString(char* dest, size_t len) const { bool IpAddr::isMulticast() const { - return (AF_INET == _family 0xe == _addr._byte[0]) || + return (AF_INET == _family 0xe == (_addr._byte[0] 4)) || (AF_INET6 == _family IN6_IS_ADDR_MULTICAST(_addr._ip6)) ; } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cf054cb3/proxy/ICP.cc -- diff --git a/proxy/ICP.cc b/proxy/ICP.cc index 7e78925..8124a44 100644 --- a/proxy/ICP.cc +++ b/proxy/ICP.cc @@ -2201,6 +2201,7 @@ ICPProcessor::SetupListenSockets() }
[18/50] git commit: Fix unused variable warnings from malloc_from_chunk()
Fix unused variable warnings from malloc_from_chunk() Signed-off-by: Yunkai Zhang qiushu@taobao.com Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a4778175 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a4778175 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a4778175 Branch: refs/heads/5.0.x Commit: a47781759e9c52e7e304d30ddfefae853b35a05f Parents: 6f810cd Author: Yunkai Zhang qiushu@taobao.com Authored: Sat Dec 28 16:11:10 2013 +0800 Committer: Yunkai Zhang qiushu@taobao.com Committed: Sat Dec 28 16:24:02 2013 +0800 -- lib/ts/ink_queue_ext.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a4778175/lib/ts/ink_queue_ext.cc -- diff --git a/lib/ts/ink_queue_ext.cc b/lib/ts/ink_queue_ext.cc index aff1eb4..b34ecc8 100644 --- a/lib/ts/ink_queue_ext.cc +++ b/lib/ts/ink_queue_ext.cc @@ -389,7 +389,8 @@ malloc_whole_chunk(InkFreeList *f, InkThreadCache *pCache, InkChunkInfo *pChunk) } static inline void * -malloc_from_chunk(InkFreeList *f, InkThreadCache *pCache, InkChunkInfo *pChunk) +malloc_from_chunk(InkFreeList * /* f ATS_UNUSED */, + InkThreadCache *pCache, InkChunkInfo *pChunk) { void *item;
[31/50] git commit: TS-2459 Fix wrong name for a couple of librecord APIs.
TS-2459 Fix wrong name for a couple of librecord APIs. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a19a444c Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a19a444c Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a19a444c Branch: refs/heads/5.0.x Commit: a19a444c266cbf6c6ed2edd1bc12d31dd603a8e8 Parents: 5cc64bf Author: Yu Qing happy_fish...@yahoo.com.cn Authored: Tue Dec 31 11:26:59 2013 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Tue Dec 31 11:26:59 2013 -0700 -- lib/records/I_RecCore.h | 8 lib/records/RecCore.cc | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a19a444c/lib/records/I_RecCore.h -- diff --git a/lib/records/I_RecCore.h b/lib/records/I_RecCore.h index 39d2e9d..4b3088c 100644 --- a/lib/records/I_RecCore.h +++ b/lib/records/I_RecCore.h @@ -100,8 +100,8 @@ int RecRegisterConfigCounter(RecT rec_type, const char *name, //- int RecLinkConfigInt(const char *name, RecInt * rec_int); -int RecLinkConfigInk32(const char *name, int32_t * p_int32); -int RecLinkConfigInkU32(const char *name, uint32_t * p_uint32); +int RecLinkConfigInt32(const char *name, int32_t * p_int32); +int RecLinkConfigUInt32(const char *name, uint32_t * p_uint32); int RecLinkConfigFloat(const char *name, RecFloat * rec_float); int RecLinkConfigCounter(const char *name, RecCounter * rec_counter); int RecLinkConfigString(const char *name, RecString * rec_string); @@ -199,12 +199,12 @@ void RecSignalManager(int, const char *); } while (0) #define REC_EstablishStaticConfigInt32(_var, _config_var_name) do { \ - RecLinkConfigInk32(_config_var_name, _var); \ + RecLinkConfigInt32(_config_var_name, _var); \ _var = (int32_t)REC_ConfigReadInteger(_config_var_name); \ } while (0) #define REC_EstablishStaticConfigInt32U(_var, _config_var_name) do { \ - RecLinkConfigInkU32(_config_var_name, _var); \ + RecLinkConfigUInt32(_config_var_name, _var); \ _var = (int32_t)REC_ConfigReadInteger(_config_var_name); \ } while (0) http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a19a444c/lib/records/RecCore.cc -- diff --git a/lib/records/RecCore.cc b/lib/records/RecCore.cc index b81b3d1..532aecc 100644 --- a/lib/records/RecCore.cc +++ b/lib/records/RecCore.cc @@ -228,13 +228,13 @@ RecLinkConfigInt(const char *name, RecInt * rec_int) } int -RecLinkConfigInk32(const char *name, int32_t * p_int32) +RecLinkConfigInt32(const char *name, int32_t * p_int32) { return RecRegisterConfigUpdateCb(name, link_int32, (void *) p_int32); } int -RecLinkConfigInkU32(const char *name, uint32_t * p_uint32) +RecLinkConfigUInt32(const char *name, uint32_t * p_uint32) { return RecRegisterConfigUpdateCb(name, link_uint32, (void *) p_uint32); }
[12/50] git commit: TS-2117 make hipes plugin build
TS-2117 make hipes plugin build Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/e7a1b8ff Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/e7a1b8ff Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/e7a1b8ff Branch: refs/heads/5.0.x Commit: e7a1b8ffb2b5f152e3f443a2932b1157a6d05975 Parents: f4dcd6d Author: Kit Chan kic...@apache.org Authored: Thu Dec 26 08:39:52 2013 -0800 Committer: Kit Chan kic...@apache.org Committed: Thu Dec 26 08:39:52 2013 -0800 -- configure.ac | 1 + doc/reference/plugins/hipes.en.rst | 64 ++- plugins/experimental/Makefile.am | 1 + plugins/experimental/hipes/Makefile.am | 22 +++ plugins/experimental/hipes/hipes.cc| 285 +++- 5 files changed, 239 insertions(+), 134 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e7a1b8ff/configure.ac -- diff --git a/configure.ac b/configure.ac index 5581625..5d50b12 100644 --- a/configure.ac +++ b/configure.ac @@ -1928,6 +1928,7 @@ AC_CONFIG_FILES([ plugins/experimental/esi/Makefile plugins/experimental/geoip_acl/Makefile plugins/experimental/lua/Makefile + plugins/experimental/hipes/Makefile plugins/experimental/ts_lua/Makefile plugins/experimental/metalink/Makefile plugins/experimental/rfc5861/Makefile http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e7a1b8ff/doc/reference/plugins/hipes.en.rst -- diff --git a/doc/reference/plugins/hipes.en.rst b/doc/reference/plugins/hipes.en.rst index 2651c67..2d6daa5 100644 --- a/doc/reference/plugins/hipes.en.rst +++ b/doc/reference/plugins/hipes.en.rst @@ -1,5 +1,5 @@ -HIPES system (undocumented) -*** +HIPES plugin + .. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -19,14 +19,11 @@ HIPES system (undocumented) under the License. -This plugin implements the HIPES system. +This is a remap plugin used in the HIPES system. Configuration = -``server:host`` -Name of the server to send this request to - ``urlp:name`` Default: ``url`` Name of the query parameter for the service URL @@ -59,6 +56,59 @@ Configuration The DNS timeout The timeout options override the server defaults (from -```records.config`` ../../configuration-files/records.config`_), and +```records.config``), and only apply to the connection to the specific service host. +Notes on HIPES +== + +HTTP Pipes (aka HIPES and pronounced Hippies) allows data services to be pipelined together, as illustrated by the example below. + +Example +=== +1. ATS is run on port 80 and apache HTTP web server is run on port 8080 + +2. The HIPES plugin is used in ``remap.config`` :: + +map http://127.0.0.1/svc_case http://nosuchhost @plugin=hipes.so @pparam=service:127.0.0.1:8080 @pparam=path:svc_case.php @pparam=server:127.0.0.1 +map http://127.0.0.1/svc_reverse http://nosuchhost @plugin=hipes.so @pparam=service:127.0.0.1:8080 @pparam=path:svc_reverse.php @pparam=server:127.0.0.1 +map http://127.0.0.1/test.txt http://127.0.0.1:8080/test.txt + +3. The plugin remaps the incoming URL such as + +``http://127.0.0.1/svc_reverse/svc_case;case=u/test.txt`` + +to the following + + ``http://127.0.0.1:8080/svc_reverse?url=http%3A%2F%2F127.0.0.1%2Fsvc_case%3Bcase%3Du%2Ftest.txt`` + +3. The service ``svc_reverse.php`` fetches the ``url`` from the ATS again and the plugin remaps the URL + +``http://127.0.0.1/svc_case;case=u/test.txt`` + +to this URL + + ``http://127.0.0.1:8080/svc_case.php?case=uurl=http%3A%2F%2F127.0.0.1%2Ftest.txt`` + +4. In this example, the service ``svc_case.php`` fetches and transforms the response of ``http://127.0.0.1/test.txt`` (which ATS proxies the request to a local file) to upper case. And subsequently the service ``svc_reverse.php`` receives the response and reverse the order before the response is sent back to the client by ATS. + +Notes on reducing traffic += + +There can be significant overhead using HIPES because the data can traverse through ATS many times. Caching can be important to reduce traffic to services/through ATS and can be achieved via a proper ``Cache-Control`` header returned by the services. Another way to reduce traffic through ATS is to have ATS to return 302 redirects to url for the requests made by service, instead of proxying the requests to that url. However, the service must then be able to follow the redirect. The down side is that we cannot use ATS to
[45/50] git commit: TS-1365 Make the -t option work as intended.
TS-1365 Make the -t option work as intended. This also adds a new configuration option, proxy.config.net.poll_timeout. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/eccb33cc Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/eccb33cc Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/eccb33cc Branch: refs/heads/5.0.x Commit: eccb33cc01b109c55d8e21ae10d7366e4044993f Parents: 52c2da6 Author: Leif Hedstrom zw...@apache.org Authored: Tue Dec 31 13:38:56 2013 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Thu Jan 2 15:30:53 2014 -0700 -- iocore/aio/AIO.cc| 5 ++--- iocore/eventsystem/I_SocketManager.h | 3 ++- iocore/net/I_Net.h | 8 iocore/net/Net.cc| 2 +- mgmt/RecordsConfig.cc| 8 proxy/Main.cc| 16 +++- 6 files changed, 28 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/eccb33cc/iocore/aio/AIO.cc -- diff --git a/iocore/aio/AIO.cc b/iocore/aio/AIO.cc index 2e3e91f..ac8ea0f 100644 --- a/iocore/aio/AIO.cc +++ b/iocore/aio/AIO.cc @@ -538,9 +538,8 @@ aio_thread_main(void *arg) op-thread-schedule_imm_signal(op); ink_mutex_acquire(my_aio_req-aio_mutex); } while (1); -timespec ten_msec_timespec = ink_based_hrtime_to_timespec(ink_get_hrtime() + HRTIME_MSECONDS(10)); -ink_cond_timedwait(my_aio_req-aio_cond, my_aio_req-aio_mutex, - ten_msec_timespec); +timespec timedwait_msec = ink_based_hrtime_to_timespec(ink_get_hrtime() + HRTIME_MSECONDS(net_config_poll_timeout)); +ink_cond_timedwait(my_aio_req-aio_cond, my_aio_req-aio_mutex, timedwait_msec); } return 0; } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/eccb33cc/iocore/eventsystem/I_SocketManager.h -- diff --git a/iocore/eventsystem/I_SocketManager.h b/iocore/eventsystem/I_SocketManager.h index 57802f4..d294a5c 100644 --- a/iocore/eventsystem/I_SocketManager.h +++ b/iocore/eventsystem/I_SocketManager.h @@ -40,6 +40,7 @@ #define DEFAULT_OPEN_MODE 0644 class Thread; +extern int net_config_poll_timeout; #define SOCKET int @@ -85,7 +86,7 @@ struct SocketManager int epoll_create(int size); int epoll_close(int eps); int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event); - int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout); + int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout = net_config_poll_timeout); #endif #if TS_USE_KQUEUE int kqueue(); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/eccb33cc/iocore/net/I_Net.h -- diff --git a/iocore/net/I_Net.h b/iocore/net/I_Net.h index d6464e5..78f3d62 100644 --- a/iocore/net/I_Net.h +++ b/iocore/net/I_Net.h @@ -62,14 +62,6 @@ static int const NO_FD = -1; -static unsigned int const DEFAULT_POLL_TIMEOUT = -#if defined(solaris) - 30 /* mseconds */ -#else - 10 /* mseconds */ -#endif - ; - extern int net_config_poll_timeout; #define NET_EVENT_OPEN(NET_EVENT_EVENTS_START) http://git-wip-us.apache.org/repos/asf/trafficserver/blob/eccb33cc/iocore/net/Net.cc -- diff --git a/iocore/net/Net.cc b/iocore/net/Net.cc index 2ae2c99..485aef1 100644 --- a/iocore/net/Net.cc +++ b/iocore/net/Net.cc @@ -32,7 +32,7 @@ #include P_Net.h RecRawStatBlock *net_rsb = NULL; -int net_config_poll_timeout = DEFAULT_POLL_TIMEOUT; +int net_config_poll_timeout = -1; // This will get set via either command line or records.config. static inline void configure_net(void) http://git-wip-us.apache.org/repos/asf/trafficserver/blob/eccb33cc/mgmt/RecordsConfig.cc -- diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index 134e029..72a905f 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -796,6 +796,14 @@ RecordElement RecordsConfig[] = { , {RECT_CONFIG, proxy.config.net.sock_mss_in, RECD_INT, 0, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} , + {RECT_CONFIG, proxy.config.net.poll_timeout, RECD_INT, +#if defined(solaris) + 30, +#else + 10, +#endif + RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} + , //## //#
[10/50] git commit: TS-2452: Can't access a deleted object
TS-2452: Can't access a deleted object It's an obvious bug, blame me:(. Signed-off-by: Yunkai Zhang qiushu@taobao.com Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fb60e203 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fb60e203 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fb60e203 Branch: refs/heads/5.0.x Commit: fb60e203baffad9aa18c9dec5dc335034052b842 Parents: 9da35d2 Author: Yunkai Zhang qiushu@taobao.com Authored: Wed Dec 25 22:36:49 2013 +0800 Committer: Yunkai Zhang qiushu@taobao.com Committed: Wed Dec 25 22:49:25 2013 +0800 -- CHANGES| 2 ++ proxy/logging/LogObject.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fb60e203/CHANGES -- diff --git a/CHANGES b/CHANGES index eb361c0..e600391 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2452] Can't access a deleted object. + *) [TS-2363] Fix assertion of Unknown file format type!. *) [TS-2448] Fix traffic_cop and traffic_manager to obey the proxy.config.local_state_dir setting. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fb60e203/proxy/logging/LogObject.cc -- diff --git a/proxy/logging/LogObject.cc b/proxy/logging/LogObject.cc index 4869448..8790948 100644 --- a/proxy/logging/LogObject.cc +++ b/proxy/logging/LogObject.cc @@ -48,12 +48,12 @@ LogBufferManager::preproc_buffers(LogBufferSink *sink) { // Still has outstanding references. write_list.push(b); } else if (_num_flush_buffers FLUSH_ARRAY_SIZE) { - delete b; ink_atomic_increment(_num_flush_buffers, -1); Warning(Dropping log buffer, can't keep up.); RecIncrRawStat(log_rsb, this_thread()-mutex-thread_holding, log_stat_bytes_lost_before_preproc_stat, b-header()-byte_count); + delete b; } else { new_q.push(b); }
[35/50] git commit: TS-2464: Remove useless and buggy connection header handling
TS-2464: Remove useless and buggy connection header handling Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/1ef60098 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/1ef60098 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/1ef60098 Branch: refs/heads/5.0.x Commit: 1ef60098387c4e14ae0d75454e47f13815aa94bb Parents: 3be2c67 Author: Uri Shachar ushac...@apache.org Authored: Wed Jan 1 01:30:59 2014 +0200 Committer: Uri Shachar ushac...@apache.org Committed: Wed Jan 1 01:30:59 2014 +0200 -- CHANGES | 2 + proxy/http/HttpTransact.cc| 2 - proxy/http/HttpTransactHeaders.cc | 70 -- proxy/http/HttpTransactHeaders.h | 6 --- 4 files changed, 2 insertions(+), 78 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1ef60098/CHANGES -- diff --git a/CHANGES b/CHANGES index 603ba4b..8599e7d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2464] Remove useless and buggy connection header handling + *) [TS-2457] Protocol.c: change usage of atoi to strtol. Author: Radim Kolar h...@sendmail.cz http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1ef60098/proxy/http/HttpTransact.cc -- diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index 0fa2974..14207f0 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -7541,7 +7541,6 @@ HttpTransact::build_request(State* s, HTTPHdr* base_request, HTTPHdr* outgoing_r HttpTransactHeaders::copy_header_fields(base_request, outgoing_request, s-txn_conf-fwd_proxy_auth_to_parent); add_client_ip_to_outgoing_request(s, outgoing_request); - HttpTransactHeaders::process_connection_headers(base_request, outgoing_request); HttpTransactHeaders::remove_privacy_headers_from_request(s-http_config_param, s-txn_conf, outgoing_request); HttpTransactHeaders::add_global_user_agent_header_to_request(s-http_config_param, outgoing_request); handle_request_keep_alive_headers(s, outgoing_version, outgoing_request); @@ -7664,7 +7663,6 @@ HttpTransact::build_response(State* s, HTTPHdr* base_response, HTTPHdr* outgoing } else { if ((status_code == HTTP_STATUS_NONE) || (status_code == base_response-status_get())) { HttpTransactHeaders::copy_header_fields(base_response, outgoing_response, s-txn_conf-fwd_proxy_auth_to_parent); - HttpTransactHeaders::process_connection_headers(base_response, outgoing_response); if (s-txn_conf-insert_age_in_response) HttpTransactHeaders::insert_time_and_age_headers_in_response(s-request_sent_time, s-response_received_time, http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1ef60098/proxy/http/HttpTransactHeaders.cc -- diff --git a/proxy/http/HttpTransactHeaders.cc b/proxy/http/HttpTransactHeaders.cc index 06cd98f..7c9a3e6 100644 --- a/proxy/http/HttpTransactHeaders.cc +++ b/proxy/http/HttpTransactHeaders.cc @@ -971,76 +971,6 @@ HttpTransactHeaders::insert_basic_realm_in_proxy_authenticate(const char *realm, } -inline void -HttpTransactHeaders::process_connection_field_in_outgoing_header(HTTPHdr *base, HTTPHdr *header) -{ - _process_xxx_connection_field_in_outgoing_header(MIME_FIELD_CONNECTION, MIME_LEN_CONNECTION, base, header); -} - -inline void -HttpTransactHeaders::process_proxy_connection_field_in_outgoing_header(HTTPHdr *base, HTTPHdr *header) -{ - _process_xxx_connection_field_in_outgoing_header(MIME_FIELD_PROXY_CONNECTION, MIME_LEN_PROXY_CONNECTION, base, header); -} - - -void -HttpTransactHeaders::process_connection_headers(HTTPHdr *base, HTTPHdr *outgoing) -{ - process_connection_field_in_outgoing_header(base, outgoing); - process_proxy_connection_field_in_outgoing_header(base, outgoing); -} - - -void -HttpTransactHeaders::_process_xxx_connection_field_in_outgoing_header(const char *wks_field_name, - int wks_field_name_len, - HTTPHdr *base, HTTPHdr *header) -{ - MIMEField *con_hdr; - con_hdr = base-field_find(wks_field_name, wks_field_name_len); - - if (con_hdr) { -int val_len; -const char *val; - -if (!con_hdr-has_dups()) { // try fastpath first - val = con_hdr-value_get(val_len); - if ((ptr_len_casecmp(val, val_len, keep-alive, 10) == 0) || (ptr_len_casecmp(val, val_len, close, 5) ==
[08/50] git commit: TS-2363: Fix assertion of Unknown file format type!
TS-2363: Fix assertion of Unknown file format type! What leading to this assertion is that LogFile object passed to flush thread has been destroyed within Log::periodic_tasks() when accessing it. This patch introduces refcount for LogFile object to avoid been destroyed untimely. Signed-off-by: Yunkai Zhang qiushu@taobao.com Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/9410b755 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/9410b755 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/9410b755 Branch: refs/heads/5.0.x Commit: 9410b755e99322fa81ed24212b0c7902cb153e47 Parents: 3421c6e Author: Yunkai Zhang qiushu@taobao.com Authored: Sun Dec 22 14:29:46 2013 +0800 Committer: Yunkai Zhang qiushu@taobao.com Committed: Sun Dec 22 18:01:39 2013 +0800 -- CHANGES| 2 ++ proxy/logging/Log.h| 2 +- proxy/logging/LogFile.h| 2 +- proxy/logging/LogHost.cc | 3 +-- proxy/logging/LogHost.h| 2 +- proxy/logging/LogObject.cc | 8 ++-- proxy/logging/LogObject.h | 2 +- 7 files changed, 9 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9410b755/CHANGES -- diff --git a/CHANGES b/CHANGES index d5d4fc7..eb361c0 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2363] Fix assertion of Unknown file format type!. + *) [TS-2448] Fix traffic_cop and traffic_manager to obey the proxy.config.local_state_dir setting. *) [TS-2445] Fix problem with 204 responses closing POST requests http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9410b755/proxy/logging/Log.h -- diff --git a/proxy/logging/Log.h b/proxy/logging/Log.h index a646275..92c4525 100644 --- a/proxy/logging/Log.h +++ b/proxy/logging/Log.h @@ -316,7 +316,7 @@ class LogFlushData { public: LINK(LogFlushData, link); - LogFile *m_logfile; + PtrLogFile m_logfile; LogBuffer *logbuffer; void *m_data; int m_len; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9410b755/proxy/logging/LogFile.h -- diff --git a/proxy/logging/LogFile.h b/proxy/logging/LogFile.h index 1995ee7..1f8c275 100644 --- a/proxy/logging/LogFile.h +++ b/proxy/logging/LogFile.h @@ -122,7 +122,7 @@ public: LogFile -*/ -class LogFile:public LogBufferSink +class LogFile:public LogBufferSink, public RefCountObj { public: LogFile(const char *name, const char *header, LogFileFormat format, uint64_t signature, http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9410b755/proxy/logging/LogHost.cc -- diff --git a/proxy/logging/LogHost.cc b/proxy/logging/LogHost.cc index c764f77..89647aa 100644 --- a/proxy/logging/LogHost.cc +++ b/proxy/logging/LogHost.cc @@ -335,7 +335,7 @@ LogHost::clear() ats_free(m_name); delete m_sock; - delete m_orphan_file; + m_orphan_file.clear(); ink_zero(m_ip); m_port = 0; @@ -344,7 +344,6 @@ LogHost::clear() m_sock = NULL; m_sock_fd = -1; m_connected = false; - m_orphan_file = NULL; } bool LogHost::authenticated() http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9410b755/proxy/logging/LogHost.h -- diff --git a/proxy/logging/LogHost.h b/proxy/logging/LogHost.h index cc7cc6d..8442656 100644 --- a/proxy/logging/LogHost.h +++ b/proxy/logging/LogHost.h @@ -87,7 +87,7 @@ private: LogSock *m_sock; int m_sock_fd; bool m_connected; - LogFile *m_orphan_file; + PtrLogFile m_orphan_file; LogCollationClientSM *m_log_collation_client_sm; public: http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9410b755/proxy/logging/LogObject.cc -- diff --git a/proxy/logging/LogObject.cc b/proxy/logging/LogObject.cc index 5109469..4869448 100644 --- a/proxy/logging/LogObject.cc +++ b/proxy/logging/LogObject.cc @@ -184,7 +184,6 @@ LogObject::~LogObject() m_host_list.clear(); } } - delete m_logFile; ats_free(m_basename); ats_free(m_filename); ats_free(m_alt_filename); @@ -311,12 +310,9 @@ LogObject::add_loghost(LogHost * host, bool copy) // A LogObject either writes to a file, or sends to a collation host, but // not both. By default, it writes to a file. If a LogHost is specified, - // then delete the LogFile
[38/50] git commit: TS-2271: Let TSHttpTxnReenable work gracefully when it's called from an unexpected thread (this_ethread() returns NULL).
TS-2271: Let TSHttpTxnReenable work gracefully when it's called from an unexpected thread (this_ethread() returns NULL). Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/d706b7d6 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/d706b7d6 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/d706b7d6 Branch: refs/heads/5.0.x Commit: d706b7d6478ff8b5a37b1422b3ad45739c10a5e9 Parents: 698db8b Author: Heikki Hannikainen he...@hes.iki.fi Authored: Mon Dec 30 17:42:23 2013 +0200 Committer: James Peach jpe...@apache.org Committed: Thu Jan 2 08:39:01 2014 -0800 -- proxy/InkAPI.cc | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d706b7d6/proxy/InkAPI.cc -- diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc index 1e8ecdf..cb31e6d 100644 --- a/proxy/InkAPI.cc +++ b/proxy/InkAPI.cc @@ -5516,10 +5516,14 @@ TSHttpTxnReenable(TSHttpTxn txnp, TSEvent event) HttpSM *sm = (HttpSM *) txnp; EThread *eth = this_ethread(); + // TS-2271: If this function is being executed on a thread which was not + // created using the ATS EThread API, eth will be NULL, and the + // continuation needs to be called back on a REGULAR thread. + // // If this function is being executed on a thread created by the API // which is DEDICATED, the continuation needs to be called back on a // REGULAR thread. - if (eth-tt != REGULAR) { + if (eth == NULL || eth-tt != REGULAR) { eventProcessor.schedule_imm(NEW(new TSHttpSMCallback(sm, event)), ET_NET); } else { MUTEX_TRY_LOCK(trylock, sm-mutex, eth);
[33/50] git commit: TS-2457 Protocol.c: change usage of atoi to strtol.
TS-2457 Protocol.c: change usage of atoi to strtol. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/47982165 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/47982165 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/47982165 Branch: refs/heads/5.0.x Commit: 47982165a1f1beb0bb3d8145fcdf8447f59dbcad Parents: a407f5f Author: Radim Kolar h...@sendmail.cz Authored: Tue Dec 31 13:43:27 2013 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Tue Dec 31 13:43:27 2013 -0700 -- example/protocol/Protocol.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/47982165/example/protocol/Protocol.c -- diff --git a/example/protocol/Protocol.c b/example/protocol/Protocol.c index 5d71430..1258294 100644 --- a/example/protocol/Protocol.c +++ b/example/protocol/Protocol.c @@ -104,6 +104,7 @@ void TSPluginInit(int argc, const char *argv[]) { TSPluginRegistrationInfo info; + char *end; info.plugin_name = output-header; info.vendor_name = MyCompany; @@ -124,8 +125,9 @@ TSPluginInit(int argc, const char *argv[]) printf([protocol_plugin] Usage: protocol.so accept_port server_port\n); printf([protocol_plugin] Wrong arguments. Using deafult ports.\n); } else { -if (!isnan(atoi(argv[1]))) { - accept_port = atoi(argv[1]); +strtol(argv[1], end, 10); +if (*end == '\0') { + accept_port = strtol(argv[1], end, 10); TSDebug(protocol, using accept_port %d, accept_port); printf([protocol_plugin] using accept_port %d\n, accept_port); } else { @@ -133,8 +135,9 @@ TSPluginInit(int argc, const char *argv[]) printf(Using deafult port %d\n, accept_port); } -if (!isnan(atoi(argv[2]))) { - server_port = atoi(argv[2]); +strtol(argv[2], end, 10); +if (*end == '\0') { + server_port = strtol(argv[2], end, 10); TSDebug(protocol, using server_port %d, server_port); printf([protocol_plugin] using server_port %d\n, server_port); } else {
[16/50] git commit: TS-2117: update CHANGES for making hipes plugin build
TS-2117: update CHANGES for making hipes plugin build Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6413af54 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6413af54 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6413af54 Branch: refs/heads/5.0.x Commit: 6413af54eeaa9ccee093fad22ab51259df94971f Parents: cc46db7 Author: Kit Chan kic...@apache.org Authored: Thu Dec 26 16:51:35 2013 -0800 Committer: Kit Chan kic...@apache.org Committed: Thu Dec 26 16:51:35 2013 -0800 -- CHANGES | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6413af54/CHANGES -- diff --git a/CHANGES b/CHANGES index e600391..2d3cb33 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2117] make hipes plugin build + *) [TS-2452] Can't access a deleted object. *) [TS-2363] Fix assertion of Unknown file format type!.
[24/50] git commit: Fix description.
Fix description. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/c0494693 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c0494693 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c0494693 Branch: refs/heads/5.0.x Commit: c04946933dd5525c992915ac2b73cfdac0e0380f Parents: 510c46a Author: Leif Hedstrom l...@ogre.com Authored: Sat Dec 28 14:44:59 2013 -0700 Committer: Leif Hedstrom l...@ogre.com Committed: Sat Dec 28 14:45:31 2013 -0700 -- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c0494693/CHANGES -- diff --git a/CHANGES b/CHANGES index 46c6802..69131c6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,7 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 - *) [TS-2248] Segmentation fault HttpTunnel and throttling. + *) [TS-2248] Segmentation fault in HttpTunnel with flow control. Author: bettydramit b13621367...@gmail.com. *) [TS-2454] Fix undefined reference to `__sync_fetch_and_sub_8' on ARM
[30/50] git commit: TS-2463] Crash regression around slow-log feature
TS-2463] Crash regression around slow-log feature This happens when logging a slow event, and fixes commit c290ce0df2a. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/5cc64bf4 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/5cc64bf4 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/5cc64bf4 Branch: refs/heads/5.0.x Commit: 5cc64bf4552f331d115ce595f8f28202fb4c455e Parents: 1018957 Author: Leif Hedstrom zw...@apache.org Authored: Tue Dec 31 11:01:39 2013 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Tue Dec 31 11:01:39 2013 -0700 -- CHANGES | 6 -- proxy/hdrs/HTTP.cc | 9 +++-- proxy/http/HttpSM.cc | 4 +++- 3 files changed, 14 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5cc64bf4/CHANGES -- diff --git a/CHANGES b/CHANGES index 168a087..96b7ba8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 - *) [TS-32] Fix ICP. - Author: Gota Adachi a...@iij.ad.jp + *) [TS-2463] Crash regression around slow-log feature, when logging an + event. This fixes commit c290ce0df2a. + + *) [TS-32] Fix ICP. Author: Gota Adachi a...@iij.ad.jp *) [TS-2248] Segmentation fault in HttpTunnel with flow control. Author: bettydramit b13621367...@gmail.com. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5cc64bf4/proxy/hdrs/HTTP.cc -- diff --git a/proxy/hdrs/HTTP.cc b/proxy/hdrs/HTTP.cc index 6ecaf35..b9b8dc6 100644 --- a/proxy/hdrs/HTTP.cc +++ b/proxy/hdrs/HTTP.cc @@ -1576,7 +1576,8 @@ class UrlPrintHack { }; char* -HTTPHdr::url_string_get(Arena* arena, int* length) { +HTTPHdr::url_string_get(Arena* arena, int* length) +{ char* zret = 0; UrlPrintHack hack(this); @@ -1594,7 +1595,11 @@ HTTPHdr::url_string_get(Arena* arena, int* length) { } int -HTTPHdr::url_print(char* buff, int length, int* offset, int* skip) { +HTTPHdr::url_print(char* buff, int length, int* offset, int* skip) +{ + ink_release_assert(offset); + ink_release_assert(skip); + int zret = 0; UrlPrintHack hack(this); if (hack.is_valid()) { http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5cc64bf4/proxy/http/HttpSM.cc -- diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index e224527..df9dac5 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -6596,8 +6596,10 @@ HttpSM::update_stats() ink_hrtime_from_msec(t_state.http_config_param-slow_log_threshold) total_time) { URL* url = t_state.hdr_info.client_request.url_get(); char url_string[256] = ; +int offset = 0; +int skip = 0; -t_state.hdr_info.client_request.url_print(url_string, sizeof url_string, 0, 0); +t_state.hdr_info.client_request.url_print(url_string, sizeof url_string, offset, skip); // unique id char unique_id_string[128] = ;
[14/50] git commit: TS-2117 editing hipes plugin documentation
TS-2117 editing hipes plugin documentation Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a701121f Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a701121f Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a701121f Branch: refs/heads/5.0.x Commit: a701121fcc0fa44611a5413239a17de1f98be28d Parents: 65630cd Author: Kit Chan kic...@apache.org Authored: Thu Dec 26 09:24:58 2013 -0800 Committer: Kit Chan kic...@apache.org Committed: Thu Dec 26 09:24:58 2013 -0800 -- doc/reference/plugins/hipes.en.rst | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a701121f/doc/reference/plugins/hipes.en.rst -- diff --git a/doc/reference/plugins/hipes.en.rst b/doc/reference/plugins/hipes.en.rst index 2d6daa5..e74a58a 100644 --- a/doc/reference/plugins/hipes.en.rst +++ b/doc/reference/plugins/hipes.en.rst @@ -66,7 +66,7 @@ HTTP Pipes (aka HIPES and pronounced Hippies) allows data services to be pipel Example === -1. ATS is run on port 80 and apache HTTP web server is run on port 8080 +1. ATS is run on port 80 and apache HTTP web server is run on port 8080 on localhost (127.0.0.1) 2. The HIPES plugin is used in ``remap.config`` :: @@ -74,23 +74,23 @@ Example map http://127.0.0.1/svc_reverse http://nosuchhost @plugin=hipes.so @pparam=service:127.0.0.1:8080 @pparam=path:svc_reverse.php @pparam=server:127.0.0.1 map http://127.0.0.1/test.txt http://127.0.0.1:8080/test.txt -3. The plugin remaps the incoming URL such as +3. The plugin remaps the incoming URL such as :: -``http://127.0.0.1/svc_reverse/svc_case;case=u/test.txt`` +http://127.0.0.1/svc_reverse/svc_case;case=u/test.txt -to the following +to the following :: - ``http://127.0.0.1:8080/svc_reverse?url=http%3A%2F%2F127.0.0.1%2Fsvc_case%3Bcase%3Du%2Ftest.txt`` + http://127.0.0.1:8080/svc_reverse?url=http%3A%2F%2F127.0.0.1%2Fsvc_case%3Bcase%3Du%2Ftest.txt -3. The service ``svc_reverse.php`` fetches the ``url`` from the ATS again and the plugin remaps the URL +4. The service ``svc_reverse.php`` fetches the ``url`` from the ATS again and the plugin remaps the URL :: -``http://127.0.0.1/svc_case;case=u/test.txt`` +http://127.0.0.1/svc_case;case=u/test.txt -to this URL +to this URL :: - ``http://127.0.0.1:8080/svc_case.php?case=uurl=http%3A%2F%2F127.0.0.1%2Ftest.txt`` + http://127.0.0.1:8080/svc_case.php?case=uurl=http%3A%2F%2F127.0.0.1%2Ftest.txt -4. In this example, the service ``svc_case.php`` fetches and transforms the response of ``http://127.0.0.1/test.txt`` (which ATS proxies the request to a local file) to upper case. And subsequently the service ``svc_reverse.php`` receives the response and reverse the order before the response is sent back to the client by ATS. +5. In this example, the service ``svc_case.php`` fetches and transforms the response of ``http://127.0.0.1/test.txt`` (which ATS proxies the request to a local file) to upper case. And subsequently the service ``svc_reverse.php`` receives the response and reverse the order before the response is sent back to the client by ATS. Notes on reducing traffic = @@ -102,13 +102,13 @@ Modification to above example to reduce traffic using redirect 1. The service ``svc_reverse.php`` is modified to add a header of ``X-HIPES-Redirect: 2`` to the request made against ``url``. -2. HIPES plugin will instruct ATS to return a redirect response to this url +2. HIPES plugin will instruct ATS to return a redirect response to this url :: - ``http://127.0.0.1:8080/svc_case.php?case=uurl=http%3A%2F%2F127.0.0.1%2Ftest.txt`` + http://127.0.0.1:8080/svc_case.php?case=uurl=http%3A%2F%2F127.0.0.1%2Ftest.txt for the following request -``http://127.0.0.1/svc_case;case=u/test.txt`` +http://127.0.0.1/svc_case;case=u/test.txt -3. The service ``svc_reverse.php`` is also modified to follow the redirect. Thus the response of the service of ``svc_case`` will not pass through ATS and will pass to ``svc_reverse`` service instead. +3. The service ``svc_reverse.php`` is also modified to follow the redirect. Thus the response of the service of ``svc_case.php`` will not pass through ATS and will pass to ``svc_reverse.php`` service instead.
[06/50] git commit: TS-2448: Fix traffic_manager to work correctly if proxy.config.local_state_dir is set
TS-2448: Fix traffic_manager to work correctly if proxy.config.local_state_dir is set Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/aae02ee4 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/aae02ee4 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/aae02ee4 Branch: refs/heads/5.0.x Commit: aae02ee4fd133ec604b3e7bd7d090cd05f29750e Parents: b78aa56 Author: James Peach jpe...@apache.org Authored: Mon Dec 16 15:53:43 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Fri Dec 20 15:23:14 2013 -0800 -- lib/records/RecCore.cc| 3 ++- lib/records/RecMessage.cc | 3 ++- mgmt/LocalManager.cc | 3 ++- mgmt/Main.cc | 5 +++-- mgmt/api/CoreAPIRemote.cc | 2 ++ 5 files changed, 11 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/aae02ee4/lib/records/RecCore.cc -- diff --git a/lib/records/RecCore.cc b/lib/records/RecCore.cc index 759dcef..b81b3d1 100644 --- a/lib/records/RecCore.cc +++ b/lib/records/RecCore.cc @@ -177,7 +177,8 @@ RecCoreInit(RecModeT mode_type, Diags *_diags) } // read stats if ((mode_type == RECM_SERVER) || (mode_type == RECM_STAND_ALONE)) { -g_stats_snap_fpath = Layout::relative_to(Layout::get()-runtimedir, REC_RAW_STATS_FILE); +xptrchar rundir(RecConfigReadRuntimeDir()); +g_stats_snap_fpath = Layout::relative_to(rundir, REC_RAW_STATS_FILE); RecReadStatsFile(); } // read configs http://git-wip-us.apache.org/repos/asf/trafficserver/blob/aae02ee4/lib/records/RecMessage.cc -- diff --git a/lib/records/RecMessage.cc b/lib/records/RecMessage.cc index 8c84c8b..bec22be 100644 --- a/lib/records/RecMessage.cc +++ b/lib/records/RecMessage.cc @@ -99,8 +99,9 @@ recv_thr(void *data) static void * accept_thr(void *data) { + xptrchar rundir(RecConfigReadRuntimeDir()); RecHandle h_pipe; - h_pipe = RecPipeCreate(Layout::get()-runtimedir, REC_PIPE_NAME); + h_pipe = RecPipeCreate(rundir, REC_PIPE_NAME); ink_thread_create(send_thr, (void *) h_pipe); ink_thread_create(recv_thr, (void *) h_pipe); return NULL; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/aae02ee4/mgmt/LocalManager.cc -- diff --git a/mgmt/LocalManager.cc b/mgmt/LocalManager.cc index 21d05e6..dc30dcd 100644 --- a/mgmt/LocalManager.cc +++ b/mgmt/LocalManager.cc @@ -146,7 +146,8 @@ LocalManager::clearStats(const char *name) // that operation works even when the proxy is off // if (this-proxy_running == 0) { -statsPath = Layout::relative_to(Layout::get()-runtimedir, REC_RAW_STATS_FILE); +xptrchar rundir(RecConfigReadRuntimeDir()); +statsPath = Layout::relative_to(rundir, REC_RAW_STATS_FILE); if (unlink(statsPath) 0) { if (errno != ENOENT) { mgmt_log(stderr, [LocalManager::clearStats] Unlink of %s failed : %s\n, REC_RAW_STATS_FILE, strerror(errno)); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/aae02ee4/mgmt/Main.cc -- diff --git a/mgmt/Main.cc b/mgmt/Main.cc index 2452f16..ac23d21 100644 --- a/mgmt/Main.cc +++ b/mgmt/Main.cc @@ -104,6 +104,7 @@ static void SigChldHandler(int sig); static void check_lockfile() { + xptrchar rundir(RecConfigReadRuntimeDir()); char lockfile[PATH_NAME_MAX]; int err; pid_t holding_pid; @@ -111,7 +112,7 @@ check_lockfile() // // test for presence of server lock // // - Layout::relative_to(lockfile, PATH_NAME_MAX, Layout::get()-runtimedir, SERVER_LOCK); + Layout::relative_to(lockfile, sizeof(lockfile), rundir, SERVER_LOCK); Lockfile server_lockfile(lockfile); err = server_lockfile.Open(holding_pid); if (err == 1) { @@ -137,7 +138,7 @@ check_lockfile() /// // try to get the exclusive manager lock // /// - Layout::relative_to(lockfile, PATH_NAME_MAX, Layout::get()-runtimedir, MANAGER_LOCK); + Layout::relative_to(lockfile, sizeof(lockfile), rundir, MANAGER_LOCK); Lockfile manager_lockfile(lockfile); err = manager_lockfile.Get(holding_pid); if (err != 1) { http://git-wip-us.apache.org/repos/asf/trafficserver/blob/aae02ee4/mgmt/api/CoreAPIRemote.cc -- diff --git a/mgmt/api/CoreAPIRemote.cc b/mgmt/api/CoreAPIRemote.cc index cb2ae5c..6c0ecc3 100644 --- a/mgmt/api/CoreAPIRemote.cc +++ b/mgmt/api/CoreAPIRemote.cc @@ -237,6 +237,8 @@ Init(const char
[47/50] git commit: TS-1365 Fix AIO unit test
TS-1365 Fix AIO unit test Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/d96ac78d Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/d96ac78d Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/d96ac78d Branch: refs/heads/5.0.x Commit: d96ac78d036d2ea52356a178da57bcf4733bfa76 Parents: f78c83a Author: Leif Hedstrom zw...@apache.org Authored: Thu Jan 2 16:30:39 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Thu Jan 2 16:30:39 2014 -0700 -- iocore/aio/test_AIO.cc | 8 1 file changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d96ac78d/iocore/aio/test_AIO.cc -- diff --git a/iocore/aio/test_AIO.cc b/iocore/aio/test_AIO.cc index 817d8a2..3ff731a 100644 --- a/iocore/aio/test_AIO.cc +++ b/iocore/aio/test_AIO.cc @@ -34,6 +34,14 @@ Diags *diags; int diags_init = 0; #define DIAGS_LOG_FILE diags.log +// Necessary for AIO +#if defined(solaris) +int net_config_poll_timeout = 30; +#else +int net_config_poll_timeout = 10; +#endif + + // // // void reconfigure_diags()
[15/50] git commit: Remove unrepeated entries in plugin index document
Remove unrepeated entries in plugin index document Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/cc46db7f Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/cc46db7f Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/cc46db7f Branch: refs/heads/5.0.x Commit: cc46db7f991beb0d995657afae53781db1522369 Parents: a701121 Author: Kit Chan kic...@apache.org Authored: Thu Dec 26 11:29:32 2013 -0800 Committer: Kit Chan kic...@apache.org Committed: Thu Dec 26 11:29:32 2013 -0800 -- doc/reference/plugins/index.en.rst | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cc46db7f/doc/reference/plugins/index.en.rst -- diff --git a/doc/reference/plugins/index.en.rst b/doc/reference/plugins/index.en.rst index 4b9307b..a435abb 100644 --- a/doc/reference/plugins/index.en.rst +++ b/doc/reference/plugins/index.en.rst @@ -64,7 +64,6 @@ directory of the Apache Traffic Server source tree. Exmperimental plugins can be balancer.en buffer_upload.en - cacheurl.en combo_handler.en esi.en geoip_acl.en
[43/50] git commit: TS-1365 Update documentation
TS-1365 Update documentation Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a74ef5a0 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a74ef5a0 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a74ef5a0 Branch: refs/heads/5.0.x Commit: a74ef5a049347a864a0597364d3575ec297eeeb5 Parents: eccb33c Author: Leif Hedstrom zw...@apache.org Authored: Thu Jan 2 15:18:52 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Thu Jan 2 15:30:53 2014 -0700 -- .../configuration/records.config.en.rst | 20 1 file changed, 20 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a74ef5a0/doc/reference/configuration/records.config.en.rst -- diff --git a/doc/reference/configuration/records.config.en.rst b/doc/reference/configuration/records.config.en.rst index c92f351..08aaf1a 100644 --- a/doc/reference/configuration/records.config.en.rst +++ b/doc/reference/configuration/records.config.en.rst @@ -2225,6 +2225,26 @@ Sockets Same as the command line option ``--accept_mss`` that sets the MSS for all incoming requests. +.. ts:cv:: CONFIG proxy.config.net.poll_timeout INT 0 + + Same as the command line option ``--poll_timeout``, or ``-t``, which + specifies the timeout used for the polling mechanism used. This timeout is + always in milliseconds (ms). On Linux, this is the timeout to + ``epoll_wait()``. The default value is ``10`` on all platforms except + Solaris, where it is ``30``. + + Changing this configuration can reduce CPU usage on an idle system, since + periodic tasks gets processed at these intervals. On busy servers, this + overhead is diminished, since polled events triggers more + frequently. However, increasing the setting can also introduce additional + latency for certain operations, and timed events. It's recommended not to + touch this setting unless your CPU usage is unacceptable at idle + workload. Some alternatives to this could be:: + +Reduce the number of worker threads (net-threads) +Reduce the number of disk (AIO) threads + + Undocumented
[22/50] git commit: Fix indentation and punctuations.
Fix indentation and punctuations. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6a88b7dd Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6a88b7dd Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6a88b7dd Branch: refs/heads/5.0.x Commit: 6a88b7dd5edbf59b794f329c722d1d531e36db30 Parents: 40a49e3 Author: Leif Hedstrom l...@ogre.com Authored: Sat Dec 28 14:03:59 2013 -0700 Committer: Leif Hedstrom l...@ogre.com Committed: Sat Dec 28 14:03:59 2013 -0700 -- CHANGES | 102 --- 1 file changed, 56 insertions(+), 46 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6a88b7dd/CHANGES -- diff --git a/CHANGES b/CHANGES index 29079c0..ca28d6c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,19 +1,21 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 - *) TS-2454: Fix undefined reference to `__sync_fetch_and_sub_8' on ARM 32bit system. + *) [TS-2454] Fix undefined reference to `__sync_fetch_and_sub_8' on ARM + 32bit system. *) [TS-2450] Fix assertion failure for T61String type. - *) [TS-2117] make hipes plugin build + *) [TS-2117] make hipes plugin build. *) [TS-2452] Can't access a deleted object. *) [TS-2363] Fix assertion of Unknown file format type!. - *) [TS-2448] Fix traffic_cop and traffic_manager to obey the proxy.config.local_state_dir setting. + *) [TS-2448] Fix traffic_cop and traffic_manager to obey the + proxy.config.local_state_dir setting. - *) [TS-2445] Fix problem with 204 responses closing POST requests + *) [TS-2445] Fix problem with 204 responses closing POST requests. *) [TS-2434] Use the FATAL error level to handle plugin errors. @@ -21,7 +23,7 @@ Changes with Apache Traffic Server 4.2.0 *) [TS-2436] Add a simple integration test harness. - *) [TS-2355] ATS 4.0.x crashes when using OpenSSL 1.0.1e + *) [TS-2355] ATS 4.0.x crashes when using OpenSSL 1.0.1e. *) [TS-2432] Fix a race in aio_err_callblk. @@ -29,42 +31,46 @@ Changes with Apache Traffic Server 4.2.0 *) [TS-2190] Remove cache.log from the cachurl plugin. - *) [TS-2426] Add a new plugin, xdebug, for cache debugging using HTTP headers. + *) [TS-2426] Add a new plugin, xdebug, for cache debugging using HTTP + headers. *) [TS-2077] Remove pipeline configurations, they were no-op's anyways. We still support pipelining (we always do), it's just not treated specially (or optimized). - *) [TS-2386] clean up unused files and codes -- round 4.2 + *) [TS-2386] clean up unused files and codes -- round 4.2. *) [TS-548] remove Initialize.cc Initialize.h - *) [TS-2082] remove STANDALONE_IOCORE FIXME_NONMODULAR and NON_MODULAR defines + *) [TS-2082] remove STANDALONE_IOCORE FIXME_NONMODULAR and NON_MODULAR + defines. - *) [TS-312] Add option to always share keep-alive connections to the origin server + *) [TS-312] Add option to always share keep-alive connections to the origin + server. - *) [TS-2419] Don't close client connection when responding with a 204 and there is no body + *) [TS-2419] Don't close client connection when responding with a 204 and + there is no body. *) [TS-1146] Add RFC 5077 TLS session ticket support. Author: Wei Sun sun...@yahoo-inc.com *) [TS-2401] Use Layout instead of global install path directories. - *) [TS-2420] Remove STAT_SYNC, CONF_SYNC, and REM_SYNC threads and schedule those - continuations in ET_TASK + *) [TS-2420] Remove STAT_SYNC, CONF_SYNC, and REM_SYNC threads and schedule + those continuations in ET_TASK. *) [TS-2372] Enable TLS perfect forward security with ECDHE. *) [TS-2416] Make TLS the session timeout threshold configurable. Author: Wei Sun sun...@yahoo-inc.com - *) [TS-2335] adding ts_lua plugin to experimental directory + *) [TS-2335] adding ts_lua plugin to experimental directory. *) [TS-2347] buffer_upload uses unsafe function tempnam(). Replace it - with mkstemp() + with mkstemp(). *) [TS-1815] Add thread number and port to accept thread name and - add the file descriptor number to the ET_AIO thread names + add the file descriptor number to the ET_AIO thread names. *) [TS-2415] Use standard continuations to release UrlRewrite objects. @@ -92,11 +98,12 @@ Changes with Apache Traffic Server 4.2.0 *) [TS-2374] Abort the producer if the none of it`s consumers is alive. - *) [TS-2330] Update proxy.config.body_factory.enable_customizations comments in records.config + *) [TS-2330] Update proxy.config.body_factory.enable_customizations comments + in
[46/50] git commit: Added TS-1365 to CHANGES, fixed default config value in docs
Added TS-1365 to CHANGES, fixed default config value in docs Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f78c83a8 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f78c83a8 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f78c83a8 Branch: refs/heads/5.0.x Commit: f78c83a82d6eb6f2bfc23fc86ceb430121548049 Parents: 037d8cc Author: Leif Hedstrom zw...@apache.org Authored: Thu Jan 2 15:33:47 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Thu Jan 2 15:33:47 2014 -0700 -- CHANGES | 6 ++ doc/reference/configuration/records.config.en.rst | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f78c83a8/CHANGES -- diff --git a/CHANGES b/CHANGES index 6d01fca..7e4ae1e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,12 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-1365] Add a new configuration option, proxy.config.net.poll_timeout, + with the same behavior as the command line option --poll_timeout. Also + adjust AIO scheduling to correlate to this setting, to avoid additional + CPU load. Note that this configuration is generally not necessary to + configure, unless you are concerned with system idle CPU consumption. + *) [TS-2468] Bring back the load balancer plugin. *) [TS-2465] libxml2 detection generates an invalid linker path. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f78c83a8/doc/reference/configuration/records.config.en.rst -- diff --git a/doc/reference/configuration/records.config.en.rst b/doc/reference/configuration/records.config.en.rst index 08aaf1a..79e4975 100644 --- a/doc/reference/configuration/records.config.en.rst +++ b/doc/reference/configuration/records.config.en.rst @@ -2225,7 +2225,7 @@ Sockets Same as the command line option ``--accept_mss`` that sets the MSS for all incoming requests. -.. ts:cv:: CONFIG proxy.config.net.poll_timeout INT 0 +.. ts:cv:: CONFIG proxy.config.net.poll_timeout INT 10 (or 30 on Solaris) Same as the command line option ``--poll_timeout``, or ``-t``, which specifies the timeout used for the polling mechanism used. This timeout is
[41/50] git commit: TS-2468: bring back the load balancer plugin
TS-2468: bring back the load balancer plugin Rework the load balancer plugin, to remove ties to Yahoo internal infrastructure and make a simple balancer plugin with no external dependencies. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/0a6ae3b8 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/0a6ae3b8 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/0a6ae3b8 Branch: refs/heads/5.0.x Commit: 0a6ae3b89cdfd08ef1a18a5f4d379d73ed858632 Parents: 96abfc7 Author: James Peach jpe...@apache.org Authored: Sun Dec 22 19:55:19 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Thu Jan 2 13:43:10 2014 -0800 -- CHANGES | 2 + configure.ac| 1 + doc/reference/plugins/balancer.en.rst | 117 +++--- plugins/experimental/Makefile.am| 1 + plugins/experimental/balancer/Makefile.am | 22 ++ plugins/experimental/balancer/README| 93 - plugins/experimental/balancer/balancer.cc | 443 --- plugins/experimental/balancer/balancer.h| 46 +++ plugins/experimental/balancer/hash.cc | 207 +++ plugins/experimental/balancer/hashkey.h | 254 - plugins/experimental/balancer/resources.h | 111 -- plugins/experimental/balancer/roundrobin.cc | 72 12 files changed, 479 insertions(+), 890 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0a6ae3b8/CHANGES -- diff --git a/CHANGES b/CHANGES index 464e054..6d01fca 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2468] Bring back the load balancer plugin. + *) [TS-2465] libxml2 detection generates an invalid linker path. Author: Radim Kolar h...@sendmail.cz http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0a6ae3b8/configure.ac -- diff --git a/configure.ac b/configure.ac index 296246d..fdc88ca 100644 --- a/configure.ac +++ b/configure.ac @@ -1922,6 +1922,7 @@ AC_CONFIG_FILES([ plugins/conf_remap/Makefile plugins/experimental/Makefile plugins/experimental/authproxy/Makefile + plugins/experimental/balancer/Makefile plugins/experimental/buffer_upload/Makefile plugins/experimental/channel_stats/Makefile plugins/experimental/custom_redirect/Makefile http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0a6ae3b8/doc/reference/plugins/balancer.en.rst -- diff --git a/doc/reference/plugins/balancer.en.rst b/doc/reference/plugins/balancer.en.rst index 43aa3ed..a31c1aa 100644 --- a/doc/reference/plugins/balancer.en.rst +++ b/doc/reference/plugins/balancer.en.rst @@ -21,68 +21,55 @@ Balancer Plugin under the License. -This is a plugin for Traffic Server, that allows you to configure -mapping rules. - -To use this plugin, configure a remap.config rule like this:: - - map http://foo.com http://bar.com @plugin=balancer.so @pparam=rotation:news - -The To-Url in the remap.config rule is generally not used, unless the -lookup completely fails (i.e. this is a backup URL for extreme error -cases). - -This is a list of all available options (set via @pparam):: - -rotation The name of the rotation (e.g. news) [to-host in remap] -hash What to hash on, url, path, cookie, ip, header (primary) -hash2 Optional, secondary hash, to hash within a multi-host bucket -bucketw Width of each hash bucket [1] - -The rotation parameter specifies which rotation to do the lookup on. If -not specified, we will default to the same name as used in the To URL in -the remap rule. - -The bucket width specifies how many hosts a particular hash bucket -should contain, for example:: - -@pparam=bucketw:2 - -The hash parameter can be used zero or more times, without it, no -hashing is done at all. If you have more than one hash keys, they are -concatenated in the order specified. For example:: - -@pparam=hash:ip @pparam=hash:cookie/B - -The header hash key takes a required extra value, for example:: - -@pparam=hash:header/Host - -For cookie hash keys, you can optionally specify an identifier for -which cookie to use (without it, the entire cookie header is used). For -example:: - -@pparam=hash:cookie/B - -The secondary hash (hash2) is used to provide stickiness within a -bucket that's larger than one host (i.e. bucketw 1). This allows you -to (for example) have a primary hash on the URL, where each URL is -served by some number of servers. A
[44/50] git commit: TS-1365 Fix doc for --poll_timeout
TS-1365 Fix doc for --poll_timeout Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/037d8cc2 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/037d8cc2 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/037d8cc2 Branch: refs/heads/5.0.x Commit: 037d8cc2c54e6ddbd83dc95f055d8756c078a6ca Parents: a74ef5a Author: Leif Hedstrom zw...@apache.org Authored: Thu Jan 2 15:22:18 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Thu Jan 2 15:30:53 2014 -0700 -- doc/reference/commands/traffic_server.en.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/037d8cc2/doc/reference/commands/traffic_server.en.rst -- diff --git a/doc/reference/commands/traffic_server.en.rst b/doc/reference/commands/traffic_server.en.rst index 442a369..2c8b586 100644 --- a/doc/reference/commands/traffic_server.en.rst +++ b/doc/reference/commands/traffic_server.en.rst @@ -62,7 +62,7 @@ Description .. option:: --accept_mss MSS -.. option:: -t SECS, --poll_timeout SECS +.. option:: -t MSECS, --poll_timeout MSECS .. option:: -h, --help
[02/50] git commit: TS-2445: Fix problem with 204 responses closing POST requests
TS-2445: Fix problem with 204 responses closing POST requests Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/021d1a30 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/021d1a30 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/021d1a30 Branch: refs/heads/5.0.x Commit: 021d1a30b952cab511da95d88d3f59152ee5c95f Parents: bd00203 Author: Bryan Call bc...@apache.org Authored: Thu Dec 19 10:29:58 2013 -0800 Committer: Bryan Call bc...@apache.org Committed: Thu Dec 19 10:29:58 2013 -0800 -- CHANGES | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/021d1a30/CHANGES -- diff --git a/CHANGES b/CHANGES index 5a786a3..bf132c8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2445] Fix problem with 204 responses closing POST requests + *) [TS-2434] Use the FATAL error level to handle plugin errors. *) [TS-2203] Clarify syslog startup messages for standalone log programs.
[28/50] git commit: Add TS-32.
Add TS-32. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/c905388f Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c905388f Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c905388f Branch: refs/heads/5.0.x Commit: c905388f273efff34d4ccf79b0e41be3ef459ada Parents: 1d01716 Author: Zhao Yongming ming@gmail.com Authored: Sun Dec 29 18:50:00 2013 +0800 Committer: Zhao Yongming ming@gmail.com Committed: Sun Dec 29 18:50:00 2013 +0800 -- CHANGES | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c905388f/CHANGES -- diff --git a/CHANGES b/CHANGES index 69131c6..168a087 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-32] Fix ICP. + Author: Gota Adachi a...@iij.ad.jp + *) [TS-2248] Segmentation fault in HttpTunnel with flow control. Author: bettydramit b13621367...@gmail.com.
[36/50] git commit: TS-2457 Fix usage around strtol, bad review on my part
TS-2457 Fix usage around strtol, bad review on my part Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/74af2183 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/74af2183 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/74af2183 Branch: refs/heads/5.0.x Commit: 74af2183c3641a3c0f2b7f024b17d5d0db814e93 Parents: 1ef6009 Author: Leif Hedstrom zw...@apache.org Authored: Tue Dec 31 19:54:29 2013 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Tue Dec 31 19:54:29 2013 -0700 -- example/protocol/Protocol.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/74af2183/example/protocol/Protocol.c -- diff --git a/example/protocol/Protocol.c b/example/protocol/Protocol.c index 1258294..d065c9d 100644 --- a/example/protocol/Protocol.c +++ b/example/protocol/Protocol.c @@ -105,6 +105,7 @@ TSPluginInit(int argc, const char *argv[]) { TSPluginRegistrationInfo info; char *end; + int tmp; info.plugin_name = output-header; info.vendor_name = MyCompany; @@ -125,9 +126,9 @@ TSPluginInit(int argc, const char *argv[]) printf([protocol_plugin] Usage: protocol.so accept_port server_port\n); printf([protocol_plugin] Wrong arguments. Using deafult ports.\n); } else { -strtol(argv[1], end, 10); +tmp = strtol(argv[1], end, 10); if (*end == '\0') { - accept_port = strtol(argv[1], end, 10); + accept_port = tmp; TSDebug(protocol, using accept_port %d, accept_port); printf([protocol_plugin] using accept_port %d\n, accept_port); } else { @@ -135,9 +136,9 @@ TSPluginInit(int argc, const char *argv[]) printf(Using deafult port %d\n, accept_port); } -strtol(argv[2], end, 10); +tmp = strtol(argv[2], end, 10); if (*end == '\0') { - server_port = strtol(argv[2], end, 10); + server_port = tmp; TSDebug(protocol, using server_port %d, server_port); printf([protocol_plugin] using server_port %d\n, server_port); } else {
[29/50] git commit: Fix some typo about reclaimable freelist
Fix some typo about reclaimable freelist Signed-off-by: Yunkai Zhang qiushu@taobao.com Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/10189576 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/10189576 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/10189576 Branch: refs/heads/5.0.x Commit: 101895767fd35fef048f7ce3f3bd5db5c4e8f9cb Parents: c905388 Author: Yunkai Zhang qiushu@taobao.com Authored: Tue Dec 31 00:46:13 2013 +0800 Committer: Yunkai Zhang qiushu@taobao.com Committed: Tue Dec 31 00:49:39 2013 +0800 -- configure.ac| 2 +- lib/ts/ink_queue_ext.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/10189576/configure.ac -- diff --git a/configure.ac b/configure.ac index 5d50b12..296246d 100644 --- a/configure.ac +++ b/configure.ac @@ -401,7 +401,7 @@ if test x${enable_freelist} = xyes; then [AS_HELP_STRING([--enable-reclaimable-freelist], [enable reclaimable freelist support (effective only when freelist is enabled)])], [], - [enable_recalimable_freelist=yes]) + [enable_reclaimable_freelist=no]) AC_MSG_RESULT([$enable_reclaimable_freelist]) else enable_reclaimable_freelist=no http://git-wip-us.apache.org/repos/asf/trafficserver/blob/10189576/lib/ts/ink_queue_ext.cc -- diff --git a/lib/ts/ink_queue_ext.cc b/lib/ts/ink_queue_ext.cc index b34ecc8..4352487 100644 --- a/lib/ts/ink_queue_ext.cc +++ b/lib/ts/ink_queue_ext.cc @@ -354,7 +354,7 @@ ink_chunk_delete(InkFreeList *f, InkThreadCache *pCache, InkChunkInfo *pChunk) /* * TODO: I had used ink_atomic_increment() here, but it would * lead to incorrect value in linux OS, I don't know why: - * ink_atomic_decrement((int64_t *)total_mem_in_byte, -f-chunk_byte_size); + * ink_atomic_increment((int64_t *)total_mem_in_byte, -f-chunk_byte_size); * * So I create a new wrap, ink_atomic_decrement(), in ink_atomic.h, * it works well. But we should create the same wrap for other OS.
[48/50] git commit: TS-2467: traffic_shell doesn't work with tcl 8.6, works with 8.5
TS-2467: traffic_shell doesn't work with tcl 8.6, works with 8.5 Segfault in libtcl8.6.so when calling Tcl_SetMainLoop(Tcl_ReadlineMain). If setting Tcl MainLoop, we should call Tcl_FindExecutable(NULL), which fixes TCL 8.6 and should also work with older versions. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8901e65d Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8901e65d Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8901e65d Branch: refs/heads/5.0.x Commit: 8901e65da2c0affa742227b56d966f45e9d3e8a6 Parents: d96ac78 Author: Ben Aitchison b...@meh.net.nz Authored: Thu Jan 2 15:37:40 2014 -0800 Committer: James Peach jpe...@apache.org Committed: Thu Jan 2 15:39:42 2014 -0800 -- CHANGES| 3 +++ cmd/traffic_shell/traffic_shell.cc | 2 ++ 2 files changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8901e65d/CHANGES -- diff --git a/CHANGES b/CHANGES index 7e4ae1e..2a0771c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2467] traffic_shell doesn't work with tcl 8.6. + Author: Ben Aitchison b...@meh.net.nz + *) [TS-1365] Add a new configuration option, proxy.config.net.poll_timeout, with the same behavior as the command line option --poll_timeout. Also adjust AIO scheduling to correlate to this setting, to avoid additional http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8901e65d/cmd/traffic_shell/traffic_shell.cc -- diff --git a/cmd/traffic_shell/traffic_shell.cc b/cmd/traffic_shell/traffic_shell.cc index 8da720a..29978c7 100644 --- a/cmd/traffic_shell/traffic_shell.cc +++ b/cmd/traffic_shell/traffic_shell.cc @@ -73,6 +73,8 @@ main(int argc, char *argv[]) exit(0); } + Tcl_FindExecutable(argv[0]); + // traffic_shell binary should use printf to display information onscreen CliDisplayPrintf = 1;
[03/50] git commit: fix another typo jpeach pointed out
fix another typo jpeach pointed out Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/2548cbcf Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/2548cbcf Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/2548cbcf Branch: refs/heads/5.0.x Commit: 2548cbcf6ec840601355372fbb0f09be6d0a823d Parents: 021d1a3 Author: Igor Galić i.ga...@brainsware.org Authored: Thu Dec 19 22:32:01 2013 +0100 Committer: Igor Galić i.ga...@brainsware.org Committed: Thu Dec 19 22:32:01 2013 +0100 -- .../adding-statistics/viewing-statistics-using-traffic-line.en.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2548cbcf/doc/sdk/adding-statistics/viewing-statistics-using-traffic-line.en.rst -- diff --git a/doc/sdk/adding-statistics/viewing-statistics-using-traffic-line.en.rst b/doc/sdk/adding-statistics/viewing-statistics-using-traffic-line.en.rst index 706deb0..0e8785e 100644 --- a/doc/sdk/adding-statistics/viewing-statistics-using-traffic-line.en.rst +++ b/doc/sdk/adding-statistics/viewing-statistics-using-traffic-line.en.rst @@ -18,7 +18,7 @@ Viewing Statistics Using Traffic Line specific language governing permissions and limitations under the License. -.. XXX: This documentation seems to be dupplicated from the admin docs. +.. XXX: This documentation seems to be duplicated from the admin docs. To view statistics for your plugin, follow the steps below:
[20/50] git commit: document update for hipes and buffer_upload plugins
document update for hipes and buffer_upload plugins Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/b36a7e12 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/b36a7e12 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/b36a7e12 Branch: refs/heads/5.0.x Commit: b36a7e120e4b9c216fe2f13a97015a508911e0a4 Parents: 8d8507f Author: Kit Chan kic...@apache.org Authored: Sat Dec 28 09:06:04 2013 -0800 Committer: Kit Chan kic...@apache.org Committed: Sat Dec 28 09:06:04 2013 -0800 -- doc/reference/plugins/buffer_upload.en.rst | 93 +++-- doc/reference/plugins/hipes.en.rst | 22 -- 2 files changed, 58 insertions(+), 57 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b36a7e12/doc/reference/plugins/buffer_upload.en.rst -- diff --git a/doc/reference/plugins/buffer_upload.en.rst b/doc/reference/plugins/buffer_upload.en.rst index ab5f209..022d61e 100644 --- a/doc/reference/plugins/buffer_upload.en.rst +++ b/doc/reference/plugins/buffer_upload.en.rst @@ -18,72 +18,63 @@ Buffer Upload Plugin specific language governing permissions and limitations under the License. +The Buffer Upload plugin offers the following features -.. XXX Discribe what the heck this plugin actually does. +Installation + -Upload proxy specs for phase I: +Configuration can be explicitly specified as a parameter in ``plugin.config`` :: -1. Memory buffering (buffer the entire POST data in IOBuffer before - connecting to OS) 1.1. Memory buffer size is configured with - mem_buffer_size in config file. Default and minimum value is 32K - You can increase it in the config file. If the size of a request is - larger than the mem_buffer_size value specifiied in the config - file, then the upload proxy feature will be disabled for this - particular request +buffer_upload.so /FOOBAR/upload.conf -2. Disk buffering (buffer the entire POST data on disk before connecting - to OS) 2.1. Use disk async IO. This involved some changes in ATS core - . new APIs wrapping around ink_aio_read() and ink_aio_write() . - change to distinguish between api call's AIO and cache's AIO . - guarantee api call's AIO only involves certain amount of threads . - the number of threads is configurable in plugin's config file - (default is 4) +Memory buffering (buffer the entire POST data in IOBuffer before connecting to OS) +== -3. +Memory buffer size is configured with mem_buffer_size in config file. Default and minimum value is 32K. You can +increase it in the config file. If the size of a request is larger than the mem_buffer_size value specifiied in the +config file, then the upload proxy feature will be disabled for this particular request - 2. Directories and files generated on disk . base directory: - FOOBAR/var/buffer_upload_tmp/ (configurable in config file) . - number of subdirectories: 64 (configurable in config file) . - filename are randomly generated . files will be removed when the - entire data have been sent out to OS . remove dangling files (left - on disk due to transaction interruption or traffic server crash) - at startup time +Disk buffering (buffer the entire POST data on disk before connecting to OS) + -4. +1. Disk async IO is used. AIO api call only involves certain amount of threads. The number of threads is configurable in +plugin's config file (default is 4) - 3. Default chunk size when reading from disk: 16K, configurable in - config file +2. Directories and files are generated on disk . Base directory is /FOOBAR/var/buffer_upload_tmp/ (configurable in +config file). Number of subdirectories is 64 (configurable in config file). Filename are randomly generated. Files will +be removed when the entire data have been sent out to OS . At startup time, dangling files are removed (left on disk due +to transaction interruption or traffic server crash) -5. Default buffering mode: disk aio buffering mode 3.1. to turn off disk - buffering, add a use_disk_buffer 0 line in config file +3. Default chunk size when reading from disk is 16K, configurable in config file -6. Trigger POST buffering on certain URLs 4.1. certain URLs will be - provided in a plain text file (one URL each line) 4.2. specify - filename in config file by url_list_file 4.3. max length of each - URL: 4096 (configurable in config file) 4.4. use exact match, don't - support regex for now +Trigger POST buffering on certain URLs
[11/50] git commit: Fix sockaddr length member detection
Fix sockaddr length member detection Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f4dcd6dc Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f4dcd6dc Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f4dcd6dc Branch: refs/heads/5.0.x Commit: f4dcd6dce16ee7b07a7c039c6b8f345117ab1c2f Parents: fb60e20 Author: James Peach jpe...@apache.org Authored: Wed Dec 25 13:25:38 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Wed Dec 25 13:25:38 2013 -0800 -- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f4dcd6dc/configure.ac -- diff --git a/configure.ac b/configure.ac index c16f89f..5581625 100644 --- a/configure.ac +++ b/configure.ac @@ -1653,17 +1653,17 @@ AC_CHECK_MEMBER([struct sockaddr.sa_len], [], [], [#include netinet/in.h]) AC_CHECK_MEMBER([struct sockaddr_in.sin_len], [], [], [#include netinet/in.h]) AC_CHECK_MEMBER([struct sockaddr_in6.sin6_len], [], [], [#include netinet/in.h]) -if test x${ac_cv_member_sockaddr_sa_len} = xyes; then +if test x${ac_cv_member_struct_sockaddr_sa_len} = xyes; then AC_DEFINE(HAVE_STRUCT_SOCKADDR_SA_LEN, 1, [Whether struct sockaddr_in has the sa_len member]) fi -if test x${ac_cv_member_sockaddr_in_sin_len} = xyes ; then +if test x${ac_cv_member_struct_sockaddr_in_sin_len} = xyes ; then AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN_SIN_LEN, 1, [Whether struct sockaddr_in has the sin_len member]) fi -if test x${ac_cv_member_sockaddr_in6_sin6_len} = xyes; then +if test x${ac_cv_member_struct_sockaddr_in6_sin6_len} = xyes; then AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN, 1, [Whether struct sockaddr_in6 has the sin6_len member]) fi
[50/50] git commit: Merge branch 'master' into 5.0.x
Merge branch 'master' into 5.0.x Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a44a12ab Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a44a12ab Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a44a12ab Branch: refs/heads/5.0.x Commit: a44a12ab390ccef595aec435c663136571cf78ca Parents: 93e7027 17f0102 Author: Leif Hedstrom zw...@apache.org Authored: Fri Jan 3 10:17:16 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Fri Jan 3 10:17:16 2014 -0700 -- CHANGES | 150 +-- build/xml.m4| 2 +- ci/tsqa/functions | 244 ++ ci/tsqa/test-bootstrap | 41 ++ ci/tsqa/test-log-configuration | 63 +++ cmd/traffic_cop/traffic_cop.cc | 62 +-- cmd/traffic_shell/traffic_shell.cc | 2 + configure.ac| 10 +- doc/admin/configuring-cache.en.rst | 10 +- doc/admin/faqs.en.rst | 2 +- doc/admin/reverse-proxy-http-redirects.en.rst | 2 +- doc/admin/security-options.en.rst | 4 +- doc/arch/cache/cache-arch.en.rst| 148 +++--- doc/arch/cache/ram-cache.en.rst | 88 doc/glossary.en.rst | 42 +- doc/reference/commands/traffic_server.en.rst| 2 +- doc/reference/commands/traffic_top.en.rst | 4 +- doc/reference/configuration/cache.config.en.rst | 38 +- .../configuration/congestion.config.en.rst | 2 +- .../configuration/logs_xml.config.en.rst| 16 +- .../configuration/plugin.config.en.rst | 54 ++- .../configuration/records.config.en.rst | 85 +++- doc/reference/configuration/remap.config.en.rst | 88 +++- .../configuration/ssl_multicert.config.en.rst | 2 +- .../configuration/storage.config.en.rst | 2 +- doc/reference/plugins/balancer.en.rst | 117 +++-- doc/reference/plugins/buffer_upload.en.rst | 93 ++-- doc/reference/plugins/cacheurl.en.rst | 3 +- doc/reference/plugins/combo_handler.en.rst | 5 +- doc/reference/plugins/gzip.en.rst | 3 +- doc/reference/plugins/header_filter.en.rst | 3 +- doc/reference/plugins/header_rewrite.en.rst | 174 doc/reference/plugins/hipes.en.rst | 74 ++- doc/reference/plugins/index.en.rst | 1 - doc/reference/plugins/ts_lua.en.rst | 3 +- ...viewing-statistics-using-traffic-line.en.rst | 2 +- doc/sdk/mutex-guide.en.rst | 2 +- example/protocol/Protocol.c | 12 +- iocore/aio/AIO.cc | 6 +- iocore/aio/test_AIO.cc | 8 + iocore/eventsystem/I_SocketManager.h| 3 +- iocore/net/I_Net.h | 8 - iocore/net/Net.cc | 2 +- iocore/net/P_Connection.h | 1 + iocore/net/P_SSLUtils.h | 9 + iocore/net/P_UnixPollDescriptor.h | 4 + iocore/net/SSLConfig.cc | 6 + iocore/net/SSLUtils.cc | 21 +- iocore/net/UnixConnection.cc| 10 +- iocore/net/UnixNet.cc | 7 +- iocore/net/UnixUDPNet.cc| 6 +- lib/atscppapi/src/include/atscppapi/Headers.h | 2 +- lib/records/I_RecCore.h | 8 +- lib/records/RecCore.cc | 7 +- lib/records/RecMessage.cc | 3 +- lib/ts/ink_atomic.h | 39 +- lib/ts/ink_inet.cc | 2 +- lib/ts/ink_queue_ext.cc | 5 +- mgmt/LocalManager.cc| 3 +- mgmt/Main.cc| 5 +- mgmt/RecordsConfig.cc | 12 + mgmt/api/CoreAPIRemote.cc | 2 + plugins/experimental/Makefile.am| 2 + plugins/experimental/balancer/Makefile.am | 22 + plugins/experimental/balancer/README| 93 plugins/experimental/balancer/balancer.cc | 446 --- plugins/experimental/balancer/balancer.h| 46 ++ plugins/experimental/balancer/hash.cc | 207 + plugins/experimental/balancer/hashkey.h | 254 --- plugins/experimental/balancer/resources.h | 111 - plugins/experimental/balancer/roundrobin.cc | 72 +++ plugins/experimental/hipes/Makefile.am | 22 + plugins/experimental/hipes/hipes.cc | 285 ++--
[07/50] git commit: TS-2248: update CHANGES
TS-2248: update CHANGES Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/3421c6e4 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/3421c6e4 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/3421c6e4 Branch: refs/heads/5.0.x Commit: 3421c6e42e04cffdfd9bea5a23f73ec9a8743c7c Parents: aae02ee Author: James Peach jpe...@apache.org Authored: Fri Dec 20 15:24:08 2013 -0800 Committer: James Peach jpe...@apache.org Committed: Fri Dec 20 15:24:08 2013 -0800 -- CHANGES | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3421c6e4/CHANGES -- diff --git a/CHANGES b/CHANGES index bf132c8..d5d4fc7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2448] Fix traffic_cop and traffic_manager to obey the proxy.config.local_state_dir setting. + *) [TS-2445] Fix problem with 204 responses closing POST requests *) [TS-2434] Use the FATAL error level to handle plugin errors.
[09/50] git commit: DOC: fix some syntax errors in documents
DOC: fix some syntax errors in documents Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/9da35d28 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/9da35d28 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/9da35d28 Branch: refs/heads/5.0.x Commit: 9da35d28da42ba3159011af2e1624dbb640e9996 Parents: 9410b75 Author: Masakazu Kitajo m4s...@gmail.com Authored: Sun Dec 22 22:19:27 2013 +0900 Committer: James Peach jpe...@apache.org Committed: Sun Dec 22 19:56:20 2013 -0800 -- doc/admin/faqs.en.rst| 2 +- doc/reference/commands/traffic_top.en.rst| 4 ++-- doc/reference/configuration/cache.config.en.rst | 1 + doc/reference/configuration/plugin.config.en.rst | 2 +- doc/reference/plugins/combo_handler.en.rst | 1 + doc/reference/plugins/ts_lua.en.rst | 3 ++- doc/sdk/mutex-guide.en.rst | 2 +- 7 files changed, 9 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9da35d28/doc/admin/faqs.en.rst -- diff --git a/doc/admin/faqs.en.rst b/doc/admin/faqs.en.rst index 79e608f..3236aea 100644 --- a/doc/admin/faqs.en.rst +++ b/doc/admin/faqs.en.rst @@ -29,7 +29,7 @@ FAQs How do you create a raw disk for the cache if all your disks have mounted file systems? --- -Create a large file on filesystem (with :manpage`dd(1)`) and mount it as loopback device. +Create a large file on filesystem (with :manpage:`dd(1)`) and mount it as loopback device. This is accomplished with :manpage:`losetup(8)` on Linux, :manpage:`lofiadm(1m)` on Solaris and Illumos, and :manpage:`mdconfig(8)` on FreeBSD. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9da35d28/doc/reference/commands/traffic_top.en.rst -- diff --git a/doc/reference/commands/traffic_top.en.rst b/doc/reference/commands/traffic_top.en.rst index dec0a05..3c73a1f 100644 --- a/doc/reference/commands/traffic_top.en.rst +++ b/doc/reference/commands/traffic_top.en.rst @@ -15,9 +15,9 @@ specific language governing permissions and limitations under the License. -== +=== traffic_top -== +=== .. program:: traffic_top http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9da35d28/doc/reference/configuration/cache.config.en.rst -- diff --git a/doc/reference/configuration/cache.config.en.rst b/doc/reference/configuration/cache.config.en.rst index e9a691e..e8c875a 100644 --- a/doc/reference/configuration/cache.config.en.rst +++ b/doc/reference/configuration/cache.config.en.rst @@ -128,6 +128,7 @@ The following list shows possible actions and their allowed values. this content to be stored locally on every cluster node. .. _cache-responses-to-cookies: + ``cache-responses-to-cookies`` Change the style of caching with regard to cookies. This effectively overrides the configuration parameter http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9da35d28/doc/reference/configuration/plugin.config.en.rst -- diff --git a/doc/reference/configuration/plugin.config.en.rst b/doc/reference/configuration/plugin.config.en.rst index f846a2e..ca069b5 100644 --- a/doc/reference/configuration/plugin.config.en.rst +++ b/doc/reference/configuration/plugin.config.en.rst @@ -54,7 +54,7 @@ Server configuration can be changed. If a plugin requires the current value, it must obtain that using the management API. Examples -=== + :: http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9da35d28/doc/reference/plugins/combo_handler.en.rst -- diff --git a/doc/reference/plugins/combo_handler.en.rst b/doc/reference/plugins/combo_handler.en.rst index a1a70be..eb79002 100644 --- a/doc/reference/plugins/combo_handler.en.rst +++ b/doc/reference/plugins/combo_handler.en.rst @@ -69,6 +69,7 @@ file paths can be extracted and specified separately using a 'p' query parameter. Successive file path parameters are appended to this prefix to create complete file paths. The prefix will remain active until changed or cleared (set to an empty string). For example, the query :: + /file1p=/path1/file2file3p=/file4p=/dir:path2/file5file6 results in these file paths being reconstructed:: http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9da35d28/doc/reference/plugins/ts_lua.en.rst
[34/50] git commit: Added Ts-2457.
Added Ts-2457. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/3be2c67b Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/3be2c67b Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/3be2c67b Branch: refs/heads/5.0.x Commit: 3be2c67b87f12fc84ce2f3dfe0943a0497daa066 Parents: 4798216 Author: Leif Hedstrom zw...@apache.org Authored: Tue Dec 31 13:45:12 2013 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Tue Dec 31 13:45:12 2013 -0700 -- CHANGES | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3be2c67b/CHANGES -- diff --git a/CHANGES b/CHANGES index a799472..603ba4b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,11 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2457] Protocol.c: change usage of atoi to strtol. + Author: Radim Kolar h...@sendmail.cz + *) [TS-2459] Fix wrong name for a couple of librecord APIs. -Author: Yu Qing happy_fish...@yahoo.com.cn. +Author: Yu Qing happy_fish...@yahoo.com.cn *) [TS-2463] Crash regression around slow-log feature, when logging an event. This fixes commit c290ce0df2a. @@ -10,7 +13,7 @@ Changes with Apache Traffic Server 4.2.0 *) [TS-32] Fix ICP. Author: Gota Adachi a...@iij.ad.jp *) [TS-2248] Segmentation fault in HttpTunnel with flow control. - Author: bettydramit b13621367...@gmail.com. + Author: bettydramit b13621367...@gmail.com *) [TS-2454] Fix undefined reference to `__sync_fetch_and_sub_8' on ARM 32bit system.
[17/50] git commit: TS-2450 make the T61String type not trigger the assertion failure if build with --enable-debug.
TS-2450 make the T61String type not trigger the assertion failure if build with --enable-debug. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6f810cd3 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6f810cd3 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6f810cd3 Branch: refs/heads/5.0.x Commit: 6f810cd3c90ab6d031a13b259c8ab7efe558073f Parents: 6413af5 Author: weijin taorui...@taobao.com Authored: Fri Dec 27 11:35:51 2013 +0800 Committer: weijin taorui...@taobao.com Committed: Fri Dec 27 11:43:37 2013 +0800 -- CHANGES| 2 ++ iocore/net/SSLUtils.cc | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6f810cd3/CHANGES -- diff --git a/CHANGES b/CHANGES index 2d3cb33..c17904a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2450] Fix assertion failure for T61String type. + *) [TS-2117] make hipes plugin build *) [TS-2452] Can't access a deleted object. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6f810cd3/iocore/net/SSLUtils.cc -- diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc index 686194b..5ddbc52 100644 --- a/iocore/net/SSLUtils.cc +++ b/iocore/net/SSLUtils.cc @@ -600,7 +600,8 @@ asn1_strdup(ASN1_STRING * s) // Make sure we have an 8-bit encoding. ink_assert(ASN1_STRING_type(s) == V_ASN1_IA5STRING || ASN1_STRING_type(s) == V_ASN1_UTF8STRING || -ASN1_STRING_type(s) == V_ASN1_PRINTABLESTRING); +ASN1_STRING_type(s) == V_ASN1_PRINTABLESTRING || +ASN1_STRING_type(s) == V_ASN1_T61STRING); return ats_strndup((const char *)ASN1_STRING_data(s), ASN1_STRING_length(s)); }
git commit: TS-1919 Backing this change out, since it's been -1'd.
Updated Branches: refs/heads/5.0.x a44a12ab3 - db67432fc TS-1919 Backing this change out, since it's been -1'd. git revert did not handle this nicely, since the trees have diverged so much. Instead, I simply made 5.0.x identical to current master. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/db67432f Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/db67432f Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/db67432f Branch: refs/heads/5.0.x Commit: db67432fce4bc324856c17038269f327a9128efa Parents: a44a12a Author: Leif Hedstrom zw...@apache.org Authored: Fri Jan 3 10:34:36 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Fri Jan 3 10:34:36 2014 -0700 -- CHANGES | 7 +- iocore/cache/Cache.cc | 8 +- iocore/cache/CacheRead.cc | 11 ++- iocore/cache/I_Cache.h | 15 ++-- iocore/cache/P_CacheInternal.h | 46 +++- iocore/cache/P_CacheTest.h | 1 + iocore/cluster/ClusterCache.cc | 26 --- iocore/cluster/P_ClusterCacheInternal.h | 15 ++-- iocore/cluster/P_ClusterInline.h| 15 +++- proxy/ICP.cc| 3 +- proxy/Prefetch.cc | 19 +++-- proxy/Prefetch.h| 2 +- proxy/http/HttpCacheSM.cc | 8 +- proxy/http/HttpCacheSM.h| 9 ++- proxy/http/HttpSM.cc| 16 +++- proxy/http/HttpTransact.h | 2 + proxy/http/HttpTransactCache.cc | 107 +-- proxy/http/HttpTransactCache.h | 61 +-- 18 files changed, 278 insertions(+), 93 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/db67432f/CHANGES -- diff --git a/CHANGES b/CHANGES index 75890e1..2a0771c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,5 @@ -*- coding: utf-8 -*- -Changes with Apache Traffic Server 5.0.0 - - *) [TS-1919] Eliminate CacheLookupHttpConfig. This breaks cluster - compatibility, so all cluster nodes should be upgraded simultaneously. +Changes with Apache Traffic Server 4.2.0 *) [TS-2467] traffic_shell doesn't work with tcl 8.6. Author: Ben Aitchison b...@meh.net.nz @@ -63,8 +60,6 @@ Changes with Apache Traffic Server 5.0.0 *) [TS-2432] Fix a race in aio_err_callblk. -Changes with Apache Traffic Server 4.2.0 - *) [TS-2251] Simplify LogBuffer reference counting. *) [TS-2190] Remove cache.log from the cachurl plugin. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/db67432f/iocore/cache/Cache.cc -- diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc index e3cf044..711b7c9 100644 --- a/iocore/cache/Cache.cc +++ b/iocore/cache/Cache.cc @@ -3413,15 +3413,15 @@ ink_cache_init(ModuleVersion v) // Action * CacheProcessor::open_read(Continuation *cont, URL *url, bool cluster_cache_local, CacheHTTPHdr *request, - void *context, time_t pin_in_cache, CacheFragType type) + CacheLookupHttpConfig *params, time_t pin_in_cache, CacheFragType type) { #ifdef CLUSTER_CACHE if (cache_clustering_enabled 0 !cluster_cache_local) { -return open_read_internal(CACHE_OPEN_READ_LONG, cont, (MIOBuffer *) 0, url, request, context, - (CacheKey *) 0, pin_in_cache, type, (char *) 0, 0); +return open_read_internal(CACHE_OPEN_READ_LONG, cont, (MIOBuffer *) 0, + url, request, params, (CacheKey *) 0, pin_in_cache, type, (char *) 0, 0); } #endif - return caches[type]-open_read(cont, url, request, context, type); + return caches[type]-open_read(cont, url, request, params, type); } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/db67432f/iocore/cache/CacheRead.cc -- diff --git a/iocore/cache/CacheRead.cc b/iocore/cache/CacheRead.cc index e155304..5e8c6ac 100644 --- a/iocore/cache/CacheRead.cc +++ b/iocore/cache/CacheRead.cc @@ -90,7 +90,7 @@ Lcallreturn: #ifdef HTTP_CACHE Action * Cache::open_read(Continuation * cont, CacheKey * key, CacheHTTPHdr * request, - void * context, CacheFragType type, char *hostname, int host_len) + CacheLookupHttpConfig * params, CacheFragType type, char *hostname, int host_len) { if (!CacheProcessor::IsCacheReady(type)) { @@ -116,7 +116,7 @@ Cache::open_read(Continuation *
[1/2] git commit: TS-2474 Change proxy.config.net.poll_timeout to 10ms consistently
Updated Branches: refs/heads/master a2fab004b - 0373ca358 TS-2474 Change proxy.config.net.poll_timeout to 10ms consistently Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/110bcd1b Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/110bcd1b Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/110bcd1b Branch: refs/heads/master Commit: 110bcd1b8d7905d1d20c7046bce0aced05cad32a Parents: a2fab00 Author: Leif Hedstrom zw...@apache.org Authored: Fri Jan 3 10:48:55 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Fri Jan 3 10:48:55 2014 -0700 -- .../configuration/records.config.en.rst | 23 +--- mgmt/RecordsConfig.cc | 8 +-- proxy/Main.cc | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/110bcd1b/doc/reference/configuration/records.config.en.rst -- diff --git a/doc/reference/configuration/records.config.en.rst b/doc/reference/configuration/records.config.en.rst index 4c46d04..cd81990 100644 --- a/doc/reference/configuration/records.config.en.rst +++ b/doc/reference/configuration/records.config.en.rst @@ -2229,22 +2229,29 @@ Sockets Same as the command line option ``--poll_timeout``, or ``-t``, which specifies the timeout used for the polling mechanism used. This timeout is - always in milliseconds (ms). On Linux, this is the timeout to - ``epoll_wait()``. The default value is ``10`` on all platforms except - Solaris, where it is ``30``. + always in milliseconds (ms). This is the timeout to ``epoll_wait()`` on + Linux platforms, and to ``kevent()`` on BSD type OSs. The default value is + ``10`` on all platforms. Changing this configuration can reduce CPU usage on an idle system, since periodic tasks gets processed at these intervals. On busy servers, this - overhead is diminished, since polled events triggers more - frequently. However, increasing the setting can also introduce additional - latency for certain operations, and timed events. It's recommended not to - touch this setting unless your CPU usage is unacceptable at idle - workload. Some alternatives to this could be:: + overhead is diminished, since polled events triggers morefrequently. + However, increasing the setting can also introduce additional latency for + certain operations, and timed events. It's recommended not to touch this + setting unless your CPU usage is unacceptable at idle workload. Some + alternatives to this could be:: Reduce the number of worker threads (net-threads) Reduce the number of disk (AIO) threads Make sure accept threads are enabled + The relevant configurations for this are:: + + CONFIG proxy.config.exec_thread.autoconfig INT 0 + CONFIG proxy.config.exec_thread.limit INT 2 + CONFIG proxy.config.accept_threads INT 1 + CONFIG proxy.config.cache.threads_per_disk INT 8 + Undocumented http://git-wip-us.apache.org/repos/asf/trafficserver/blob/110bcd1b/mgmt/RecordsConfig.cc -- diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index 72a905f..22161cc 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -796,13 +796,7 @@ RecordElement RecordsConfig[] = { , {RECT_CONFIG, proxy.config.net.sock_mss_in, RECD_INT, 0, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} , - {RECT_CONFIG, proxy.config.net.poll_timeout, RECD_INT, -#if defined(solaris) - 30, -#else - 10, -#endif - RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} + {RECT_CONFIG, proxy.config.net.poll_timeout, RECD_INT, 10, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} , //## http://git-wip-us.apache.org/repos/asf/trafficserver/blob/110bcd1b/proxy/Main.cc -- diff --git a/proxy/Main.cc b/proxy/Main.cc index 1947621..d715319 100644 --- a/proxy/Main.cc +++ b/proxy/Main.cc @@ -1462,7 +1462,7 @@ main(int /* argc ATS_UNUSED */, char **argv) // This shouldn't happen, but lets make sure we run somewhat reasonable. if (net_config_poll_timeout 0) { -net_config_poll_timeout = 30; // This is the solaris default value. +net_config_poll_timeout = 10; // Default value for all platform. } ink_event_system_init(makeModuleVersion(1, 0, PRIVATE_MODULE_HEADER));
[2/2] git commit: Added TS-2474
Added TS-2474 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/0373ca35 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/0373ca35 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/0373ca35 Branch: refs/heads/master Commit: 0373ca3587a53667b64f5d0ec23c057f5963dded Parents: 110bcd1 Author: Leif Hedstrom zw...@apache.org Authored: Fri Jan 3 10:49:34 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Fri Jan 3 10:49:34 2014 -0700 -- CHANGES | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0373ca35/CHANGES -- diff --git a/CHANGES b/CHANGES index 44d1fcb..b00bbf4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2474] Change proxy.config.net.poll_timeout to 10ms consistently. + *) [TS-2473] Fix C++ API includes for FreeBSD. Author: Radim Kolar h...@sendmail.cz
svn commit: r4037 - in /release/trafficserver: trafficserver-4.0.2.tar.bz2 trafficserver-4.0.2.tar.bz2.asc trafficserver-4.0.2.tar.bz2.md5 trafficserver-4.0.2.tar.bz2.sha1
Author: zwoop Date: Fri Jan 3 21:11:40 2014 New Revision: 4037 Log: Removed v4.0.2 release Removed: release/trafficserver/trafficserver-4.0.2.tar.bz2 release/trafficserver/trafficserver-4.0.2.tar.bz2.asc release/trafficserver/trafficserver-4.0.2.tar.bz2.md5 release/trafficserver/trafficserver-4.0.2.tar.bz2.sha1
svn commit: r4040 - /release/trafficserver/patches/
Author: zwoop Date: Sat Jan 4 02:34:32 2014 New Revision: 4040 Log: Remove the patches/ directory, hopefully we will not use it again, just releases Removed: release/trafficserver/patches/
git commit: TS-2483 Add a new metric, proxy.node.restarts.proxy.cache_ready_time, tracking absolute time when the cache started (finished initialization). Until cache is available, or no cache configu
Updated Branches: refs/heads/master 7549b2945 - 5df2cac38 TS-2483 Add a new metric, proxy.node.restarts.proxy.cache_ready_time, tracking absolute time when the cache started (finished initialization). Until cache is available, or no cache configured, this metric stays at a value of 0. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/5df2cac3 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/5df2cac3 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/5df2cac3 Branch: refs/heads/master Commit: 5df2cac3846d7d2f9ae255b051f748d25773a8bc Parents: 7549b29 Author: Leif Hedstrom zw...@apache.org Authored: Tue Jan 7 16:37:10 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Wed Jan 8 11:20:44 2014 -0700 -- CHANGES | 5 + mgmt/RecordsConfig.cc | 2 ++ proxy/Main.cc | 4 3 files changed, 11 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5df2cac3/CHANGES -- diff --git a/CHANGES b/CHANGES index af6a08a..d5d9a9e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,11 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2483] Add a new metric, proxy.node.restarts.proxy.cache_ready_time, + tracking absolute time when the cache started (finished + initialization). Until cache is available, or no cache configured, this + metric stays at a value of 0. + *) [TS-2476] Fix size_t format string. Author: Radim Kolar h...@sendmail.cz http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5df2cac3/mgmt/RecordsConfig.cc -- diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index 22161cc..f11f6b1 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -1368,6 +1368,8 @@ RecordElement RecordsConfig[] = { , {RECT_NODE, proxy.node.restarts.proxy.start_time, RECD_INT, 0, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} , + {RECT_NODE, proxy.node.restarts.proxy.cache_ready_time, RECD_INT, 0, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} + , {RECT_NODE, proxy.node.restarts.proxy.stop_time, RECD_INT, 0, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} , {RECT_NODE, proxy.node.restarts.proxy.restart_count, RECD_INT, 0, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5df2cac3/proxy/Main.cc -- diff --git a/proxy/Main.cc b/proxy/Main.cc index d715319..39bba18 100644 --- a/proxy/Main.cc +++ b/proxy/Main.cc @@ -398,6 +398,10 @@ CB_After_Cache_Init() Debug(http_listen, Delayed listen enable, cache initialization finished); start_HttpProxyServer(); } + + time_t cache_ready_at = time(NULL); + RecSetRecordInt(proxy.node.restarts.proxy.cache_ready_time, cache_ready_at); + // Alert the plugins the cache is initialized. hook = lifecycle_hooks-get(TS_LIFECYCLE_CACHE_READY_HOOK); while (hook) {
[2/2] git commit: Added TS-2486.
Added TS-2486. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8812c222 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8812c222 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8812c222 Branch: refs/heads/master Commit: 8812c2225e7b1990d7e1c4b84386054e84307a80 Parents: 8f70b93 Author: Leif Hedstrom zw...@apache.org Authored: Wed Jan 8 14:11:46 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Wed Jan 8 14:11:46 2014 -0700 -- CHANGES | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8812c222/CHANGES -- diff --git a/CHANGES b/CHANGES index d5d9a9e..a8b1c13 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2486] Eliminate SIMPLE_MEMCPY_INIT define. + *) [TS-2483] Add a new metric, proxy.node.restarts.proxy.cache_ready_time, tracking absolute time when the cache started (finished initialization). Until cache is available, or no cache configured, this
[1/2] git commit: TS-2486 Eliminate SIMPLE_MEMCPY_INIT define
Updated Branches: refs/heads/master 5df2cac38 - 8812c2225 TS-2486 Eliminate SIMPLE_MEMCPY_INIT define Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8f70b93e Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8f70b93e Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8f70b93e Branch: refs/heads/master Commit: 8f70b93e286cf157592358175f270e74bfcd8289 Parents: 5df2cac Author: Leif Hedstrom zw...@apache.org Authored: Wed Jan 8 14:11:04 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Wed Jan 8 14:11:04 2014 -0700 -- proxy/http/HttpSM.cc | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8f70b93e/proxy/http/HttpSM.cc -- diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 654c2d8..eff3260 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -144,24 +144,19 @@ HttpSM::_instantiate_func(HttpSM * prototype, HttpSM * new_instance) int pre_history_len = (char *) ((prototype-history)) - (char *) prototype; int post_history_len = total_len - history_len - pre_history_len; int post_offset = pre_history_len + history_len; - -#ifndef SIMPLE_MEMCPY_INIT int j; memset(((char *) new_instance), 0, pre_history_len); memset(((char *) new_instance) + post_offset, 0, post_history_len); + uint32_t *pd = (uint32_t *) new_instance; + for (j = 0; j scat_count; j++) { pd[to[j]] = val[j]; } ink_assert((memcmp((char *) new_instance, (char *) prototype, pre_history_len) == 0) - (memcmp(((char *) new_instance) + post_offset, ((char *) prototype) + post_offset, post_history_len) == 0)); -#else - // memcpy(new_instance, prototype, total_len); - memcpy(new_instance, prototype, pre_history_len); - memcpy(((char *) new_instance) + post_offset, ((char *) prototype) + post_offset, post_history_len); -#endif + (memcmp(((char *) new_instance) + post_offset, ((char *) prototype) + post_offset, post_history_len) == 0)); } SparseClassAllocatorHttpSM httpSMAllocator(httpSMAllocator, 128, 16, HttpSM::_instantiate_func);
[2/2] git commit: Fix typo
Fix typo Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/941c358c Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/941c358c Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/941c358c Branch: refs/heads/master Commit: 941c358c8791fae7a030c0ff26b52f26f4db456c Parents: c89d146 Author: Leif Hedstrom zw...@apache.org Authored: Thu Jan 9 21:36:17 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Thu Jan 9 21:36:21 2014 -0700 -- mgmt/RecordsConfig.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/941c358c/mgmt/RecordsConfig.cc -- diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index f11f6b1..63738ff 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -888,7 +888,7 @@ RecordElement RecordsConfig[] = { , {RECT_CONFIG, proxy.config.cache.ram_cache.algorithm, RECD_INT, 0, RECU_RESTART_TS, RR_NULL, RECC_INT, [0-1], RECA_NULL} , - {RECT_CONFIG, proxy.config.cache.ram_cache.compress, RECD_INT, 0, RECU_RESTART_TS, RR_NULL, RECC_INT, [0-1], RECA_NULL} + {RECT_CONFIG, proxy.config.cache.ram_cache.compress, RECD_INT, 0, RECU_RESTART_TS, RR_NULL, RECC_INT, [0-3], RECA_NULL} , {RECT_CONFIG, proxy.config.cache.ram_cache.compress_percent, RECD_INT, 90, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL} ,
[1/2] git commit: TS-2483 Add to docs.
Updated Branches: refs/heads/master 4b43ca7f9 - 941c358c8 TS-2483 Add to docs. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/c89d1462 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c89d1462 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c89d1462 Branch: refs/heads/master Commit: c89d14621e2fd7ef1350990960f5a33aa3ff06d1 Parents: 4b43ca7 Author: Leif Hedstrom zw...@apache.org Authored: Thu Jan 9 21:35:42 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Thu Jan 9 21:36:20 2014 -0700 -- doc/reference/commands/traffic_line.en.rst | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c89d1462/doc/reference/commands/traffic_line.en.rst -- diff --git a/doc/reference/commands/traffic_line.en.rst b/doc/reference/commands/traffic_line.en.rst index 08683fb..2e7938c 100644 --- a/doc/reference/commands/traffic_line.en.rst +++ b/doc/reference/commands/traffic_line.en.rst @@ -129,6 +129,7 @@ The :option:`traffic_line -r` option accepts the following variable names:: proxy.node.restarts.proxy.start_time proxy.node.restarts.proxy.stop_time proxy.node.restarts.proxy.restart_count +proxy.node.restarts.proxy.cache_ready_time proxy.node.version.manager.short proxy.node.version.manager.long proxy.node.version.manager.build_number
git commit: TS-610 Add the list of overridable configurations to docs.
Updated Branches: refs/heads/master 941c358c8 - f5f2ce7f8 TS-610 Add the list of overridable configurations to docs. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f5f2ce7f Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f5f2ce7f Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f5f2ce7f Branch: refs/heads/master Commit: f5f2ce7f8c57bb9328195d67cc5ecbeba15785d6 Parents: 941c358 Author: Leif Hedstrom zw...@apache.org Authored: Fri Jan 10 08:35:01 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Fri Jan 10 08:35:01 2014 -0700 -- .../api/TSHttpOverridableConfig.en.rst | 84 1 file changed, 84 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f5f2ce7f/doc/reference/api/TSHttpOverridableConfig.en.rst -- diff --git a/doc/reference/api/TSHttpOverridableConfig.en.rst b/doc/reference/api/TSHttpOverridableConfig.en.rst index 09c1774..09f7da8 100644 --- a/doc/reference/api/TSHttpOverridableConfig.en.rst +++ b/doc/reference/api/TSHttpOverridableConfig.en.rst @@ -51,6 +51,90 @@ The values are identified by the enumeration :type:`TSOverridableConfigKey`. Str first passing them to :func:`TSHttpTxnConfigFind` which, if the string matches an overridable value, return the key and data type. +Configurations +== + +The following configurations (from ``records.config``) are overridable: :: + +proxy.config.url_remap.pristine_host_hdr +proxy.config.http.chunking_enabled +proxy.config.http.negative_caching_enabled +proxy.config.http.negative_caching_lifetime +proxy.config.http.cache.when_to_revalidate +proxy.config.http.keep_alive_enabled_in +proxy.config.http.keep_alive_enabled_out +proxy.config.http.keep_alive_post_out +proxy.config.http.share_server_sessions +proxy.config.net.sock_recv_buffer_size_out +proxy.config.net.sock_send_buffer_size_out +proxy.config.net.sock_option_flag_out +proxy.config.http.forward.proxy_auth_to_parent +proxy.config.http.anonymize_remove_from +proxy.config.http.anonymize_remove_referer +proxy.config.http.anonymize_remove_user_agent +proxy.config.http.anonymize_remove_cookie +proxy.config.http.anonymize_remove_client_ip +proxy.config.http.anonymize_insert_client_ip +proxy.config.http.response_server_enabled +proxy.config.http.insert_squid_x_forwarded_for +proxy.config.http.server_tcp_init_cwnd +proxy.config.http.send_http11_requests +proxy.config.http.cache.http +proxy.config.http.cache.cluster_cache_local +proxy.config.http.cache.ignore_client_no_cache +proxy.config.http.cache.ignore_client_cc_max_age +proxy.config.http.cache.ims_on_client_no_cache +proxy.config.http.cache.ignore_server_no_cache +proxy.config.http.cache.cache_responses_to_cookies +proxy.config.http.cache.ignore_authentication +proxy.config.http.cache.cache_urls_that_look_dynamic +proxy.config.http.cache.required_headers +proxy.config.http.insert_request_via_str +proxy.config.http.insert_response_via_str +proxy.config.http.cache.heuristic_min_lifetime +proxy.config.http.cache.heuristic_max_lifetime +proxy.config.http.cache.guaranteed_min_lifetime +proxy.config.http.cache.guaranteed_max_lifetime +proxy.config.http.cache.max_stale_age +proxy.config.http.keep_alive_no_activity_timeout_in +proxy.config.http.keep_alive_no_activity_timeout_out +proxy.config.http.transaction_no_activity_timeout_in +proxy.config.http.transaction_no_activity_timeout_out +proxy.config.http.transaction_active_timeout_out +proxy.config.http.origin_max_connections +proxy.config.http.connect_attempts_max_retries +proxy.config.http.connect_attempts_max_retries_dead_server +proxy.config.http.connect_attempts_rr_retries +proxy.config.http.connect_attempts_timeout +proxy.config.http.post_connect_attempts_timeout +proxy.config.http.down_server.cache_time +proxy.config.http.down_server.abort_threshold +proxy.config.http.cache.fuzz.time +proxy.config.http.cache.fuzz.min_time +proxy.config.http.doc_in_cache_skip_dns +proxy.config.http.background_fill_active_timeout +proxy.config.http.response_server_str +proxy.config.http.cache.heuristic_lm_factor +proxy.config.http.cache.fuzz.probability +proxy.config.http.background_fill_completed_threshold +proxy.config.net.sock_packet_mark_out +proxy.config.net.sock_packet_tos_out +proxy.config.http.insert_age_in_response +proxy.config.http.chunking.size +proxy.config.http.flow_control.enabled +proxy.config.http.flow_control.low_water +
git commit: TS-610 Link to the API docs for details on configurations etc.
Updated Branches: refs/heads/master f5f2ce7f8 - a151cfc90 TS-610 Link to the API docs for details on configurations etc. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a151cfc9 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a151cfc9 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a151cfc9 Branch: refs/heads/master Commit: a151cfc90b9a53c8d1e1056968884f4a6996074a Parents: f5f2ce7 Author: Leif Hedstrom zw...@apache.org Authored: Fri Jan 10 09:23:34 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Fri Jan 10 09:23:34 2014 -0700 -- doc/reference/plugins/conf_remap.en.rst | 84 +--- 1 file changed, 2 insertions(+), 82 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a151cfc9/doc/reference/plugins/conf_remap.en.rst -- diff --git a/doc/reference/plugins/conf_remap.en.rst b/doc/reference/plugins/conf_remap.en.rst index f8258a6..0d7bc7c 100644 --- a/doc/reference/plugins/conf_remap.en.rst +++ b/doc/reference/plugins/conf_remap.en.rst @@ -33,85 +33,5 @@ where `cdn.conf` would look like :file:`records.config`. For example:: CONFIG proxy.config.url_remap.pristine_host_hdr INT 1 Doing this, you will override your global default configuration on -a per mapping rule. For now, those options may be overridden through -the `conf_remap` plugin: - -| -| -| proxy.config.url_remap.pristine_host_hdr -| proxy.config.http.chunking_enabled -| proxy.config.http.negative_caching_enabled -| proxy.config.http.negative_caching_lifetime -| proxy.config.http.cache.when_to_revalidate -| proxy.config.http.keep_alive_enabled_in -| proxy.config.http.keep_alive_enabled_out -| proxy.config.http.keep_alive_post_out -| proxy.config.http.share_server_sessions -| proxy.config.net.sock_recv_buffer_size_out -| proxy.config.net.sock_send_buffer_size_out -| proxy.config.net.sock_option_flag_out -| proxy.config.http.forward.proxy_auth_to_parent -| proxy.config.http.anonymize_remove_from -| proxy.config.http.anonymize_remove_referer -| proxy.config.http.anonymize_remove_user_agent -| proxy.config.http.anonymize_remove_cookie -| proxy.config.http.anonymize_remove_client_ip -| proxy.config.http.anonymize_insert_client_ip -| proxy.config.http.response_server_enabled -| proxy.config.http.insert_squid_x_forwarded_for -| proxy.config.http.server_tcp_init_cwnd -| proxy.config.http.send_http11_requests -| proxy.config.http.cache.http -| proxy.config.http.cache.cluster_cache_local -| proxy.config.http.cache.ignore_client_no_cache -| proxy.config.http.cache.ignore_client_cc_max_age -| proxy.config.http.cache.ims_on_client_no_cache -| proxy.config.http.cache.ignore_server_no_cache -| proxy.config.http.cache.cache_responses_to_cookies -| proxy.config.http.cache.ignore_authentication -| proxy.config.http.cache.cache_urls_that_look_dynamic -| proxy.config.http.cache.required_headers -| proxy.config.http.insert_request_via_str -| proxy.config.http.insert_response_via_str -| proxy.config.http.cache.heuristic_min_lifetime -| proxy.config.http.cache.heuristic_max_lifetime -| proxy.config.http.cache.guaranteed_min_lifetime -| proxy.config.http.cache.guaranteed_max_lifetime -| proxy.config.http.cache.max_stale_age -| proxy.config.http.keep_alive_no_activity_timeout_in -| proxy.config.http.keep_alive_no_activity_timeout_out -| proxy.config.http.transaction_no_activity_timeout_in -| proxy.config.http.transaction_no_activity_timeout_out -| proxy.config.http.transaction_active_timeout_out -| proxy.config.http.origin_max_connections -| proxy.config.http.connect_attempts_max_retries -| proxy.config.http.connect_attempts_max_retries_dead_server -| proxy.config.http.connect_attempts_rr_retries -| proxy.config.http.connect_attempts_timeout -| proxy.config.http.post_connect_attempts_timeout -| proxy.config.http.down_server.cache_time -| proxy.config.http.down_server.abort_threshold -| proxy.config.http.cache.fuzz.time -| proxy.config.http.cache.fuzz.min_time -| proxy.config.http.doc_in_cache_skip_dns -| proxy.config.http.background_fill_active_timeout -| proxy.config.http.response_server_str -| proxy.config.http.cache.heuristic_lm_factor -| proxy.config.http.cache.fuzz.probability -| proxy.config.http.background_fill_completed_threshold -| proxy.config.net.sock_packet_mark_out -| proxy.config.net.sock_packet_tos_out -| proxy.config.http.insert_age_in_response -| proxy.config.http.chunking.size -| proxy.config.http.flow_control.enabled -| proxy.config.http.flow_control.low_water -| proxy.config.http.flow_control.high_water -| proxy.config.http.cache.range.lookup -| proxy.config.http.normalize_ae_gzip -| proxy.config.http.default_buffer_size -|
[2/2] git commit: Added TS-2336 to CHANGES.
Added TS-2336 to CHANGES. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8ab00ffa Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8ab00ffa Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8ab00ffa Branch: refs/heads/master Commit: 8ab00ffa2822dd8e48873a25c249522bceb2c44d Parents: 4da6c48 Author: Leif Hedstrom zw...@apache.org Authored: Fri Jan 10 14:49:01 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Fri Jan 10 14:49:01 2014 -0700 -- CHANGES | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8ab00ffa/CHANGES -- diff --git a/CHANGES b/CHANGES index 93e0af7..85a5ce6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2336] First attempt at moving the Prefetch APIs into some usable + state. There's still work to be done here, but separate bugs for that. + *) [TS-2487] Export PUSH HTTP method constants to the TS API. *) [TS-2486] Eliminate SIMPLE_MEMCPY_INIT define.
[1/2] git commit: TS-2336 First attempt at moving the Prefetch APIs into some usable state
Updated Branches: refs/heads/master a151cfc90 - 8ab00ffa2 TS-2336 First attempt at moving the Prefetch APIs into some usable state Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4da6c483 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4da6c483 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4da6c483 Branch: refs/heads/master Commit: 4da6c48344c554669e8a0ccefe2efe42fe88a321 Parents: a151cfc Author: Leif Hedstrom zw...@apache.org Authored: Fri Jan 3 16:09:16 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Fri Jan 10 14:47:47 2014 -0700 -- example/prefetch/prefetch-plugin-eg1.c | 50 +- example/prefetch/test-hns-plugin.c | 29 +++--- proxy/Prefetch.cc | 45 - proxy/Prefetch.h | 21 ++--- proxy/api/ts/InkAPIHughes.h| 138 proxy/api/ts/Makefile.am | 1 - proxy/api/ts/experimental.h| 136 +-- 7 files changed, 194 insertions(+), 226 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4da6c483/example/prefetch/prefetch-plugin-eg1.c -- diff --git a/example/prefetch/prefetch-plugin-eg1.c b/example/prefetch/prefetch-plugin-eg1.c index 47d8740..72013dc 100644 --- a/example/prefetch/prefetch-plugin-eg1.c +++ b/example/prefetch/prefetch-plugin-eg1.c @@ -32,31 +32,8 @@ #include ts/ts.h #include ts/experimental.h -/* We will register the following two hooks */ - -int my_preparse_hook(int hook, TSPrefetchInfo * info); -int my_embedded_url_hook(int hook, TSPrefetchInfo * info); - -void -TSPluginInit(int argc, const char *argv[]) -{ - TSPluginRegistrationInfo info; - - info.plugin_name = prefetch_plugin_eg1; - info.vendor_name = MyCompany; - info.support_email = ts-api-supp...@mycompany.com; - - if (TSPluginRegister(TS_SDK_VERSION_3_0, info) != TS_SUCCESS) { -TSError(Plugin registration failed.\n); - } - - /* register our hooks */ - TSPrefetchHookSet(TS_PREFETCH_PRE_PARSE_HOOK, my_preparse_hook); - TSPrefetchHookSet(TS_PREFETCH_EMBEDDED_URL_HOOK, my_embedded_url_hook); -} - -int -my_preparse_hook(int hook, TSPrefetchInfo * info) +TSPrefetchReturnCode +my_preparse_hook(TSPrefetchHookID hook, TSPrefetchInfo * info) { unsigned char *ip = (unsigned char *) info-client_ip; @@ -67,8 +44,8 @@ my_preparse_hook(int hook, TSPrefetchInfo * info) return TS_PREFETCH_CONTINUE; } -int -my_embedded_url_hook(int hook, TSPrefetchInfo * info) +TSPrefetchReturnCode +my_embedded_url_hook(TSPrefetchHookID hook, TSPrefetchInfo * info) { unsigned char *ip = (unsigned char *) info-client_ip; @@ -88,3 +65,22 @@ my_embedded_url_hook(int hook, TSPrefetchInfo * info) return TS_PREFETCH_CONTINUE; } + + +void +TSPluginInit(int argc, const char *argv[]) +{ + TSPluginRegistrationInfo info; + + info.plugin_name = prefetch_plugin_eg1; + info.vendor_name = MyCompany; + info.support_email = ts-api-supp...@mycompany.com; + + if (TSPluginRegister(TS_SDK_VERSION_3_0, info) != TS_SUCCESS) { +TSError(Plugin registration failed.\n); + } + + /* register our hooks */ + TSPrefetchHookSet(TS_PREFETCH_PRE_PARSE_HOOK, my_preparse_hook); + TSPrefetchHookSet(TS_PREFETCH_EMBEDDED_URL_HOOK, my_embedded_url_hook); +} http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4da6c483/example/prefetch/test-hns-plugin.c -- diff --git a/example/prefetch/test-hns-plugin.c b/example/prefetch/test-hns-plugin.c index fa5b01e..e1da4c9 100644 --- a/example/prefetch/test-hns-plugin.c +++ b/example/prefetch/test-hns-plugin.c @@ -58,6 +58,7 @@ correctness of the parse/prefetch module. It has the following options: #include stdio.h #include string.h #include fcntl.h +#include getopt.h #include sys/types.h #include sys/stat.h #include ts/ts.h @@ -75,30 +76,25 @@ static int embedded_object = 0; static TSMutex file_write_mutex; -int pre_parse_hook(int hook, TSPrefetchInfo * info); -int embedded_url_hook(int hook, TSPrefetchInfo * info); -int embedded_object_hook(int hook, TSPrefetchInfo * info); - -int -embedded_object_hook(int hook, TSPrefetchInfo * info) +TSPrefetchReturnCode +embedded_object_hook(TSPrefetchHookID hook, TSPrefetchInfo * info) { - int total_avail; - TSIOBufferBlock block; const char *block_start; - int block_avail; + int64_t block_avail, total_avail; TSMutexLock(file_write_mutex); printf((%s) TS_PREFETCH_EMBEDDED_OBJECT_HOOK (%d)\n, TAG, hook); - printf((%s) \tobject size for: %s is %d\n, - TAG, info-embedded_url, TSIOBufferReaderAvail(info-object_buf_reader)); + printf((%s) \tobject
git commit: Doc: Fix numbers of enumerated lists
Updated Branches: refs/heads/master 586469fc6 - ebb01e5d0 Doc: Fix numbers of enumerated lists Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/ebb01e5d Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/ebb01e5d Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/ebb01e5d Branch: refs/heads/master Commit: ebb01e5d0a1826ddef8dbf6b749c2d1b7af1207b Parents: 586469f Author: Masaori Koshiba masaori...@gmail.com Authored: Sun Jan 12 19:02:19 2014 +0900 Committer: Masaori Koshiba masaori...@gmail.com Committed: Sun Jan 12 19:02:19 2014 +0900 -- doc/admin/http-proxy-caching.en.rst | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ebb01e5d/doc/admin/http-proxy-caching.en.rst -- diff --git a/doc/admin/http-proxy-caching.en.rst b/doc/admin/http-proxy-caching.en.rst index 72c2854..8ff3b8e 100644 --- a/doc/admin/http-proxy-caching.en.rst +++ b/doc/admin/http-proxy-caching.en.rst @@ -424,16 +424,16 @@ if it is indeed cacheable. To set cache pinning rules -3. Make sure the following variable in :file:`records.config` is set +1. Make sure the following variable in :file:`records.config` is set - :ts:cv:`proxy.config.cache.permit.pinning` -4. Add a rule in :file:`cache.config` for each +2. Add a rule in :file:`cache.config` for each URL you want Traffic Server to pin in the cache. For example:: url_regex=^https?://(www.)?apache.org/dev/ pin-in-cache=12h -5. Run the command :option:`traffic_line -x` to apply the configuration +3. Run the command :option:`traffic_line -x` to apply the configuration changes. To Cache or Not to Cache? @@ -487,11 +487,11 @@ from its cache. To configure Traffic Server to ignore client ``no-cache`` headers -3. Edit the following variable in :file:`records.config` +1. Edit the following variable in :file:`records.config` - :ts:cv:`proxy.config.http.cache.ignore_client_no_cache` -4. Run the command :option:`traffic_line -x` to apply the configuration +2. Run the command :option:`traffic_line -x` to apply the configuration changes. Origin Server Directives @@ -585,9 +585,9 @@ server and never cached, as detailed below. To disable HTTP object caching manually -3. Set the variable :ts:cv:`proxy.config.http.enabled` to ``0``. +1. Set the variable :ts:cv:`proxy.config.http.enabled` to ``0``. -4. Run the command :option:`traffic_line -x` to apply the configuration +2. Run the command :option:`traffic_line -x` to apply the configuration changes. Caching Dynamic Content @@ -603,11 +603,11 @@ appropriate ``Cache-Control`` headers. To configure Traffic Server's cache behaviour in regard to dynamic content -3. Edit the following variable in :file:`records.config` +1. Edit the following variable in :file:`records.config` - :ts:cv:`proxy.config.http.cache.cache_urls_that_look_dynamic` -4. Run the command :option:`traffic_line -x` to apply the configuration +2. Run the command :option:`traffic_line -x` to apply the configuration changes. Caching Cookied Objects @@ -630,9 +630,9 @@ You can reconfigure Traffic Server to: To configure how Traffic Server caches cookied content -3. Edit the variable :ts:cv:`proxy.config.http.cache.cache_responses_to_cookies` +1. Edit the variable :ts:cv:`proxy.config.http.cache.cache_responses_to_cookies` -4. Run the command :option:`traffic_line -x` to apply the configuration +2. Run the command :option:`traffic_line -x` to apply the configuration changes. Forcing Object Caching @@ -672,14 +672,14 @@ Configuring How Traffic Server Caches Alternates To configure how Traffic Server caches alternates, follow the steps below -3. Edit the following variables +1. Edit the following variables - :ts:cv:`proxy.config.http.cache.enable_default_vary_headers` - :ts:cv:`proxy.config.http.cache.vary_default_text` - :ts:cv:`proxy.config.http.cache.vary_default_images` - :ts:cv:`proxy.config.http.cache.vary_default_other` -4. Run the command :option:`traffic_line -x` to apply the configuration +2. Run the command :option:`traffic_line -x` to apply the configuration changes. .. note::
[2/2] git commit: Revert TS-2483 Add a new metric, proxy.node.restarts.proxy.cache_ready_time,
Revert TS-2483 Add a new metric, proxy.node.restarts.proxy.cache_ready_time, This reverts commit 5df2cac3846d7d2f9ae255b051f748d25773a8bc. Conflicts: CHANGES This does not cooperate nicely with librecords. Might be bugs in both librecords and here, but backing out for now. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/7af657e4 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/7af657e4 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/7af657e4 Branch: refs/heads/master Commit: 7af657e45507667c92a88a2be175df05c57eb655 Parents: 74763d2 Author: Leif Hedstrom zw...@apache.org Authored: Mon Jan 13 14:11:23 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Mon Jan 13 14:11:23 2014 -0700 -- CHANGES | 5 - mgmt/RecordsConfig.cc | 2 -- proxy/Main.cc | 4 3 files changed, 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7af657e4/CHANGES -- diff --git a/CHANGES b/CHANGES index c71469d..f5e4224 100644 --- a/CHANGES +++ b/CHANGES @@ -16,11 +16,6 @@ Changes with Apache Traffic Server 4.2.0 *) [TS-2486] Eliminate SIMPLE_MEMCPY_INIT define. - *) [TS-2483] Add a new metric, proxy.node.restarts.proxy.cache_ready_time, - tracking absolute time when the cache started (finished - initialization). Until cache is available, or no cache configured, this - metric stays at a value of 0. - *) [TS-2476] Fix size_t format string. Author: Radim Kolar h...@sendmail.cz http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7af657e4/mgmt/RecordsConfig.cc -- diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index 63738ff..3e3fe5c 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -1368,8 +1368,6 @@ RecordElement RecordsConfig[] = { , {RECT_NODE, proxy.node.restarts.proxy.start_time, RECD_INT, 0, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} , - {RECT_NODE, proxy.node.restarts.proxy.cache_ready_time, RECD_INT, 0, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} - , {RECT_NODE, proxy.node.restarts.proxy.stop_time, RECD_INT, 0, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} , {RECT_NODE, proxy.node.restarts.proxy.restart_count, RECD_INT, 0, RECU_NULL, RR_NULL, RECC_NULL, NULL, RECA_NULL} http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7af657e4/proxy/Main.cc -- diff --git a/proxy/Main.cc b/proxy/Main.cc index 39bba18..d715319 100644 --- a/proxy/Main.cc +++ b/proxy/Main.cc @@ -398,10 +398,6 @@ CB_After_Cache_Init() Debug(http_listen, Delayed listen enable, cache initialization finished); start_HttpProxyServer(); } - - time_t cache_ready_at = time(NULL); - RecSetRecordInt(proxy.node.restarts.proxy.cache_ready_time, cache_ready_at); - // Alert the plugins the cache is initialized. hook = lifecycle_hooks-get(TS_LIFECYCLE_CACHE_READY_HOOK); while (hook) {
[1/2] git commit: Revert TS-2483 Add to docs.
Updated Branches: refs/heads/master 283aa3bca - 7af657e45 Revert TS-2483 Add to docs. This reverts commit c89d14621e2fd7ef1350990960f5a33aa3ff06d1. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/74763d22 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/74763d22 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/74763d22 Branch: refs/heads/master Commit: 74763d22dc6ade6aaa978af4273377f29fc4cb41 Parents: 283aa3b Author: Leif Hedstrom zw...@apache.org Authored: Mon Jan 13 14:09:30 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Mon Jan 13 14:09:30 2014 -0700 -- doc/reference/commands/traffic_line.en.rst | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/74763d22/doc/reference/commands/traffic_line.en.rst -- diff --git a/doc/reference/commands/traffic_line.en.rst b/doc/reference/commands/traffic_line.en.rst index 2e7938c..08683fb 100644 --- a/doc/reference/commands/traffic_line.en.rst +++ b/doc/reference/commands/traffic_line.en.rst @@ -129,7 +129,6 @@ The :option:`traffic_line -r` option accepts the following variable names:: proxy.node.restarts.proxy.start_time proxy.node.restarts.proxy.stop_time proxy.node.restarts.proxy.restart_count -proxy.node.restarts.proxy.cache_ready_time proxy.node.version.manager.short proxy.node.version.manager.long proxy.node.version.manager.build_number
[3/3] git commit: Make it compile at least
Make it compile at least Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f3830380 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f3830380 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f3830380 Branch: refs/heads/lua_config Commit: f3830380f8793ad2d3e57362aff9726baaae72d2 Parents: 72da02a Author: Leif Hedstrom zw...@apache.org Authored: Tue Jan 14 20:32:25 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Tue Jan 14 20:32:25 2014 -0700 -- iocore/net/SSLUtils.cc | 5 +++-- proxy/luaConfig.cc | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f3830380/iocore/net/SSLUtils.cc -- diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc index 0b8553e..9cd6700 100644 --- a/iocore/net/SSLUtils.cc +++ b/iocore/net/SSLUtils.cc @@ -787,7 +787,7 @@ static int SSLUtils_lua_ssl_store_ssl_context(lua_State *L) { const SSLConfigParams * params; SSLCertLookup * lookup; - xptrchar dest_ip, ssl_key_name, ssl_ca_name, ssl_cert_name; + xptrchar dest_ip, ssl_key_name, ssl_ca_name, ssl_cert_name, ticket_key_filename; params = (const SSLConfigParams *) lua_touserdata(L, lua_upvalueindex(1)); lookup = (SSLCertLookup *) lua_touserdata(L, lua_upvalueindex(2)); #define LUAGETF(name) do { \ @@ -799,7 +799,8 @@ SSLUtils_lua_ssl_store_ssl_context(lua_State *L) { LUAGETF(ssl_key_name); LUAGETF(ssl_ca_name); LUAGETF(ssl_cert_name); - if(!ssl_store_ssl_context(params, lookup, dest_ip, ssl_cert_name, ssl_ca_name, ssl_key_name)) + // TODO: ticket_key_filename stuff should be popped here I think + if(!ssl_store_ssl_context(params, lookup, dest_ip, ssl_cert_name, ssl_ca_name, ssl_key_name, -1, ticket_key_filename)) lua_pushboolean(L,0); else lua_pushboolean(L,1); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f3830380/proxy/luaConfig.cc -- diff --git a/proxy/luaConfig.cc b/proxy/luaConfig.cc index 626b40d..7dd845d 100644 --- a/proxy/luaConfig.cc +++ b/proxy/luaConfig.cc @@ -134,7 +134,7 @@ tsrec_call_func(lua_State *L) { lua_rawget(L,2); bpath = lua_tostring(L,-1); if(bpath == NULL) return tsrec_dispatch_method(L,,opath); -int blen = strlen(bpath); +size_t blen = strlen(bpath); lua_pop(L,1); if(blen strlen(opath) || strncmp(bpath, opath, blen) || @@ -305,7 +305,7 @@ lua_State *luaConfig::open(const char *config_file_path, const char *module) { lua_pop(L,1); luaopen_ats(L); - UrlRewrite::luaopen(L); + // UrlRewrite::luaopen(L); // TODO: Not available now lua_getglobal(L,require); lua_pushstring(L,module); if(lua_pcall(L,1,1,0) != 0) {
[1/3] git commit: First whack a lua in core.
Updated Branches: refs/heads/lua_config [created] f3830380f First whack a lua in core. Wraps records, ssl_multicert and remap UrlRewrite.cc stuff. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/c2ca0dca Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c2ca0dca Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c2ca0dca Branch: refs/heads/lua_config Commit: c2ca0dca541bf98608a1ec998a7c258bffaabb29 Parents: 36db28d Author: Theo Schlossnagle je...@omniti.com Authored: Fri Oct 18 16:58:02 2013 -0700 Committer: Theo Schlossnagle je...@omniti.com Committed: Fri Oct 18 16:58:02 2013 -0700 -- configure.ac | 8 +- iocore/net/SSLUtils.cc | 40 +++ proxy/Main.cc | 3 + proxy/Makefile.am | 16 +- proxy/http/remap/UrlRewrite.cc | 528 proxy/http/remap/UrlRewrite.h | 4 + proxy/luaConfig.cc | 340 +++ proxy/luaConfig.h | 92 +++ 8 files changed, 1023 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c2ca0dca/configure.ac -- diff --git a/configure.ac b/configure.ac index 8023755..c8beec0 100644 --- a/configure.ac +++ b/configure.ac @@ -1379,6 +1379,12 @@ no) ;; esac +AS_IF([ test x${enable_lua_support} = xno], [ + AC_MSG_ERROR([lua required but not found]) + ], [ + ]) + +TS_ADDTO(CPPFLAGS, [$LUA_CFLAGS]) AC_SUBST(LUA_CFLAGS) AC_SUBST(LUA_LIBS) AC_MSG_CHECKING([whether to enable Lua support]) @@ -1389,7 +1395,7 @@ AC_MSG_RESULT([$enable_lua_support]) # On Darwin LuaJIT requires magic link options, otherwise it will crash in luaL_openlibs() at startup. See # http://luajit.org/install.html. case $host_os in - darwin) + darwin*) if test x${enable_lua_support} = xLuaJIT; then LUA_LUAJIT_LDFLAGS=-Wl,-pagezero_size,1 -Wl,-image_base,1 fi http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c2ca0dca/iocore/net/SSLUtils.cc -- diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc index 8c4b888..f2455f4 100644 --- a/iocore/net/SSLUtils.cc +++ b/iocore/net/SSLUtils.cc @@ -23,6 +23,8 @@ #include libts.h #include I_Layout.h #include P_Net.h +#include luaConfig.h +#include lua.hpp #include openssl/err.h #include openssl/bio.h @@ -632,6 +634,39 @@ ssl_extract_certificate( return true; } +static int +SSLUtils_lua_ssl_store_ssl_context(lua_State *L) { + const SSLConfigParams * params; + SSLCertLookup * lookup; + xptrchar dest_ip, ssl_key_name, ssl_ca_name, ssl_cert_name; + params = (const SSLConfigParams *) lua_touserdata(L, lua_upvalueindex(1)); + lookup = (SSLCertLookup *) lua_touserdata(L, lua_upvalueindex(2)); +#define LUAGETF(name) do { \ + lua_getfield(L,-1,#name); \ + name = (char *)lua_tostring(L,1); \ + lua_pop(L,1); \ +} while(0) + LUAGETF(dest_ip); + LUAGETF(ssl_key_name); + LUAGETF(ssl_ca_name); + LUAGETF(ssl_cert_name); + if(!ssl_store_ssl_context(params, lookup, dest_ip, ssl_cert_name, ssl_ca_name, ssl_key_name)) +lua_pushboolean(L,0); + else +lua_pushboolean(L,1); + return 1; +} + +void +SSLUtils_lua_ssl_context( +lua_State * L, +const SSLConfigParams * params, +SSLCertLookup * lookup) { + lua_pushlightuserdata(L, (void *)params); + lua_pushlightuserdata(L, (void *)lookup); + lua_pushcclosure(L, SSLUtils_lua_ssl_store_ssl_context, 2); +} + bool SSLParseCertificateConfiguration( const SSLConfigParams * params, @@ -702,6 +737,11 @@ SSLParseCertificateConfiguration( line = tokLine(NULL, tok_state); } + + lua_State *L = globalLuaConfig.getL(); + SSLUtils_lua_ssl_context(L, params, lookup); + globalLuaConfig.call(L, config_ssl, 1); + // We *must* have a default context even if it can't possibly work. The default context is used to // bootstrap the SSL handshake so that we can subsequently do the SNI lookup to switch to the real // context. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c2ca0dca/proxy/Main.cc -- diff --git a/proxy/Main.cc b/proxy/Main.cc index 2d34d5c..c9156d5 100644 --- a/proxy/Main.cc +++ b/proxy/Main.cc @@ -89,6 +89,7 @@ extern C int plock(int); #include XmlUtils.h #include I_Tasks.h #include InkAPIInternal.h +#include luaConfig.h #include ts/ink_cap.h @@ -363,6 +364,8 @@ initialize_process_manager() LibRecordsConfigInit(); RecordsConfigOverrideFromEnvironment(); } + + luaConfigInit(); // // Start up manager //
[2/3] git commit: Merge branch 'lua_in_core' of https://github.com/postwait/trafficserver into dev/lua_conf
Merge branch 'lua_in_core' of https://github.com/postwait/trafficserver into dev/lua_conf * 'lua_in_core' of https://github.com/postwait/trafficserver: First whack a lua in core. Conflicts: proxy/Main.cc proxy/Makefile.am proxy/http/remap/UrlRewrite.cc Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/72da02ab Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/72da02ab Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/72da02ab Branch: refs/heads/lua_config Commit: 72da02ab0afddda6a0164580d6a4f27ef49f9a8f Parents: ba44a77 c2ca0dc Author: Leif Hedstrom zw...@apache.org Authored: Tue Jan 14 20:32:02 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Tue Jan 14 20:32:02 2014 -0700 -- configure.ac | 8 +- iocore/net/SSLUtils.cc| 40 + proxy/Main.cc | 4 + proxy/Makefile.am | 14 +- proxy/http/remap/UrlRewrite.h | 4 + proxy/luaConfig.cc| 340 + proxy/luaConfig.h | 92 ++ 7 files changed, 497 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/72da02ab/configure.ac -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/72da02ab/iocore/net/SSLUtils.cc -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/72da02ab/proxy/Main.cc -- diff --cc proxy/Main.cc index d715319,c9156d5..f9d0919 --- a/proxy/Main.cc +++ b/proxy/Main.cc @@@ -86,8 -86,10 +86,9 @@@ extern C int plock(int) #include Update.h #include congest/Congestion.h #include RemapProcessor.h -#include XmlUtils.h #include I_Tasks.h #include InkAPIInternal.h + #include luaConfig.h #include ts/ink_cap.h @@@ -314,8 -365,11 +315,11 @@@ initialize_process_manager( RecordsConfigOverrideFromEnvironment(); } + luaConfigInit(); ++ + // // Start up manager - // - pmgmt = NEW(new ProcessManager(remote_management_flag, management_directory)); + pmgmt = NEW(new ProcessManager(remote_management_flag)); pmgmt-start(); RecProcessInitMessage(remote_management_flag ? RECM_CLIENT : RECM_STAND_ALONE); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/72da02ab/proxy/Makefile.am -- diff --cc proxy/Makefile.am index 04d72c8,34a9557..38d0c8a --- a/proxy/Makefile.am +++ b/proxy/Makefile.am @@@ -45,8 -49,11 +45,9 @@@ AM_CPPFLAGS = -I$(top_srcdir)/mgmt \ -I$(top_srcdir)/mgmt/preparse \ -I$(top_srcdir)/mgmt/utils \ - -I$(srcdir)/api/ts \ - -I. \ - -I./api/ts \ + -I$(top_builddir)/proxy/api/ts \ - -I$(top_srcdir)/lib + -I$(top_srcdir)/lib \ + $(LUA_CFLAGS) noinst_HEADERS = \ ConfigParse.h \ @@@ -87,8 -100,12 +88,10 @@@ traffic_server_SOURCES = FetchSM.cc \ InkAPIInternal.h \ InkIOCoreAPI.cc \ - InkXml.cc \ - InkXml.h \ IPAllow.cc \ IPAllow.h \ + luaConfig.cc \ + luaConfig.h \ Main.cc \ Main.h \ ParentSelection.cc \ @@@ -218,12 -237,13 +222,13 @@@ traffic_sac_SOURCES = Plugin.cc \ InkAPI.cc \ FetchSM.cc \ - InkIOCoreAPI.cc + InkIOCoreAPI.cc \ - luaConfig.cc \ - InkXml.cc ++ luaConfig.cc - traffic_sac_LDFLAGS = @EXTRA_CXX_LDFLAGS@ @LIBTOOL_LINK_FLAGS@ + traffic_sac_LDFLAGS = @LUA_LUAJIT_LDFLAGS@ @EXTRA_CXX_LDFLAGS@ @LIBTOOL_LINK_FLAGS@ traffic_sac_LDADD = \ http/libhttp.a \ + shared/libdiagsconfig.a \ http/remap/libhttp_remap.a \ congest/libCongestionControl.a \ logging/liblogging.a \ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/72da02ab/proxy/http/remap/UrlRewrite.h --
git commit: Run it through indent with our indentation rules
Updated Branches: refs/heads/lua_config f3830380f - 557d1a24f Run it through indent with our indentation rules Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/557d1a24 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/557d1a24 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/557d1a24 Branch: refs/heads/lua_config Commit: 557d1a24f307e48639d53a0a35c07f5ad1ec37dc Parents: f383038 Author: Leif Hedstrom zw...@apache.org Authored: Tue Jan 14 20:49:06 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Tue Jan 14 20:49:06 2014 -0700 -- iocore/net/SSLUtils.cc | 16 ++- proxy/luaConfig.cc | 299 +--- proxy/luaConfig.h | 43 --- 3 files changed, 201 insertions(+), 157 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/557d1a24/iocore/net/SSLUtils.cc -- diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc index 9cd6700..f77287e 100644 --- a/iocore/net/SSLUtils.cc +++ b/iocore/net/SSLUtils.cc @@ -784,10 +784,12 @@ ssl_extract_certificate( } static int -SSLUtils_lua_ssl_store_ssl_context(lua_State *L) { +SSLUtils_lua_ssl_store_ssl_context(lua_State* L) +{ const SSLConfigParams * params; SSLCertLookup * lookup; xptrchar dest_ip, ssl_key_name, ssl_ca_name, ssl_cert_name, ticket_key_filename; + params = (const SSLConfigParams *) lua_touserdata(L, lua_upvalueindex(1)); lookup = (SSLCertLookup *) lua_touserdata(L, lua_upvalueindex(2)); #define LUAGETF(name) do { \ @@ -800,7 +802,7 @@ SSLUtils_lua_ssl_store_ssl_context(lua_State *L) { LUAGETF(ssl_ca_name); LUAGETF(ssl_cert_name); // TODO: ticket_key_filename stuff should be popped here I think - if(!ssl_store_ssl_context(params, lookup, dest_ip, ssl_cert_name, ssl_ca_name, ssl_key_name, -1, ticket_key_filename)) + if (!ssl_store_ssl_context(params, lookup, dest_ip, ssl_cert_name, ssl_ca_name, ssl_key_name, -1, ticket_key_filename)) lua_pushboolean(L,0); else lua_pushboolean(L,1); @@ -808,19 +810,15 @@ SSLUtils_lua_ssl_store_ssl_context(lua_State *L) { } void -SSLUtils_lua_ssl_context( -lua_State * L, -const SSLConfigParams * params, -SSLCertLookup * lookup) { +SSLUtils_lua_ssl_context(lua_State* L, const SSLConfigParams* params, SSLCertLookup*lookup) +{ lua_pushlightuserdata(L, (void *)params); lua_pushlightuserdata(L, (void *)lookup); lua_pushcclosure(L, SSLUtils_lua_ssl_store_ssl_context, 2); } bool -SSLParseCertificateConfiguration( -const SSLConfigParams * params, -SSLCertLookup * lookup) +SSLParseCertificateConfiguration(const SSLConfigParams* params, SSLCertLookup* lookup) { char * tok_state = NULL; char * line = NULL; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/557d1a24/proxy/luaConfig.cc -- diff --git a/proxy/luaConfig.cc b/proxy/luaConfig.cc index 7dd845d..7354ca4 100644 --- a/proxy/luaConfig.cc +++ b/proxy/luaConfig.cc @@ -32,27 +32,34 @@ luaConfig globalLuaConfig(tsconfig); static int -tsrec_newindex_func(lua_State *L) { +tsrec_newindex_func(lua_State * L) +{ luaL_error(L, cannot assign to ats.config_t, invoked instead); return 0; } static int -tsrec_index_func(lua_State *L) { +tsrec_index_func(lua_State * L) +{ const char *opath = NULL; char path[1024]; assert(lua_gettop(L) == 2); - if(!strcmp(lua_tostring(L,2),_path)) return 0; - lua_pushvalue(L,2); - lua_rawget(L,1); - if(lua_istable(L,-1)) return 1; - lua_pop(L,1); - - lua_pushstring(L,_path); - lua_rawget(L,1); - if(lua_isstring(L,-1)) opath = lua_tostring(L,-1); - if(opath == NULL) snprintf(path, sizeof(path), %s, lua_tostring(L,2)); - else snprintf(path, sizeof(path), %s.%s, opath, lua_tostring(L,2)); + if (!strcmp(lua_tostring(L, 2), _path)) +return 0; + lua_pushvalue(L, 2); + lua_rawget(L, 1); + if (lua_istable(L, -1)) +return 1; + lua_pop(L, 1); + + lua_pushstring(L, _path); + lua_rawget(L, 1); + if (lua_isstring(L, -1)) +opath = lua_tostring(L, -1); + if (opath == NULL) +snprintf(path, sizeof(path), %s, lua_tostring(L, 2)); + else +snprintf(path, sizeof(path), %s.%s, opath, lua_tostring(L, 2)); lua_newtable(L); lua_pushstring(L, path); @@ -61,18 +68,19 @@ tsrec_index_func(lua_State *L) { luaL_getmetatable(L, ats.config_t); lua_setmetatable(L, -2); - lua_pushvalue(L,2); /* requested name */ - lua_pushvalue(L,-2); - lua_rawset(L,1); + lua_pushvalue(L, 2); /* requested name */ + lua_pushvalue(L, -2); + lua_rawset(L, 1); return 1; } static int -tsrec_next_record(lua_State *L)
git commit: Little more indentation cleanup
Updated Branches: refs/heads/lua_config 557d1a24f - 5f436dfe2 Little more indentation cleanup Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/5f436dfe Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/5f436dfe Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/5f436dfe Branch: refs/heads/lua_config Commit: 5f436dfe2814db2b9c1433bbf4f80d4d937d7285 Parents: 557d1a2 Author: Leif Hedstrom zw...@apache.org Authored: Wed Jan 15 09:18:34 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Wed Jan 15 09:18:34 2014 -0700 -- iocore/net/SSLUtils.cc | 23 +-- proxy/luaConfig.cc | 70 - proxy/luaConfig.h | 22 +++--- 3 files changed, 88 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5f436dfe/iocore/net/SSLUtils.cc -- diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc index f77287e..b1d8cdc 100644 --- a/iocore/net/SSLUtils.cc +++ b/iocore/net/SSLUtils.cc @@ -783,6 +783,13 @@ ssl_extract_certificate( return true; } +// Convenience +#define LUAGETF(name) do { \ +lua_getfield(L,-1,#name); \ +name = (char *)lua_tostring(L,1); \ +lua_pop(L,1); \ + } while(0) + static int SSLUtils_lua_ssl_store_ssl_context(lua_State* L) { @@ -792,20 +799,19 @@ SSLUtils_lua_ssl_store_ssl_context(lua_State* L) params = (const SSLConfigParams *) lua_touserdata(L, lua_upvalueindex(1)); lookup = (SSLCertLookup *) lua_touserdata(L, lua_upvalueindex(2)); -#define LUAGETF(name) do { \ - lua_getfield(L,-1,#name); \ - name = (char *)lua_tostring(L,1); \ - lua_pop(L,1); \ -} while(0) + LUAGETF(dest_ip); LUAGETF(ssl_key_name); LUAGETF(ssl_ca_name); LUAGETF(ssl_cert_name); + // TODO: ticket_key_filename stuff should be popped here I think - if (!ssl_store_ssl_context(params, lookup, dest_ip, ssl_cert_name, ssl_ca_name, ssl_key_name, -1, ticket_key_filename)) + if (!ssl_store_ssl_context(params, lookup, dest_ip, ssl_cert_name, ssl_ca_name, ssl_key_name, -1, ticket_key_filename)) { lua_pushboolean(L,0); - else + } else { lua_pushboolean(L,1); + } + return 1; } @@ -825,10 +831,8 @@ SSLParseCertificateConfiguration(const SSLConfigParams* params, SSLCertLookup* l xptrchar file_buf; unsignedline_num = 0; matcher_line line_info; - bool alarmAlready = false; char errBuf[1024]; - const matcher_tags sslCertTags = { NULL, NULL, NULL, NULL, NULL, NULL, false }; @@ -889,6 +893,7 @@ SSLParseCertificateConfiguration(const SSLConfigParams* params, SSLCertLookup* l lua_State *L = globalLuaConfig.getL(); + SSLUtils_lua_ssl_context(L, params, lookup); globalLuaConfig.call(L, config_ssl, 1); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5f436dfe/proxy/luaConfig.cc -- diff --git a/proxy/luaConfig.cc b/proxy/luaConfig.cc index 7354ca4..05033e7 100644 --- a/proxy/luaConfig.cc +++ b/proxy/luaConfig.cc @@ -26,7 +26,6 @@ #include I_Layout.h #include I_RecDefs.h #include I_RecCore.h -#include P_RecCore.h #include UrlRewrite.h luaConfig globalLuaConfig(tsconfig); @@ -43,23 +42,31 @@ tsrec_index_func(lua_State * L) { const char *opath = NULL; char path[1024]; + assert(lua_gettop(L) == 2); + if (!strcmp(lua_tostring(L, 2), _path)) return 0; + lua_pushvalue(L, 2); lua_rawget(L, 1); + if (lua_istable(L, -1)) return 1; + lua_pop(L, 1); lua_pushstring(L, _path); lua_rawget(L, 1); - if (lua_isstring(L, -1)) + if (lua_isstring(L, -1)) { opath = lua_tostring(L, -1); - if (opath == NULL) + } + + if (opath == NULL) { snprintf(path, sizeof(path), %s, lua_tostring(L, 2)); - else + } else { snprintf(path, sizeof(path), %s.%s, opath, lua_tostring(L, 2)); + } lua_newtable(L); lua_pushstring(L, path); @@ -71,6 +78,7 @@ tsrec_index_func(lua_State * L) lua_pushvalue(L, 2); /* requested name */ lua_pushvalue(L, -2); lua_rawset(L, 1); + return 1; } @@ -79,6 +87,7 @@ tsrec_next_record(lua_State * L) { RecRecord *r = NULL; int *idx, i, num_records, upidx; + upidx = lua_upvalueindex(1); idx = (int *) lua_touserdata(L, upidx); i = *idx; @@ -88,12 +97,16 @@ tsrec_next_record(lua_State * L) num_records = g_num_records; for (; i num_records; i++) { r = (g_records[i]); + if (REC_TYPE_IS_CONFIG(r-rec_type)) break; + r = NULL; } + if (r != NULL) rec_mutex_acquire((r-lock)); + ink_mutex_release(g_rec_config_lock);
[2/2] git commit: Added TS-2484 to CHANGES
Added TS-2484 to CHANGES Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/bed4b459 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/bed4b459 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/bed4b459 Branch: refs/heads/master Commit: bed4b45956797709e98489363e34c78d566d602d Parents: e074f7f Author: Leif Hedstrom zw...@apache.org Authored: Wed Jan 15 16:22:26 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Wed Jan 15 16:23:11 2014 -0700 -- CHANGES | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bed4b459/CHANGES -- diff --git a/CHANGES b/CHANGES index 38ebf8d..f3d260b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2484] Add API support for the two missing overridable APIs: + proxy.config.http.cache.max_open_read_retries + proxy.config.http.cache.open_read_retry_time + *) [TS-2497] Failed post results in tunnel buffers being returned to freelist prematurely. Reporter: Thomas Jackson thjac...@linkedin.com
[1/2] git commit: TS-2484 Add API support for the two missing overridable APIs
Updated Branches: refs/heads/master 5eab1b838 - bed4b4595 TS-2484 Add API support for the two missing overridable APIs Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/e074f7f0 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/e074f7f0 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/e074f7f0 Branch: refs/heads/master Commit: e074f7f012cd91a565fd7ba98095da2dfe15a3ac Parents: 5eab1b8 Author: Leif Hedstrom zw...@apache.org Authored: Wed Jan 15 16:21:29 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Wed Jan 15 16:22:33 2014 -0700 -- proxy/InkAPI.cc | 26 ++ proxy/InkAPITest.cc | 4 +++- proxy/api/ts/ts.h.in | 2 ++ 3 files changed, 27 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e074f7f0/proxy/InkAPI.cc -- diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc index 2be442d..53a8b65 100644 --- a/proxy/InkAPI.cc +++ b/proxy/InkAPI.cc @@ -7603,6 +7603,14 @@ _conf_to_memberp(TSOverridableConfigKey conf, HttpSM* sm, OverridableDataType *t typ = OVERRIDABLE_TYPE_BYTE; ret = sm-t_state.txn_conf-proxy_response_hsts_include_subdomains; break; + case TS_CONFIG_HTTP_CACHE_OPEN_READ_RETRY_TIME: +typ = OVERRIDABLE_TYPE_INT; +ret = sm-t_state.txn_conf-cache_open_read_retry_time; +break; + case TS_CONFIG_HTTP_CACHE_MAX_OPEN_READ_RETRIES: +typ = OVERRIDABLE_TYPE_INT; +ret = sm-t_state.txn_conf-max_cache_open_read_retries; +break; // This helps avoiding compiler warnings, yet detect unhandled enum members. case TS_CONFIG_NULL: @@ -7996,10 +8004,18 @@ TSHttpTxnConfigFind(const char* name, int length, TSOverridableConfigKey *conf, break; case 44: -if (!strncmp(name, proxy.config.http.anonymize_remove_client_ip, length)) - cnf = TS_CONFIG_HTTP_ANONYMIZE_REMOVE_CLIENT_IP; -else if (!strncmp(name, proxy.config.http.anonymize_insert_client_ip, length)) - cnf = TS_CONFIG_HTTP_ANONYMIZE_INSERT_CLIENT_IP; +switch (name[length-1]) { +case 'p': + if (!strncmp(name, proxy.config.http.anonymize_remove_client_ip, length)) +cnf = TS_CONFIG_HTTP_ANONYMIZE_REMOVE_CLIENT_IP; + else if (!strncmp(name, proxy.config.http.anonymize_insert_client_ip, length)) +cnf = TS_CONFIG_HTTP_ANONYMIZE_INSERT_CLIENT_IP; + break; +case 'e': + if (!strncmp(name, proxy.config.http.cache.open_read_retry_time, length)) +cnf = TS_CONFIG_HTTP_CACHE_OPEN_READ_RETRY_TIME; + break; +} break; case 45: @@ -8019,6 +8035,8 @@ TSHttpTxnConfigFind(const char* name, int length, TSOverridableConfigKey *conf, case 's': if (!strncmp(name, proxy.config.http.connect_attempts_rr_retries, length)) cnf = TS_CONFIG_HTTP_CONNECT_ATTEMPTS_RR_RETRIES; + else if (!strncmp(name, proxy.config.http.cache.max_open_read_retries, length)) +cnf = TS_CONFIG_HTTP_CACHE_MAX_OPEN_READ_RETRIES; break; } break; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e074f7f0/proxy/InkAPITest.cc -- diff --git a/proxy/InkAPITest.cc b/proxy/InkAPITest.cc index b9945a1..727cc26 100644 --- a/proxy/InkAPITest.cc +++ b/proxy/InkAPITest.cc @@ -7414,7 +7414,9 @@ const char *SDK_Overridable_Configs[TS_CONFIG_LAST_ENTRY] = { proxy.config.http.negative_revalidating_lifetime, proxy.config.http.accept_encoding_filter_enabled, proxy.config.ssl.hsts_max_age, - proxy.config.ssl.hsts_include_subdomains + proxy.config.ssl.hsts_include_subdomains, + proxy.config.http.cache.open_read_retry_time, + proxy.config.http.cache.max_open_read_retries }; REGRESSION_TEST(SDK_API_OVERRIDABLE_CONFIGS) (RegressionTest * test, int /* atype ATS_UNUSED */, int *pstatus) http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e074f7f0/proxy/api/ts/ts.h.in -- diff --git a/proxy/api/ts/ts.h.in b/proxy/api/ts/ts.h.in index e568b1f..f5ab4d7 100644 --- a/proxy/api/ts/ts.h.in +++ b/proxy/api/ts/ts.h.in @@ -682,6 +682,8 @@ extern C TS_CONFIG_HTTP_ACCEPT_ENCODING_FILTER_ENABLED, TS_CONFIG_SSL_HSTS_MAX_AGE, TS_CONFIG_SSL_HSTS_INCLUDE_SUBDOMAINS, +TS_CONFIG_HTTP_CACHE_OPEN_READ_RETRY_TIME, +TS_CONFIG_HTTP_CACHE_MAX_OPEN_READ_RETRIES, TS_CONFIG_LAST_ENTRY } TSOverridableConfigKey;
[2/3] git commit: Added TS-2499 to CHANGES This fixes #33.
Added TS-2499 to CHANGES This fixes #33. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/80d4505b Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/80d4505b Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/80d4505b Branch: refs/heads/master Commit: 80d4505bf59c47681393491c6313e9efddc536df Parents: db5e07c Author: Leif Hedstrom zw...@apache.org Authored: Thu Jan 16 10:21:04 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Thu Jan 16 10:21:40 2014 -0700 -- CHANGES | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/80d4505b/CHANGES -- diff --git a/CHANGES b/CHANGES index 971c085..7db2da0 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2499] Fix the header_rewrite plugin expansions of the new % + strings. Author: Alexey Ivanov aiva...@linkedin.com. + *) [TS-2498] Add a build option to install the example plugins. *) [TS-2484] Add API support for the two missing overridable APIs:
[3/3] git commit: TS-2499 Anal indentation changes.
TS-2499 Anal indentation changes. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/7c575510 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/7c575510 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/7c575510 Branch: refs/heads/master Commit: 7c575510531137295a7d14f096e21c07d33ab3d6 Parents: 80d4505 Author: Leif Hedstrom zw...@apache.org Authored: Thu Jan 16 10:22:36 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Thu Jan 16 10:22:36 2014 -0700 -- plugins/header_rewrite/operators.cc | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7c575510/plugins/header_rewrite/operators.cc -- diff --git a/plugins/header_rewrite/operators.cc b/plugins/header_rewrite/operators.cc index da14d35..9aa7ebe 100644 --- a/plugins/header_rewrite/operators.cc +++ b/plugins/header_rewrite/operators.cc @@ -383,6 +383,7 @@ void OperatorAddHeader::exec(const Resources res) const { std::string value; + _value.append_value(value, res); VariableExpander ve(value);
[1/3] git commit: TS-2499: header_rewrite: fixed value substitution
Updated Branches: refs/heads/master 9ca808b67 - 7c5755105 TS-2499: header_rewrite: fixed value substitution This commit fixes substitution of following variables in add header: %cquup %cqhm %cqhl %chi %port %proto Pointy hat to: me (rbtz@) Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/db5e07c4 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/db5e07c4 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/db5e07c4 Branch: refs/heads/master Commit: db5e07c485c4a495c5a6e0ed5ec427236da3597e Parents: 9ca808b Author: Alexey Ivanov aiva...@linkedin.com Authored: Wed Jan 15 18:14:05 2014 -0800 Committer: Alexey Ivanov aiva...@linkedin.com Committed: Wed Jan 15 21:20:15 2014 -0800 -- plugins/header_rewrite/operators.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/db5e07c4/plugins/header_rewrite/operators.cc -- diff --git a/plugins/header_rewrite/operators.cc b/plugins/header_rewrite/operators.cc index fda921c..da14d35 100644 --- a/plugins/header_rewrite/operators.cc +++ b/plugins/header_rewrite/operators.cc @@ -383,12 +383,11 @@ void OperatorAddHeader::exec(const Resources res) const { std::string value; + _value.append_value(value, res); VariableExpander ve(value); value = ve.expand(res); - _value.append_value(value, res); - // Never set an empty header (I don't think that ever makes sense?) if (value.empty()) { TSDebug(PLUGIN_NAME, Would set header %s to an empty value, skipping, _header.c_str());
git commit: TS-799 Have AdminClient.pm created from .in file
Updated Branches: refs/heads/master 0fc0820b5 - 4db27ec47 TS-799 Have AdminClient.pm created from .in file Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4db27ec4 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4db27ec4 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4db27ec4 Branch: refs/heads/master Commit: 4db27ec47d90e9fe76ec65a1c42576ed8ac56100 Parents: 0fc0820 Author: Leif Hedstrom zw...@apache.org Authored: Mon Jan 20 20:08:04 2014 +0100 Committer: Leif Hedstrom zw...@apache.org Committed: Mon Jan 20 20:08:04 2014 +0100 -- .gitignore | 3 + CHANGES | 2 + configure.ac | 1 + lib/perl/lib/Apache/TS/AdminClient.pm| 725 - lib/perl/lib/Apache/TS/AdminClient.pm.in | 728 ++ 5 files changed, 734 insertions(+), 725 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4db27ec4/.gitignore -- diff --git a/.gitignore b/.gitignore index a8bba97..57712e5 100644 --- a/.gitignore +++ b/.gitignore @@ -62,6 +62,9 @@ lib/ts/test_atomic lib/ts/test_freelist lib/ts/test_Map lib/ts/test_Vec +lib/perl/lib/Apache/TS/AdminClient.pm + + iocore/net/test_certlookup iocore/aio/test_AIO iocore/eventsystem/test_Buffer http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4db27ec4/CHANGES -- diff --git a/CHANGES b/CHANGES index 0e40a80..dbec535 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-799] Have AdminClient.pm created from .in file. + *) [TS-2509] Add the const qualifier to pure HttpTunnel member functions. *) [TS-2508] Add a *highly* experimental escalation plugin. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4db27ec4/configure.ac -- diff --git a/configure.ac b/configure.ac index a71f578..5552594 100644 --- a/configure.ac +++ b/configure.ac @@ -1923,6 +1923,7 @@ AC_CONFIG_FILES([ lib/atscppapi/examples/async_timer/Makefile lib/wccp/Makefile lib/perl/Makefile + lib/perl/lib/Apache/TS/AdminClient.pm mgmt/Makefile mgmt/api/Makefile mgmt/api/include/Makefile http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4db27ec4/lib/perl/lib/Apache/TS/AdminClient.pm -- diff --git a/lib/perl/lib/Apache/TS/AdminClient.pm b/lib/perl/lib/Apache/TS/AdminClient.pm deleted file mode 100644 index 37281ae..000 --- a/lib/perl/lib/Apache/TS/AdminClient.pm +++ /dev/null @@ -1,725 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# License); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an AS IS BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -package Apache::TS::AdminClient; - -use warnings; -use strict; - -require 5.006; - -use Carp; -use IO::Socket::UNIX; -use IO::Select; -our $VERSION = 0.01; - -use constant { -TS_FILE_READ= 0, -TS_FILE_WRITE = 1, -TS_RECORD_SET = 2, -TS_RECORD_GET = 3, -TS_PROXY_STATE_GET = 4, -TS_PROXY_STATE_SET = 5, -TS_RECONFIGURE = 6, -TS_RESTART = 7, -TS_BOUNCE = 8, -TS_EVENT_RESOLVE= 9, -TS_EVENT_GET_MLT= 10, -TS_EVENT_ACTIVE = 11, -TS_EVENT_REG_CALLBACK = 12, -TS_EVENT_UNREG_CALLBACK = 13, -TS_EVENT_NOTIFY = 14, -TS_SNAPSHOT_TAKE= 15, -TS_SNAPSHOT_RESTORE = 16, -TS_SNAPSHOT_REMOVE = 17, -TS_SNAPSHOT_GET_MLT = 18, -TS_DIAGS= 19, -TS_STATS_RESET = 20 -}; - -# We treat both REC_INT and REC_COUNTER the same here -use constant { -TS_REC_INT = 0, -TS_REC_COUNTER = 0, -TS_REC_FLOAT = 2, -TS_REC_STRING = 3 -}; - -use constant { -
[25/50] git commit: Revert TS-2483 Add to docs.
Revert TS-2483 Add to docs. This reverts commit c89d14621e2fd7ef1350990960f5a33aa3ff06d1. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/74763d22 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/74763d22 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/74763d22 Branch: refs/heads/5.0.x Commit: 74763d22dc6ade6aaa978af4273377f29fc4cb41 Parents: 283aa3b Author: Leif Hedstrom zw...@apache.org Authored: Mon Jan 13 14:09:30 2014 -0700 Committer: Leif Hedstrom zw...@apache.org Committed: Mon Jan 13 14:09:30 2014 -0700 -- doc/reference/commands/traffic_line.en.rst | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/74763d22/doc/reference/commands/traffic_line.en.rst -- diff --git a/doc/reference/commands/traffic_line.en.rst b/doc/reference/commands/traffic_line.en.rst index 2e7938c..08683fb 100644 --- a/doc/reference/commands/traffic_line.en.rst +++ b/doc/reference/commands/traffic_line.en.rst @@ -129,7 +129,6 @@ The :option:`traffic_line -r` option accepts the following variable names:: proxy.node.restarts.proxy.start_time proxy.node.restarts.proxy.stop_time proxy.node.restarts.proxy.restart_count -proxy.node.restarts.proxy.cache_ready_time proxy.node.version.manager.short proxy.node.version.manager.long proxy.node.version.manager.build_number
[43/50] git commit: TS-2500 Fix cache stripe assignment due to failed disk.
TS-2500 Fix cache stripe assignment due to failed disk. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4c684599 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4c684599 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4c684599 Branch: refs/heads/5.0.x Commit: 4c6845994cf8001a962227cfb9d3b6e94e77f0ab Parents: 7c57551 Author: Alan M. Carroll a...@network-geographics.com Authored: Thu Jan 16 11:58:44 2014 -0600 Committer: Alan M. Carroll a...@network-geographics.com Committed: Thu Jan 16 11:58:44 2014 -0600 -- CHANGES | 3 +++ iocore/cache/Cache.cc | 16 2 files changed, 11 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4c684599/CHANGES -- diff --git a/CHANGES b/CHANGES index 7db2da0..221ebf2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2500] Fix handling of cache stripe assignment when a disk is + taken offline. + *) [TS-2499] Fix the header_rewrite plugin expansions of the new % strings. Author: Alexey Ivanov aiva...@linkedin.com. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4c684599/iocore/cache/Cache.cc -- diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc index 711b7c9..16dbc37 100644 --- a/iocore/cache/Cache.cc +++ b/iocore/cache/Cache.cc @@ -1983,8 +1983,8 @@ Lfinish: // explicit pair for random table in build_vol_hash_table struct rtable_pair { - unsigned int rval; - unsigned int vol; + unsigned int rval; /// relative value, used to sort. + unsigned int idx; /// volume mapping table index. }; // comparison operator for random table in build_vol_hash_table @@ -2068,7 +2068,7 @@ build_vol_hash_table(CacheHostRecord *cp) for (int i = 0; i num_vols; i++) for (int j = 0; j (int)rtable_entries[i]; j++) { rtable[rindex].rval = next_rand(rnd[i]); - rtable[rindex].vol = i; + rtable[rindex].idx = i; rindex++; } ink_assert(rindex == (int)rtable_size); @@ -2081,11 +2081,11 @@ build_vol_hash_table(CacheHostRecord *cp) for (int j = 0; j VOL_HASH_TABLE_SIZE; j++) { pos = width / 2 + j * width; // position to select closest to while (pos rtable[i].rval i (int)rtable_size - 1) i++; -ttable[j] = rtable[i].vol; -gotvol[ttable[j]]++; +ttable[j] = mapping[rtable[i].idx]; +gotvol[rtable[i].idx]++; } for (int i = 0; i num_vols; i++) { -Debug(cache_init, build_vol_hash_table %d request %d got %d, i, forvol[i], gotvol[i]); +Debug(cache_init, build_vol_hash_table index %d mapped to %d requested %d got %d, i, mapping[i], forvol[i], gotvol[i]); } // install new table if (cp-vol_hash_table) @@ -2146,13 +2146,13 @@ AIO_Callback_handler::handle_disk_failure(int /* event ATS_UNUSED */, void *data if (!DISK_BAD(d)) { char message[128]; -snprintf(message, sizeof(message), Error accessing Disk %s, d-path); +snprintf(message, sizeof(message), Error accessing Disk %s [%d/%d], d-path, d-num_errors, cache_config_max_disk_errors); Warning(%s, message); REC_SignalManager(REC_SIGNAL_CACHE_WARNING, message); } else if (!DISK_BAD_SIGNALLED(d)) { char message[128]; -snprintf(message, sizeof(message), too many errors accessing disk %s: declaring disk bad, d-path); +snprintf(message, sizeof(message), too many errors accessing disk %s [%d/%d]: declaring disk bad, d-path, d-num_errors, cache_config_max_disk_errors); Warning(%s, message); REC_SignalManager(REC_SIGNAL_CACHE_ERROR, message); /* subtract the disk space that was being used from the cache size stat */
[18/50] git commit: [TS-2489] Fix esi plugin problem with contents in comments output twice when the node list is cached
[TS-2489] Fix esi plugin problem with contents in comments output twice when the node list is cached Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/793331a3 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/793331a3 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/793331a3 Branch: refs/heads/5.0.x Commit: 793331a31f20c7980fae062a5e803dff29f9e7e9 Parents: 0ef2f54 Author: Yu Qing zhuangy...@taobao.com Authored: Sat Jan 11 22:53:26 2014 -0800 Committer: Kit Chan kic...@apache.org Committed: Sat Jan 11 22:53:26 2014 -0800 -- CHANGES | 4 plugins/experimental/esi/lib/EsiProcessor.cc | 9 +++-- plugins/experimental/esi/lib/EsiProcessor.h | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/793331a3/CHANGES -- diff --git a/CHANGES b/CHANGES index 85a5ce6..5d575e5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2489] Fix esi plugin problem with contents in comments output + twice when the node list is cached. + Author: Yu Qing zhuangy...@taobao.com + *) [TS-2336] First attempt at moving the Prefetch APIs into some usable state. There's still work to be done here, but separate bugs for that. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/793331a3/plugins/experimental/esi/lib/EsiProcessor.cc -- diff --git a/plugins/experimental/esi/lib/EsiProcessor.cc b/plugins/experimental/esi/lib/EsiProcessor.cc index 96a647e..3ece0f4 100644 --- a/plugins/experimental/esi/lib/EsiProcessor.cc +++ b/plugins/experimental/esi/lib/EsiProcessor.cc @@ -47,7 +47,10 @@ EsiProcessor::EsiProcessor(const char *debug_tag, const char *parser_debug_tag, _n_processed_nodes(0), _n_processed_try_nodes(0), _overall_len(0), -_fetcher(fetcher), _esi_vars(variables), +_fetcher(fetcher), +_reqAdded(false), +_usePackedNodeList(false), +_esi_vars(variables), _expression(expression_debug_tag, debug_func, error_func, _esi_vars), _n_try_blocks_processed(0), _handler_manager(handler_mgr) { } @@ -59,6 +62,7 @@ EsiProcessor::start() { stop(); } _curr_state = PARSING; + _usePackedNodeList = false; return true; } @@ -123,6 +127,7 @@ EsiProcessor::usePackedNodeList(const char *data, int data_len) { error(); return UNPACK_FAILURE; } + _usePackedNodeList = true; return _handleParseComplete() ? PROCESS_SUCCESS : PROCESS_FAILURE; } @@ -715,7 +720,7 @@ EsiProcessor::_preprocess(DocNodeList node_list, int n_prescanned_nodes) { _debugLog(_debug_tag, [%s] handled try node successfully, __FUNCTION__); break; case DocNode::TYPE_HTML_COMMENT: -if (!_handleHtmlComment(list_iter)) { +if (!_usePackedNodeList !_handleHtmlComment(list_iter)) { _errorLog([%s] Failed to preprocess try node, __FUNCTION__); return false; } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/793331a3/plugins/experimental/esi/lib/EsiProcessor.h -- diff --git a/plugins/experimental/esi/lib/EsiProcessor.h b/plugins/experimental/esi/lib/EsiProcessor.h index b4f7309..16004c6 100644 --- a/plugins/experimental/esi/lib/EsiProcessor.h +++ b/plugins/experimental/esi/lib/EsiProcessor.h @@ -123,6 +123,7 @@ private: EsiLib::StringHash _include_urls; bool _reqAdded; + bool _usePackedNodeList; bool _processEsiNode(const EsiLib::DocNodeList::iterator iter); bool _handleParseComplete();