Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9C512200C1D for ; Thu, 16 Feb 2017 23:45:18 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9A6E2160B61; Thu, 16 Feb 2017 22:45:18 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8168B160B52 for ; Thu, 16 Feb 2017 23:45:14 +0100 (CET) Received: (qmail 9017 invoked by uid 500); 16 Feb 2017 22:45:13 -0000 Mailing-List: contact commits-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@trafficserver.apache.org Delivered-To: mailing list commits@trafficserver.apache.org Received: (qmail 9001 invoked by uid 99); 16 Feb 2017 22:45:13 -0000 Received: from Unknown (HELO matt-storage.apache.org) (207.244.88.132) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2017 22:45:13 +0000 Received: by matt-storage.apache.org (ASF Mail Server at matt-storage.apache.org, from userid 33) id 58DD461404; Thu, 16 Feb 2017 22:45:12 +0000 (UTC) Date: Thu, 16 Feb 2017 22:45:12 +0000 To: "commits@trafficserver.apache.org" Subject: [trafficserver] branch master updated: Removed spaces at the end of the line on all files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <20170216224512.12606.52139@matt-storage.apache.org> From: bcall@apache.org Reply-To: "commits@trafficserver.apache.org" X-Git-Host: matt-storage.apache.org X-Git-Repo: trafficserver X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: c5baf7507bd609fd57bf9778262dbd0b04264ad4 X-Git-Newrev: 924f15cbd0b5b78f0e04744130ba78fa0ebf235a X-Git-Rev: 924f15cbd0b5b78f0e04744130ba78fa0ebf235a X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.3.dev Auto-Submitted: auto-generated archived-at: Thu, 16 Feb 2017 22:45:18 -0000 This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch master in repository https://git-dual.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 924f15c Removed spaces at the end of the line on all files 924f15c is described below commit 924f15cbd0b5b78f0e04744130ba78fa0ebf235a Author: Bryan Call AuthorDate: Thu Feb 16 10:37:07 2017 -0800 Removed spaces at the end of the line on all files --- .clang-format | 4 +- CONTRIBUTING.md | 18 +- LICENSE | 6 +- build/crypto.m4 | 2 +- build/pkg.m4 | 4 +- build/tcl.m4 | 74 +++--- build/tcmalloc.m4 | 2 +- ci/jenkins/bin/clang-analyzer.sh | 2 +- cmd/traffic_wccp/readme.txt | 14 +- .../configuration/hierachical-caching.en.rst | 18 +- .../configuration/transparent-proxy.en.rst | 2 +- .../configuration/transparent-proxy/build.en.rst | 4 +- .../transparent-proxy/router-inline.en.rst | 4 +- .../transparent-proxy/wccp-configuration.en.rst | 4 +- .../transparent-proxy/wccp-service-config.en.rst | 10 +- doc/admin-guide/configuring-traffic-server.en.rst | 2 +- doc/admin-guide/files/congestion.config.en.rst | 8 +- doc/admin-guide/files/hosting.config.en.rst | 6 +- doc/admin-guide/files/splitdns.config.en.rst | 4 +- doc/admin-guide/files/volume.config.en.rst | 4 +- doc/admin-guide/plugins/authproxy.en.rst | 12 +- doc/admin-guide/plugins/background_fetch.en.rst | 6 +- doc/admin-guide/plugins/balancer.en.rst | 4 +- doc/admin-guide/plugins/buffer_upload.en.rst | 26 +-- .../plugins/collapsed_forwarding.en.rst | 12 +- doc/admin-guide/plugins/combo_handler.en.rst | 4 +- doc/admin-guide/plugins/esi.en.rst | 18 +- doc/admin-guide/plugins/geoip_acl.en.rst | 4 +- doc/admin-guide/plugins/healthchecks.en.rst | 2 +- doc/admin-guide/plugins/hipes.en.rst | 28 +-- doc/admin-guide/plugins/memcache.en.rst | 4 +- doc/admin-guide/plugins/money_trace.en.rst | 12 +- doc/admin-guide/plugins/mysql_remap.en.rst | 6 +- .../plugins/stale_while_revalidate.en.rst | 4 +- doc/admin-guide/plugins/ts_lua.en.rst | 46 ++-- doc/admin-guide/plugins/webp_transform.en.rst | 4 +- doc/appendices/command-line/traffic_ctl.en.rst | 2 +- doc/checkvers.py | 4 +- .../api/functions/TSClientProtocolStack.en.rst | 48 ++-- .../api/functions/TSIOBufferReader.en.rst | 4 +- .../api/functions/TSLifecycleHookAdd.en.rst | 36 +-- doc/developer-guide/api/functions/TSRecords.en.rst | 4 +- doc/developer-guide/api/types/CoreTypes.en.rst | 6 +- doc/developer-guide/api/types/SystemTypes.en.rst | 6 +- .../api/types/TSRecordDataType.en.rst | 2 +- .../api/types/TSRecordUpdateType.en.rst | 6 +- doc/developer-guide/plugins/actions/index.en.rst | 4 +- doc/developer-guide/plugins/configuration.en.rst | 16 +- .../plugins/example-plugins/blacklist/index.en.rst | 2 +- .../working-with-http-header-functions.en.rst | 6 +- .../query-remap/example-query-remap.en.rst | 24 +- .../http-alternate-selection.en.rst | 38 ++-- .../http-transactions.en.rst | 32 +-- .../plugins/hooks-and-transactions/index.en.rst | 2 +- .../trafficserver-timers.en.rst | 4 +- doc/developer-guide/plugins/mutexes.en.rst | 234 +++++++++---------- doc/developer-guide/skeleton | 28 +-- doc/doap.rdf | 8 +- doc/mainpage.doc | 2 +- example/add-header/readme.txt | 22 +- example/append-transform/readme.txt | 32 +-- example/basic-auth/readme.txt | 28 +-- example/cppapi/boom/README.txt | 30 +-- example/file-1/readme.txt | 20 +- example/null-transform/readme.txt | 60 ++--- example/output-header/readme | 4 +- example/protocol/README.txt | 4 +- example/protocol/test/ProtocolClientTest.java | 24 +- example/protocol/test/ProtocolServerTest.java | 14 +- example/redirect-1/readme.txt | 4 +- example/thread-1/readme.txt | 10 +- example/thread-pool/README.txt | 8 +- example/thread-pool/TESTPLAN.txt | 24 +- example/thread-pool/include/Makefile.am | 4 +- example/thread-pool/include/gen_inc.sh | 2 +- .../thread-pool/test/SDKTest/SDKtest_server.config | 2 +- example/thread-pool/test/SynTest/Tests/Psi/1.cfg | 2 +- example/thread-pool/test/SynTest/Tests/Psi/10.cfg | 4 +- example/thread-pool/test/SynTest/Tests/Psi/11.cfg | 2 +- example/thread-pool/test/SynTest/Tests/Psi/12.cfg | 2 +- example/thread-pool/test/SynTest/Tests/Psi/13.cfg | 2 +- example/thread-pool/test/SynTest/Tests/Psi/2.cfg | 2 +- example/thread-pool/test/SynTest/Tests/Psi/3.cfg | 2 +- example/thread-pool/test/SynTest/Tests/Psi/4.cfg | 2 +- example/thread-pool/test/SynTest/Tests/Psi/5.cfg | 2 +- example/thread-pool/test/SynTest/Tests/Psi/6.cfg | 2 +- example/thread-pool/test/SynTest/Tests/Psi/7.cfg | 2 +- example/thread-pool/test/SynTest/Tests/Psi/8.cfg | 2 +- example/thread-pool/test/SynTest/Tests/Psi/9.cfg | 2 +- .../test/SynTest/Tests/Psi/psi_files/tc13_file.txt | 2 +- example/thread-pool/test/SynTest/system.cfg | 10 +- example/thread-pool/test/SynTest/tests_psi.cfg | 10 +- iocore/cache/Makefile.am | 2 +- iocore/cache/Notes | 2 +- iocore/dns/Makefile.am | 2 +- lib/perl/README | 4 +- lib/perl/lib/Apache/TS.pm.in | 4 +- lib/perl/lib/Apache/TS/AdminClient.pm | 18 +- lib/perl/lib/Apache/TS/Config/Records.pm | 10 +- lib/perl/t/Apache-TS-AdminClient.t | 2 +- lib/records/test_RecProcess.i | 14 +- lib/records/test_records.config | 8 +- lib/tsconfig/TsConfigSyntax.c | 251 ++++++++++++--------- lib/wccp/Makefile.am | 2 +- plugins/esi/README.combo | 2 +- plugins/esi/handlers.cfg | 2 +- plugins/experimental/ats_pagespeed/Makefile | 2 +- .../ats_pagespeed/Makefile.psol_source | 4 +- plugins/experimental/ats_pagespeed/README.md | 8 +- plugins/experimental/ats_pagespeed/gzip/Makefile | 2 +- plugins/experimental/ats_pagespeed/gzip/README | 4 +- plugins/experimental/buffer_upload/README | 8 +- plugins/experimental/cache_range_requests/README | 4 +- plugins/experimental/collapsed_connection/README | 6 +- plugins/experimental/custom_redirect/README | 10 +- plugins/experimental/geoip_acl/README | 4 +- plugins/experimental/money_trace/Makefile.inc | 2 +- plugins/experimental/money_trace/README | 14 +- plugins/experimental/mysql_remap/README | 12 +- plugins/experimental/mysql_remap/sample.ini | 2 +- .../ssl_cert_loader/ssl_cert_loader.cfg | 28 +-- plugins/experimental/ssl_cert_loader/ssl_start.cfg | 10 +- .../stale_while_revalidate/Makefile.tsxs | 2 +- plugins/experimental/ts_lua/ci/.luacov | 2 +- plugins/experimental/ts_lua/ci/README | 6 +- plugins/experimental/ts_lua/ci/module_test.lua | 10 +- plugins/experimental/ts_lua/ci/script_test.lua | 4 +- .../experimental/ts_lua/example/test_closure.lua | 2 +- .../ts_lua/example/test_global_hook.lua | 4 +- .../experimental/ts_lua/example/test_txn_hook.lua | 4 +- plugins/experimental/webp_transform/README | 2 +- plugins/gzip/README | 4 +- plugins/gzip/sample.gzip.config | 2 +- plugins/healthchecks/README | 2 +- proxy/ClassH.txt | 30 +-- proxy/InkAPI-ensure-funcs-present.pl | 4 +- proxy/README-stats.otl | 30 +-- .../body_factory/default/access#redirect_url | 22 +- .../body_factory/default/interception#no_host | 2 +- .../body_factory/default/request#cycle_detected | 2 +- .../body_factory/default/request#syntax_error | 2 +- proxy/config/body_factory/default/timeout#activity | 2 +- .../config/body_factory/default/timeout#inactivity | 2 +- proxy/config/cache.config.default | 2 +- proxy/config/cluster.config.default | 2 +- proxy/config/hosting.config.default | 14 +- proxy/config/icp.config.default | 4 +- proxy/config/parent.config.default | 10 +- proxy/config/socks.config.default | 2 +- proxy/config/splitdns.config.default | 22 +- proxy/config/volume.config.default | 20 +- proxy/congest/FeatureSpec.txt | 158 ++++++------- proxy/example_alarm_bin.sh | 2 +- proxy/http/README.via | 34 +-- proxy/http/stats.memo | 54 ++--- proxy/http/test_http_client.pl | 26 +-- proxy/http/test_proxy.pl | 28 +-- proxy/issues.txt | 4 +- proxy/regression.pl | 2 +- rc/trafficserver.in | 26 +-- tools/http_load/http_load.c | 2 +- tools/http_load/merge_stats.pl | 2 +- tools/jtest/README | 2 +- tools/jtest/README.zh.md | 8 +- tools/reports/commits_since.sh | 2 +- tools/traffic_shell.pl | 8 +- tools/tsxs.in | 6 +- 167 files changed, 1156 insertions(+), 1111 deletions(-) diff --git a/.clang-format b/.clang-format index 747bca2..cb7e25e 100644 --- a/.clang-format +++ b/.clang-format @@ -19,7 +19,7 @@ AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: false BinPackArguments: true BinPackParameters: true -BraceWrapping: +BraceWrapping: AfterClass: true AfterControlStatement: false AfterEnum: false @@ -48,7 +48,7 @@ DisableFormat: false ExperimentalAutoDetectBinPacking: false ForEachMacros: [ forv_Vec, for_Vec, forp_Vec, foreach, Q_FOREACH, BOOST_FOREACH ] SortIncludes: false -IncludeCategories: +IncludeCategories: - Regex: '^"(llvm|llvm-c|clang|clang-c)/' Priority: 2 - Regex: '^(<|"(gtest|isl|json)/)' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9fdd4a1..d1947f0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,16 +16,16 @@ New Issues process replacing old Jira 1. If there is an issue/feature, an existing Jira Ticket, and no code, then create a Github _Issue_. Copy the relevant information into the Github _Issue_ and request the Jira Ticket to be closed. Hopefully this use case - won’t happen very often. + won’t happen very often. 2. If there is an issue/feature and no code, then create a Github _Issue_. When there is code later, create a Github Pull Request and reference the - Github _Issue_. + Github _Issue_. 3. If there is an issue/feature and code, then create a Github Pull Request. If there is an existing Jira Ticket or Github _Issue_ refer to the Ticket or _Issue_ in the _PR_. Creating a Github _Issue_ is not required for a - Github Pull Request. + Github Pull Request. Making a good PR or Issue @@ -48,16 +48,16 @@ are a few simple rules to follow: 5. Make sure you set the appropriate _Milesstone_, _Labels_, _Assignees_ and _Reviewers_. - + 6. If the _PR_ is a backport, or intended to be backported, please make sure to add the **Backport** label. - + 7. If the _PR_ is a Work-In-Progress, and not ready to commit, mark it with the **WIP** label. 8. Make sure you run **clang-format** before making the _PR_. This is easiest done with e.g. "make clang-format", which works on OSX and Linux. - + 9. When making backports, make sure you mark the _PR_ for the appropriate Github branch (e.g. **6.2.x**). @@ -75,13 +75,13 @@ merge any _PR_ after review. A few requirements before merging must be met: * Make sure all attributes on the _PR_ and issue is satisfied, such as Milestone and Labels. - + * Only merge a _PR_ that have at least one review approval, and no pending requested changes. - + * Make sure the _PR_ is for the _master_ branch, only the RM should merge backport requested for her or his release branch. - + * If there is also an open _Issue_ associated with the _PR_, make sure to close the _Issue_ as well. diff --git a/LICENSE b/LICENSE index b2e6b61..d0acf05 100644 --- a/LICENSE +++ b/LICENSE @@ -216,7 +216,7 @@ You may obtain a copy of the License at Mersenne Twister License Copyright (C) 2004, Makoto Matsumoto and Takuji Nishimura, - All rights reserved. + All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -229,8 +229,8 @@ Mersenne Twister License notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - 3. The names of its contributors may not be used to endorse or promote - products derived from this software without specific prior written + 3. The names of its contributors may not be used to endorse or promote + products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS diff --git a/build/crypto.m4 b/build/crypto.m4 index 5381798..3a3b03b 100644 --- a/build/crypto.m4 +++ b/build/crypto.m4 @@ -90,7 +90,7 @@ AC_DEFUN([TS_CHECK_CRYPTO_SNI], [ TS_ADDTO(LIBS, [$OPENSSL_LIBS]) AC_CHECK_HEADERS(openssl/ssl.h openssl/ts.h) - AC_CHECK_HEADERS(openssl/tls1.h, [], [], + AC_CHECK_HEADERS(openssl/tls1.h, [], [], [ #if HAVE_OPENSSL_SSL_H #include #include diff --git a/build/pkg.m4 b/build/pkg.m4 index f26f84c..b7ca359 100644 --- a/build/pkg.m4 +++ b/build/pkg.m4 @@ -1,6 +1,6 @@ # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) -# +# # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify @@ -123,7 +123,7 @@ if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else + else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs diff --git a/build/tcl.m4 b/build/tcl.m4 index 5113cd8..baff3b2 100644 --- a/build/tcl.m4 +++ b/build/tcl.m4 @@ -287,7 +287,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [ # Load the tclConfig.sh file # # Arguments: -# +# # Requires the following vars to be set: # TCL_BIN_DIR # @@ -373,7 +373,7 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [ # Load the tkConfig.sh file # # Arguments: -# +# # Requires the following vars to be set: # TK_BIN_DIR # @@ -528,7 +528,7 @@ AC_DEFUN([SC_BUILD_TCLSH], [ # # Arguments: # none -# +# # Results: # # Adds the following arguments to configure: @@ -573,7 +573,7 @@ AC_DEFUN([SC_ENABLE_SHARED], [ # # Arguments: # none -# +# # Results: # # Adds the following arguments to configure: @@ -621,7 +621,7 @@ AC_DEFUN([SC_ENABLE_FRAMEWORK], [ # # Arguments: # none -# +# # Results: # # Adds the following arguments to configure: @@ -764,13 +764,13 @@ AC_DEFUN([SC_ENABLE_THREADS], [ # # Arguments: # none -# +# # Requires the following vars to be set in the Makefile: # CFLAGS_DEBUG # CFLAGS_OPTIMIZE # LDFLAGS_DEBUG # LDFLAGS_OPTIMIZE -# +# # Results: # # Adds the following arguments to configure: @@ -838,7 +838,7 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [ # # Arguments: # none -# +# # Results: # # Adds the following arguments to configure: @@ -868,14 +868,14 @@ AC_DEFUN([SC_ENABLE_LANGINFO], [ if test $tcl_cv_langinfo_h = yes; then AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?]) fi - else + else AC_MSG_RESULT([$langinfo_ok]) fi ]) #-------------------------------------------------------------------- # SC_CONFIG_MANPAGES -# +# # Decide whether to use symlinks for linking the manpages, # whether to compress the manpages after installation, and # whether to add a package name suffix to the installed @@ -1049,7 +1049,7 @@ AC_DEFUN([SC_CONFIG_SYSTEM], [ # TCL_SHLIB_LD_EXTRAS - Additional element which are added to SHLIB_LD_LIBS # TK_SHLIB_LD_EXTRAS for the build of Tcl and Tk, but not recorded in the # tclConfig.sh, since they are only used for the build -# of Tcl and Tk. +# of Tcl and Tk. # Examples: MacOS X records the library version and # compatibility version in the shared library. But # of course the Tcl version of this is only used for Tcl. @@ -1447,7 +1447,7 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" CFLAGS_OPTIMIZE="-O2" - # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings + # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings # when you inline the string and math operations. Turn this off to # get rid of the warnings. #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" @@ -1712,8 +1712,8 @@ dnl AC_CHECK_TOOL(AR, ar) eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' done]) LIBS="$LIBS -framework CoreFoundation" - AC_TRY_LINK([#include ], - [CFBundleRef b = CFBundleGetMainBundle();], + AC_TRY_LINK([#include ], + [CFBundleRef b = CFBundleGetMainBundle();], tcl_cv_lib_corefoundation=yes, tcl_cv_lib_corefoundation=no) AS_IF([test "$fat_32_64" = yes], [ @@ -1723,7 +1723,7 @@ dnl AC_CHECK_TOOL(AR, ar) LIBS=$hold_libs]) AS_IF([test $tcl_cv_lib_corefoundation = yes], [ LIBS="$LIBS -framework CoreFoundation" - AC_DEFINE(HAVE_COREFOUNDATION, 1, + AC_DEFINE(HAVE_COREFOUNDATION, 1, [Do we have access to Darwin CoreFoundation.framework?]) ], [tcl_corefoundation=no]) AS_IF([test "$fat_32_64" = yes -a $tcl_corefoundation = yes],[ @@ -1732,8 +1732,8 @@ dnl AC_CHECK_TOOL(AR, ar) for v in CFLAGS CPPFLAGS LDFLAGS; do eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' done - AC_TRY_LINK([#include ], - [CFBundleRef b = CFBundleGetMainBundle();], + AC_TRY_LINK([#include ], + [CFBundleRef b = CFBundleGetMainBundle();], tcl_cv_lib_corefoundation_64=yes, tcl_cv_lib_corefoundation_64=no) for v in CFLAGS CPPFLAGS LDFLAGS; do @@ -1761,7 +1761,7 @@ dnl AC_CHECK_TOOL(AR, ar) CFLAGS_OPTIMIZE="" # Optimizer is buggy AC_DEFINE(_OE_SOCKETS, 1, # needed in sys/socket.h [Should OS/390 do the right thing with sockets?]) - ;; + ;; OSF1-1.0|OSF1-1.1|OSF1-1.2) # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 SHLIB_CFLAGS="" @@ -2178,7 +2178,7 @@ dnl # preprocessing tests use only CPPFLAGS. # # Arguments: # none -# +# # Results: # # Defines only one of the following vars: @@ -2297,7 +2297,7 @@ int main() { # # Arguments: # none -# +# # Results: # # Defines some of the following vars: @@ -2383,7 +2383,7 @@ closedir(d); # # Arguments: # none -# +# # Results: # # Sets the the following vars: @@ -2461,13 +2461,13 @@ AC_DEFUN([SC_PATH_X], [ # SC_BLOCKING_STYLE # # The statements below check for systems where POSIX-style -# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. +# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. # On these systems (mostly older ones), use the old BSD-style # FIONBIO approach instead. # # Arguments: # none -# +# # Results: # # Defines some of the following vars: @@ -2511,7 +2511,7 @@ AC_DEFUN([SC_BLOCKING_STYLE], [ # # Arguments: # none -# +# # Results: # # Defines some of the following vars: @@ -2583,7 +2583,7 @@ AC_DEFUN([SC_TIME_HANDLER], [ # # Arguments: # none -# +# # Results: # # Might defines some of the following vars: @@ -2633,7 +2633,7 @@ AC_DEFUN([SC_BUGGY_STRTOD], [ # # Arguments: # None. -# +# # Results: # # Might append to the following vars: @@ -2706,7 +2706,7 @@ AC_DEFUN([SC_TCL_LINK_LIBS], [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -2752,7 +2752,7 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -2774,8 +2774,8 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [ # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... - AC_TRY_COMPILE(,[switch (0) { - case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; + AC_TRY_COMPILE(,[switch (0) { + case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; }],tcl_cv_type_64bit=${tcl_type_64bit})]) if test "${tcl_cv_type_64bit}" = none ; then AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?]) @@ -2894,7 +2894,7 @@ AC_DEFUN([SC_TCL_CHECK_BROKEN_FUNC],[ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -2961,7 +2961,7 @@ AC_DEFUN([SC_TCL_GETHOSTBYADDR_R], [AC_CHECK_FUNC(gethostbyaddr_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -3037,7 +3037,7 @@ AC_DEFUN([SC_TCL_GETHOSTBYNAME_R], [AC_CHECK_FUNC(gethostbyname_r, [ # # Arguments: # None -# +# # Results: # Might define the following vars: # HAVE_GETADDRINFO @@ -3069,7 +3069,7 @@ AC_DEFUN([SC_TCL_GETADDRINFO], [AC_CHECK_FUNC(getaddrinfo, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -3129,7 +3129,7 @@ AC_DEFUN([SC_TCL_GETPWUID_R], [AC_CHECK_FUNC(getpwuid_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -3189,7 +3189,7 @@ AC_DEFUN([SC_TCL_GETPWNAM_R], [AC_CHECK_FUNC(getpwnam_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -3249,7 +3249,7 @@ AC_DEFUN([SC_TCL_GETGRGID_R], [AC_CHECK_FUNC(getgrgid_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: diff --git a/build/tcmalloc.m4 b/build/tcmalloc.m4 index 99657ca..561a1bc 100644 --- a/build/tcmalloc.m4 +++ b/build/tcmalloc.m4 @@ -45,7 +45,7 @@ AC_ARG_WITH([tcmalloc], [AC_HELP_STRING([--with-tcmalloc=DIR], [use the tcmalloc fi AC_SEARCH_LIBS([tc_cfree], ${with_tcmalloc_lib}, [tcmalloc_have_lib=1]) if test "$tcmalloc_have_lib" != "0"; then - has_tcmalloc=1 + has_tcmalloc=1 fi fi ]) diff --git a/ci/jenkins/bin/clang-analyzer.sh b/ci/jenkins/bin/clang-analyzer.sh index eb45ec6..5e75eae 100755 --- a/ci/jenkins/bin/clang-analyzer.sh +++ b/ci/jenkins/bin/clang-analyzer.sh @@ -72,6 +72,6 @@ fi if [ -x "/admin/bin/clean-clang.sh" ]; then /admin/bin/clean-clang.sh fi - + # Exit with the scan-build exit code (thanks to --status-bugs) exit $status diff --git a/cmd/traffic_wccp/readme.txt b/cmd/traffic_wccp/readme.txt index d86e8c3..f75ed5d 100644 --- a/cmd/traffic_wccp/readme.txt +++ b/cmd/traffic_wccp/readme.txt @@ -3,7 +3,7 @@ alone program that speaks the client side of the WCCP cache protocol. It can be used instead of the built in WCCP feature in Apache traffic server. This can be beneficial if you have multiple programs running on the same -computer that are relying on WCCP to redirect traffic from the router to +computer that are relying on WCCP to redirect traffic from the router to the computer. Since it relies on the wccp library, the wccp_client is only build if apache @@ -12,7 +12,7 @@ traffic server is configured with --enable-wccp. The overall Apache Traffic Server WCCP configuration documentation is at https://docs.trafficserver.apache.org/en/latest/admin/transparent-proxy/wccp-configuration.en.html. -The wccp-client takes the following arguments. +The wccp-client takes the following arguments. --address IP address to bind. --router Booststrap IP address for routers. --service Path to service group definitions. @@ -26,17 +26,17 @@ in this directory. In this file you define your MD5 security password (highly recommended), and you define your service groups. For each service group you define how the service should be recognized (protocol and port), the routers you are communicating with, whether you are using GRE or basic L2 -routing to redirect packets. +routing to redirect packets. In addition, you can specify a proc-name, a path -to a process pid file. If the proc-name is present, the wccp client will -only advertise the associated service group, if the process is currently +to a process pid file. If the proc-name is present, the wccp client will +only advertise the associated service group, if the process is currently up and running. So if your computer is hosting three services, and one of -them goes down, the wccp client could stop advertising the service group +them goes down, the wccp client could stop advertising the service group associated with the down service thus stopping the router from redirecting that traffic, but continue to advertise and maintain the redireciton for the other two services. The current WCCP implementation associated with ATS only supports one cache client per service group per router. The cache assignment logic current -assigns the current cache client to all buckets. +assigns the current cache client to all buckets. diff --git a/doc/admin-guide/configuration/hierachical-caching.en.rst b/doc/admin-guide/configuration/hierachical-caching.en.rst index 32964c9..f2202c1 100644 --- a/doc/admin-guide/configuration/hierachical-caching.en.rst +++ b/doc/admin-guide/configuration/hierachical-caching.en.rst @@ -98,19 +98,19 @@ node. Interaction with Remap.config ----------------------------- -If remap rules are required (:ts:cv:`proxy.config.reverse_proxy.enabled`), -when a request comes in to a child node, its :file:`remap.config` is evaluated before -parent selection. This means that the client request is translated according to the -remap rule, and therefore, any parent selection should be made against the remapped -host name. This is true regardless of pristine host headers +If remap rules are required (:ts:cv:`proxy.config.reverse_proxy.enabled`), +when a request comes in to a child node, its :file:`remap.config` is evaluated before +parent selection. This means that the client request is translated according to the +remap rule, and therefore, any parent selection should be made against the remapped +host name. This is true regardless of pristine host headers (:ts:cv:`proxy.config.url_remap.pristine_host_hdr`) being enabled or not. The parent node will receive the translated request (and thus needs to be configured to accept it). Example ~~~~~~~ -The client makes a request to Traffic Server for http://example.com. The origin server -for the request is http://origin.example.com; the parent node is ``parent1.example.com``, +The client makes a request to Traffic Server for http://example.com. The origin server +for the request is http://origin.example.com; the parent node is ``parent1.example.com``, and the child node is configured as a reverse proxy. If the child's :file:`remap.config` contains @@ -126,7 +126,7 @@ line similar to ``map http://origin.example.com http://origin.example.com`` -With this example, if parent1.example.com is down, the child node would automatically +With this example, if parent1.example.com is down, the child node would automatically directly contact the ``origin.example.com`` on a cache miss. @@ -157,7 +157,7 @@ the configuration adjustments detailed below. You need to configure the child cache only. Assuming the parent nodes are configured to serve the child's origin server, no additional configuration is - needed for the nodes acting as Traffic Server parent caches. + needed for the nodes acting as Traffic Server parent caches. #. Enable the parent caching option by adjusting :ts:cv:`proxy.config.http.parent_proxy_routing_enable` in diff --git a/doc/admin-guide/configuration/transparent-proxy.en.rst b/doc/admin-guide/configuration/transparent-proxy.en.rst index 7937f53..31ce623 100644 --- a/doc/admin-guide/configuration/transparent-proxy.en.rst +++ b/doc/admin-guide/configuration/transparent-proxy.en.rst @@ -64,7 +64,7 @@ proxy, i.e. a connection initiated by the proxy to an origin server In most situations these two types of transparency are combined, but that is not required. Traffic Server supports transparency independently on the two -sides. +sides. .. important:: diff --git a/doc/admin-guide/configuration/transparent-proxy/build.en.rst b/doc/admin-guide/configuration/transparent-proxy/build.en.rst index e547a06..10337a3 100644 --- a/doc/admin-guide/configuration/transparent-proxy/build.en.rst +++ b/doc/admin-guide/configuration/transparent-proxy/build.en.rst @@ -10,9 +10,9 @@ Building ATS for transparency 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 diff --git a/doc/admin-guide/configuration/transparent-proxy/router-inline.en.rst b/doc/admin-guide/configuration/transparent-proxy/router-inline.en.rst index 0e9060a..9f033e6 100644 --- a/doc/admin-guide/configuration/transparent-proxy/router-inline.en.rst +++ b/doc/admin-guide/configuration/transparent-proxy/router-inline.en.rst @@ -8,9 +8,9 @@ Inline on a Linux router 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 diff --git a/doc/admin-guide/configuration/transparent-proxy/wccp-configuration.en.rst b/doc/admin-guide/configuration/transparent-proxy/wccp-configuration.en.rst index 99da91c..8611c08 100644 --- a/doc/admin-guide/configuration/transparent-proxy/wccp-configuration.en.rst +++ b/doc/admin-guide/configuration/transparent-proxy/wccp-configuration.en.rst @@ -8,9 +8,9 @@ WCCP Configuration 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 diff --git a/doc/admin-guide/configuration/transparent-proxy/wccp-service-config.en.rst b/doc/admin-guide/configuration/transparent-proxy/wccp-service-config.en.rst index eb7d44c..cd841b5 100644 --- a/doc/admin-guide/configuration/transparent-proxy/wccp-service-config.en.rst +++ b/doc/admin-guide/configuration/transparent-proxy/wccp-service-config.en.rst @@ -49,7 +49,7 @@ Attributes in this section Services Section ================ -In the services section you can define a list of service groups. Each top level entry is a separate service group. +In the services section you can define a list of service groups. Each top level entry is a separate service group. Service group attributes include @@ -57,9 +57,9 @@ Service group attributes include * description – A description of the service. Again, not used in the rest of the WCCP processing. -* id - The security group ID. It must match the service group ID that has been defined on the associated WCCP router. This is the true service group identifier from the WCCP perspective. +* id - The security group ID. It must match the service group ID that has been defined on the associated WCCP router. This is the true service group identifier from the WCCP perspective. -* type – This defines the type of service group either “STANDARD” or “DYNAMIC”. There is one standard defined service group, HTTP with the id of 0. The 4/2001 RFC indicates that id’s 0-50 are reserved for well known service groups. But more recent 8/2012 RFC indicates that values 0 through 254 are valid service id’s for dynamic services. To avoid differences with older WCCP routers, you probably want to avoid dynamic service ID’s 0 through 50. +* type – This defines the type of service group either “STANDARD” or “DYNAMIC”. There is one standard defined service group, HTTP with the id of 0. The 4/2001 RFC indicates that id’s 0-50 are reserved for well known service groups. But more recent 8/2012 RFC indicates that values 0 through 254 are valid service id’s for dynamic services. To avoid differences with older WCCP routers, you probably want to avoid dynamic service ID’s 0 through 50. * priority – This is a value from 0 to 255. The higher number is a higher priority. Well known (STANDARD) services are set to a value of 240. If there are multiple service groups that could match a given packet, the higher priority service group is applied. RFC For example, you have service group 100 defined for packets with destination port 80, and service group 101 defined for packets with source port 1024. For a packet with destination port set to 80 and source port set to 1024, [...] @@ -68,9 +68,9 @@ Service group attributes include * assignment – WCCP supports multiple WCCP clients supporting a single service group. However, the current WCCP client implementation in Traffic Server assumes there is only a single WCCP client, and so creates assignment tables that will direct all traffic to that WCCP client. The assignment type is either hash or mask, and if it is not set, it defaults to hash. If Traffic Server ever supports more than one cache, it will likely only support a balanced hash assignment. The mask/valu [...] * primary-hash – This is the element of the packet that is used to compute the primary key. The value options are src_ip, dst_ip, src_port, or dst_port. This entry is a list, so multiple values can be specified. In that case, all the specified packet attributes will be used to compute the hash bucket. In the current implementation, the primary hash value does not matter, since the client always generates a hash table that directs all matching traffic to it. But if multiple clients a [...] -* alt-hash – The protocol supports a two level hash. This attribute is a list with the same value options as for primary-hash. Again, since the current Traffic Server implementation only creates assignment tables to a single client, specifying the alt-hash values does nothing. +* alt-hash – The protocol supports a two level hash. This attribute is a list with the same value options as for primary-hash. Again, since the current Traffic Server implementation only creates assignment tables to a single client, specifying the alt-hash values does nothing. -* ports – This is a list of port values. Up to 8 port values may be included in a service group definition. +* ports – This is a list of port values. Up to 8 port values may be included in a service group definition. * port-type – This attribute can have the value of src or dst. If not specified, it defaults to dst. It indicates whether the port values should be interpreted as source ports or destination ports. diff --git a/doc/admin-guide/configuring-traffic-server.en.rst b/doc/admin-guide/configuring-traffic-server.en.rst index ef6146e..298a910 100644 --- a/doc/admin-guide/configuring-traffic-server.en.rst +++ b/doc/admin-guide/configuring-traffic-server.en.rst @@ -58,7 +58,7 @@ variables, see :ref:`configuration-variables`. Configure Traffic Server Using Configuration Files ================================================== -You can change +You can change Traffic Server configuration options by manually editing specific variables in :file:`records.config`. diff --git a/doc/admin-guide/files/congestion.config.en.rst b/doc/admin-guide/files/congestion.config.en.rst index 47af214..9cc8140 100644 --- a/doc/admin-guide/files/congestion.config.en.rst +++ b/doc/admin-guide/files/congestion.config.en.rst @@ -5,9 +5,9 @@ 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 @@ -21,7 +21,7 @@ congestion.config .. configfile:: congestion.config -The :file:`congestion.config` file (by default, located in +The :file:`congestion.config` file (by default, located in ``/usr/local/etc/trafficserver/``) enables you to configure Traffic Server to stop forwarding HTTP requests to origin servers when they become congested, and then send the client a message to retry the congested @@ -30,7 +30,7 @@ navigate to the Traffic Server bin directory; then run the :option:`traffic_ctl config reload` command to apply changes. When you apply the changes to a node in a cluster, Traffic Server automatically applies the changes to all other nodes in the cluster. Traffic Server uses the -:file:`congestion.config` file only if you enable the +:file:`congestion.config` file only if you enable the :ts:cv:`proxy.config.http.congestion_control.enabled` option. You can create rules in the congestion.config file to specify: diff --git a/doc/admin-guide/files/hosting.config.en.rst b/doc/admin-guide/files/hosting.config.en.rst index 3052264..b2f73fc 100644 --- a/doc/admin-guide/files/hosting.config.en.rst +++ b/doc/admin-guide/files/hosting.config.en.rst @@ -5,9 +5,9 @@ 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 @@ -21,7 +21,7 @@ hosting.config .. configfile:: hosting.config -The :file:`hosting.config` file (by default, located in +The :file:`hosting.config` file (by default, located in ``/usr/local/etc/trafficserver/``) you to assign cache volumes to specific origin servers and/or domains so that you can manage cache space efficiently and restrict disk usage. For step-by-step instructions diff --git a/doc/admin-guide/files/splitdns.config.en.rst b/doc/admin-guide/files/splitdns.config.en.rst index 6697648..dd59659 100644 --- a/doc/admin-guide/files/splitdns.config.en.rst +++ b/doc/admin-guide/files/splitdns.config.en.rst @@ -5,9 +5,9 @@ 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 diff --git a/doc/admin-guide/files/volume.config.en.rst b/doc/admin-guide/files/volume.config.en.rst index 7c6d594..ebbce70 100644 --- a/doc/admin-guide/files/volume.config.en.rst +++ b/doc/admin-guide/files/volume.config.en.rst @@ -5,9 +5,9 @@ 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 diff --git a/doc/admin-guide/plugins/authproxy.en.rst b/doc/admin-guide/plugins/authproxy.en.rst index 95f262b..02d3a39 100644 --- a/doc/admin-guide/plugins/authproxy.en.rst +++ b/doc/admin-guide/plugins/authproxy.en.rst @@ -35,11 +35,11 @@ plugin. you can disable this behavior by setting :ts:cv:`proxy.config.http.doc_in_cache_skip_dns` to ``0`` in :file:`records.config`. -Note that the authorization request will need to match a remap rule -(which, as a standalone remap rule, does not need to call the +Note that the authorization request will need to match a remap rule +(which, as a standalone remap rule, does not need to call the AuthProxy plugin). If a second remap rule is required, by default, -the authorization request will not have the same Host header as -the request from the client. It could be added using the +the authorization request will not have the same Host header as +the request from the client. It could be added using the ``header_rewrite`` plugin (set-header Host "pristine_host.example.com"). Plugin Options @@ -97,7 +97,7 @@ HTTP request to a `HEAD` request and sending that to the origin server map http://cache.example.com http://origin.internal.com/ \ @plugin=authproxy.so @pparam=--auth-transform=head - map http://origin.internal.com http://origin.internal.com/ + map http://origin.internal.com http://origin.internal.com/ In this example, the request is directed to a local authentication server @@ -107,4 +107,4 @@ that authorizes the request based on internal policy rules:: @plugin=authproxy.so @pparam=--auth-transform=redirect @pparam=--auth-host=127.0.0.1 @pparam=--auth-port=9000 map http://origin.internal.com/ http://origin.internal.com/ \ - @plugin=authproxy.so @pparam=--auth-transform=redirect @pparam=--auth-host=127.0.0.1 @pparam=--auth-port=9000 + @plugin=authproxy.so @pparam=--auth-transform=redirect @pparam=--auth-host=127.0.0.1 @pparam=--auth-port=9000 diff --git a/doc/admin-guide/plugins/background_fetch.en.rst b/doc/admin-guide/plugins/background_fetch.en.rst index 0ff4cdd..3277e1f 100644 --- a/doc/admin-guide/plugins/background_fetch.en.rst +++ b/doc/admin-guide/plugins/background_fetch.en.rst @@ -30,8 +30,8 @@ is not able to cache request / responses with byte ranges. Using the plugin ---------------- -This plugin functions as either a global or per remap plugin, and it takes -an optional argument for specifying a config file with inclusion or +This plugin functions as either a global or per remap plugin, and it takes +an optional argument for specifying a config file with inclusion or exclusion criteria. The config file can be specified both via an absolute path or via a relative path to the install dir @@ -66,7 +66,7 @@ original client request, which continues as normal. Only one background fetch per URL is ever performed, making sure we do not accidentally put pressure on the origin servers. -The plugin now supports a config file that can specify exclusion or inclusion of +The plugin now supports a config file that can specify exclusion or inclusion of background fetch based on any arbitrary header or client-ip:: background_fetch.so --config diff --git a/doc/admin-guide/plugins/balancer.en.rst b/doc/admin-guide/plugins/balancer.en.rst index ad3bb2b..48b9a17 100644 --- a/doc/admin-guide/plugins/balancer.en.rst +++ b/doc/admin-guide/plugins/balancer.en.rst @@ -10,9 +10,9 @@ Balancer Plugin 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 diff --git a/doc/admin-guide/plugins/buffer_upload.en.rst b/doc/admin-guide/plugins/buffer_upload.en.rst index 3513936..7cb8140 100644 --- a/doc/admin-guide/plugins/buffer_upload.en.rst +++ b/doc/admin-guide/plugins/buffer_upload.en.rst @@ -10,9 +10,9 @@ Buffer Upload Plugin 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 @@ -52,12 +52,12 @@ to transaction interruption or traffic server crash) Trigger POST buffering on certain URLs ====================================== -1. Certain URLs will be provided in a plain text file (one URL each line) -2. Specify filename in config file by "url_list_file" -3. max length of each URL is 4096 (configurable in config file) +1. Certain URLs will be provided in a plain text file (one URL each line) +2. Specify filename in config file by "url_list_file" +3. max length of each URL is 4096 (configurable in config file) 4. use exact match, don't support regex for now -Other Features +Other Features ============== 1. Default buffering mode is disk aio buffering mode. To turn off disk buffering, add a "use_disk_buffer 0" line in @@ -70,13 +70,13 @@ Configuration File sample config file :: - use_disk_buffer 1 - convert_url 1 - chunk_size 1024 - url_list_file /tmp/url_list.conf - max_url_length 10000 + use_disk_buffer 1 + convert_url 1 + chunk_size 1024 + url_list_file /tmp/url_list.conf + max_url_length 10000 base_dir /tmp/test1 - subdir_num 100 - thread_num 10 + subdir_num 100 + thread_num 10 mem_buffer_size 40000 diff --git a/doc/admin-guide/plugins/collapsed_forwarding.en.rst b/doc/admin-guide/plugins/collapsed_forwarding.en.rst index 181bbb3..ab84577 100644 --- a/doc/admin-guide/plugins/collapsed_forwarding.en.rst +++ b/doc/admin-guide/plugins/collapsed_forwarding.en.rst @@ -115,7 +115,7 @@ Traffic Server supports several kind of connection collapse mechanisms including Read-While-Writer (RWW), Stale-While-Revalidate (SWR) etc each very effective dealing with a majority of the use cases that can result in the Thundering herd problem. - + For a large scale Video Streaming scenario, there’s a combination of a large number of revalidations (e.g. media playlists) and cache misses (e.g. media segments) that occur for the same file. Traffic Server’s @@ -128,13 +128,13 @@ the same file that are received before the response headers arrive are leaked upstream, which can result in a severe Thundering herd problem, depending on the network latencies (which impact the TTFB for the response headers) at a given instant of time. - + To address this limitation, Traffic Server supports a few Cache tuning solutions, such as Open Read Retry, and a new feature called Open Write Fail action from 6.0. To understand how these approaches work, it is important to understand the high level flow of how Traffic Server handles a GET request. - + On receiving a HTTP GET request, Traffic Server generates the cache key (basically, a hash of the request URL) and looks up for the directory entry (dirent) using the generated index. On a cache miss, the lookup @@ -162,13 +162,13 @@ mode:: 3.1). If write lock succeeds, download the object into cache and to the client in parallel 3.2). If write lock fails, disable cache, and download to the client in a proxy-only mode. 4). Done - + As can be seen above, if a majority of concurrent requests arrive before response headers are received, they hit (2.2) and (3.2) above. Open Read Retry can help to repeat (2) after a configured delay on 2.2, thereby increasing the chances for obtaining a read lock and being able to serve from the cache. - + However, the Open Read Retry can not help with the concurrent requests that hit (1.1) above, jumping to (3) directly. Only one such request will be able to obtain the exclusive write lock and all other requests are @@ -184,7 +184,7 @@ and performs an internal 3xx Redirect back to the same host, the configured number of times with the configured amount of delay between consecutive retries, allowing to be able to initiate RWW, whenever the response headers are received for the request that was allowed to go to the Origin. - + More details are available at diff --git a/doc/admin-guide/plugins/combo_handler.en.rst b/doc/admin-guide/plugins/combo_handler.en.rst index be07ea4..65c805c 100644 --- a/doc/admin-guide/plugins/combo_handler.en.rst +++ b/doc/admin-guide/plugins/combo_handler.en.rst @@ -10,9 +10,9 @@ Combo Handler Plugin 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 diff --git a/doc/admin-guide/plugins/esi.en.rst b/doc/admin-guide/plugins/esi.en.rst index 29595d8..f43f7cc 100644 --- a/doc/admin-guide/plugins/esi.en.rst +++ b/doc/admin-guide/plugins/esi.en.rst @@ -10,9 +10,9 @@ ESI Plugin 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 @@ -78,15 +78,15 @@ Enabling ESI esi.so -2. There are four options you can add to the above. +2. There are four options you can add to the above. -- "--private-response" will add private cache control and expires header to the processed ESI document. +- "--private-response" will add private cache control and expires header to the processed ESI document. - "--packed-node-support" will enable the support for using packed node, which will improve the performance of parsing - cached ESI document. + cached ESI document. - "--disable-gzip-output" will disable gzipped output, which will NOT gzip the output anyway. - "--first-byte-flush" will enable the first byte flush feature, which will flush content to users as soon as the entire ESI document is received and parsed without all ESI includes fetched (the flushing will stop at the ESI include markup - till that include is fetched). + till that include is fetched). 3. HTTP_COOKIE variable supported is turned off by default. You can turn it on with '-f' or '-handler option' @@ -99,9 +99,9 @@ And inside handler.conf you can provide the list of cookie name that is allowed. :: whitelistCookie A - whitelistCookie LOGIN + whitelistCookie LOGIN -We can also allow all cookie for HTTP_COOKIE variable by using a wildcard character. e.g. +We can also allow all cookie for HTTP_COOKIE variable by using a wildcard character. e.g. :: @@ -153,7 +153,7 @@ Useful Note 1. You can provide proper cache control header and the ESI response and ESI include response can be cached separately. It is extremely useful for rendering page with multiple modules. The page layout can be a ESI response with multiple ESI include include, each for different module. The page layour ESI response can be cached and each individual ESI - include can also be cached with different duration. + include can also be cached with different duration. 2. You should run the plugin without using "packed node support" because it is not fully tested. diff --git a/doc/admin-guide/plugins/geoip_acl.en.rst b/doc/admin-guide/plugins/geoip_acl.en.rst index cd1f96e..5413407 100644 --- a/doc/admin-guide/plugins/geoip_acl.en.rst +++ b/doc/admin-guide/plugins/geoip_acl.en.rst @@ -10,9 +10,9 @@ GeoIP ACLs Plugin 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 diff --git a/doc/admin-guide/plugins/healthchecks.en.rst b/doc/admin-guide/plugins/healthchecks.en.rst index 7c5182a..4f19479 100644 --- a/doc/admin-guide/plugins/healthchecks.en.rst +++ b/doc/admin-guide/plugins/healthchecks.en.rst @@ -45,7 +45,7 @@ This configuration may contain one or more lines of the format:: .. note:: This configuration is *not* reloadable. -The content of the file specified in the ``file-path``, if any, is sent as the +The content of the file specified in the ``file-path``, if any, is sent as the body of the response. The existence of the file is sufficient to get an "OK" status. Performance wise, everything is served out of memory, and it only stats / opens files as necessary. However, the content of the status file is diff --git a/doc/admin-guide/plugins/hipes.en.rst b/doc/admin-guide/plugins/hipes.en.rst index cc2651d..75d637d 100644 --- a/doc/admin-guide/plugins/hipes.en.rst +++ b/doc/admin-guide/plugins/hipes.en.rst @@ -10,9 +10,9 @@ HIPES Plugin 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 @@ -65,7 +65,7 @@ Notes on HIPES ============== HTTP Pipes (aka HIPES and pronounced "Hippies") allows data services to be pipelined together, as illustrated by the -example below. +example below. Example ======= @@ -74,30 +74,30 @@ Example 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/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 +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 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 -to this URL :: +to this URL :: http://127.0.0.1:8080/svc_case.php?case=u&url=http%3A%2F%2F127.0.0.1%2Ftest.txt 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. +the response and reverse the order before the response is sent back to the client by ATS. -Notes on reducing traffic +Notes on reducing traffic ========================= There can be significant overhead using HIPES because the data can traverse through ATS many times. Caching can be @@ -105,13 +105,13 @@ important to reduce traffic to services/through ATS and can be achieved via a pr 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 cache intermediate results. Below is an example of using -redirect. +redirect. 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``. +``url``. 2. HIPES plugin will instruct ATS to return a redirect response to this url :: @@ -122,5 +122,5 @@ for the following request :: 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.php`` will not pass through ATS and will pass to ``svc_reverse.php`` service instead. +``svc_case.php`` will not pass through ATS and will pass to ``svc_reverse.php`` service instead. diff --git a/doc/admin-guide/plugins/memcache.en.rst b/doc/admin-guide/plugins/memcache.en.rst index a32e9cc..48bbc52 100644 --- a/doc/admin-guide/plugins/memcache.en.rst +++ b/doc/admin-guide/plugins/memcache.en.rst @@ -10,9 +10,9 @@ Memcache Plugin 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 diff --git a/doc/admin-guide/plugins/money_trace.en.rst b/doc/admin-guide/plugins/money_trace.en.rst index b9b778a..c507eb9 100644 --- a/doc/admin-guide/plugins/money_trace.en.rst +++ b/doc/admin-guide/plugins/money_trace.en.rst @@ -23,11 +23,11 @@ Money Trace Plugin This is a remap plugin that allows ATS to participate in a distrbuted tracing system based upon the Comcast "Money" distributed tracing and monitoring library. The Comcast "Money" library has its roots in Google's Dapper and Twitters Zipkin systems. A money trace header or session id, is -attached to transaction and allows an operator with the appropriate logging systems in place, -to determine where errors and/or latency may exit. +attached to transaction and allows an operator with the appropriate logging systems in place, +to determine where errors and/or latency may exit. -Use of the library enables the tracing of a transaction through all systems that participate in -handling the request. See the documentation on this open source library at +Use of the library enables the tracing of a transaction through all systems that participate in +handling the request. See the documentation on this open source library at https://github.com/Comcast/money. How it Works @@ -36,8 +36,8 @@ How it Works This plugin checks incoming requests for the "X-MoneyTrace" header. If the header is not present no further processing takes place. However if the header is present, the plugin will check to to see if the request has been cached. If so, the plugin will add the "X-Moneytrace" header from the -incoming request to the cached response returned to the client as required by the money_trace -protocol. If the request has not been cached, the plugin will extends the trace context by creating a new +incoming request to the cached response returned to the client as required by the money_trace +protocol. If the request has not been cached, the plugin will extends the trace context by creating a new "X-MoneyTrace" header for inclusion in the outgoing request to a parent cache or origin server. The extended header includes the 'trace-id' from the incoming request, the incoming span-id becomes the outgoing parent-id and the plugin generates a new random long span id for the outgoing request. diff --git a/doc/admin-guide/plugins/mysql_remap.en.rst b/doc/admin-guide/plugins/mysql_remap.en.rst index 04cafda..f87ace0 100644 --- a/doc/admin-guide/plugins/mysql_remap.en.rst +++ b/doc/admin-guide/plugins/mysql_remap.en.rst @@ -10,9 +10,9 @@ MySQL Remap Plugin 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 @@ -75,7 +75,7 @@ The INI file should contain the following values:: mysql_host = localhost #default mysql_port = 3306 #default mysql_username = remap_user - mysql_password = + mysql_password = mysql_database = mysql_remap #default To debug errors, start trafficserver manually using:: diff --git a/doc/admin-guide/plugins/stale_while_revalidate.en.rst b/doc/admin-guide/plugins/stale_while_revalidate.en.rst index 8f6d2ef..76e192b 100644 --- a/doc/admin-guide/plugins/stale_while_revalidate.en.rst +++ b/doc/admin-guide/plugins/stale_while_revalidate.en.rst @@ -12,9 +12,9 @@ Stale While Revalidate Plugin 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 diff --git a/doc/admin-guide/plugins/ts_lua.en.rst b/doc/admin-guide/plugins/ts_lua.en.rst index 10f7821..363aa42 100644 --- a/doc/admin-guide/plugins/ts_lua.en.rst +++ b/doc/admin-guide/plugins/ts_lua.en.rst @@ -569,7 +569,7 @@ ts.client_request.set_uri ------------------------- **syntax:** *ts.client_request.set_uri(PATH)* -**context:** do_remap or do_global_* +**context:** do_remap or do_global_* **description:** This function can be used to override the client request's path. @@ -606,7 +606,7 @@ ts.client_request.set_uri_args ------------------------------ **syntax:** *ts.client_request.set_uri_args(QUERY_STRING)* -**context:** do_remap or do_global_* +**context:** do_remap or do_global_* **description:** This function can be used to override the client request's query string. @@ -744,7 +744,7 @@ ts.client_request.client_addr.get_addr **description**: This function can be used to get socket address of the client. -The ts.client_request.client_addr.get_addr function returns three values, ip is a string, port and family is number. +The ts.client_request.client_addr.get_addr function returns three values, ip is a string, port and family is number. Here is an example: @@ -808,7 +808,7 @@ ts.client_request.set_url_host ------------------------------ **syntax:** *ts.client_request.set_url_host(str)* -**context:** do_remap or do_global_* +**context:** do_remap or do_global_* **description:** Set ``host`` field of the request url with ``str``. This function is used to change the address of the origin server, and we should return TS_LUA_REMAP_DID_REMAP(_STOP) in do_remap. @@ -898,7 +898,7 @@ ts.client_request.set_url_scheme -------------------------------- **syntax:** *ts.client_request.set_url_scheme(str)* -**context:** do_remap or do_global_* +**context:** do_remap or do_global_* **description:** Set ``scheme`` field of the request url with ``str``. This function is used to change the scheme of the server request, and we should return TS_LUA_REMAP_DID_REMAP(_STOP) in do_remap. @@ -910,7 +910,7 @@ ts.http.set_cache_url --------------------- **syntax:** *ts.http.set_cache_url(KEY_URL)* -**context:** do_remap or do_global_* +**context:** do_remap or do_global_* **description:** This function can be used to modify the cache key for the client request. @@ -941,7 +941,7 @@ Here is an example ts.http.set_cache_lookup_url('http://bad.com/bad.html') local cache = ts.http.get_cache_lookup_url() ts.debug(cache) - end + end function do_remap() ts.hook(TS_LUA_HOOK_CACHE_LOOKUP_COMPLETE, cache_lookup) @@ -1608,8 +1608,8 @@ Here is an example: end function do_remap() - ts.hook(TS_LUA_HOOK_SEND_REQUEST_HDR, send_request) - return 0 + ts.hook(TS_LUA_HOOK_SEND_REQUEST_HDR, send_request) + return 0 end Then ``GET http://abc.com/p2/a.txt HTTP/1.1`` will yield the output: @@ -1672,7 +1672,7 @@ ts.server_request.get_url_scheme -------------------------------- **syntax:** *scheme = ts.server_request.get_url_scheme()* -**context:** function @ TS_LUA_HOOK_SEND_REQUEST_HDR hook point +**context:** function @ TS_LUA_HOOK_SEND_REQUEST_HDR hook point **description:** Return the ``scheme`` field of the request url. @@ -1700,7 +1700,7 @@ ts.server_request.set_url_scheme -------------------------------- **syntax:** *ts.server_request.set_url_scheme(str)* -**context:** function @ TS_LUA_HOOK_SEND_REQUEST_HDR hook point +**context:** function @ TS_LUA_HOOK_SEND_REQUEST_HDR hook point **description:** Set ``scheme`` field of the request url with ``str``. This function is used to change the scheme of the server request. @@ -2210,8 +2210,8 @@ Here is an example: function do_global_read_request() local stack = {ts.http.get_client_protocol_stack()} - for k,v in pairs(stack) do - ts.debug(v) + for k,v in pairs(stack) do + ts.debug(v) end return 0 end @@ -2625,7 +2625,7 @@ Returns a Lua table with serveral slots (res.status, res.header, res.body, and r ``res.header`` holds the response header table. ``res.body`` holds the response body which may be truncated, you need to check res.truncated to see if the data is -truncated. +truncated. Here is a basic example: @@ -3257,7 +3257,7 @@ Here is an example: ts.http.enable_redirect(1) return 0 end - + `TOP <#ts-lua-plugin>`_ @@ -3336,8 +3336,8 @@ ts.http.milestone_get **context:** do_remap/do_os_response or do_global_* or later. -**description:** This function can be used to retireve the various milestone times. They are how long the -transaction took to traverse portions of the HTTP state machine. Each milestone value is a fractional number +**description:** This function can be used to retireve the various milestone times. They are how long the +transaction took to traverse portions of the HTTP state machine. Each milestone value is a fractional number of seconds since the beginning of the transaction. :: @@ -3432,11 +3432,11 @@ ts.stat_create **context:** global -**description:** This function can be used to create a statistics record given the name, data type, persistent -requirement, and sync requirement. A statistics record table will be created with 4 functions to increment, +**description:** This function can be used to create a statistics record given the name, data type, persistent +requirement, and sync requirement. A statistics record table will be created with 4 functions to increment, decrement, get and set the value. -:: +:: stat:increment(value) stat:decrement(value) @@ -3450,9 +3450,9 @@ Here is an example. local test_stat; function __init__(args) - test_stat = ts.stat_create("test_stat", - TS_LUA_RECORDDATATYPE_INT, - TS_LUA_STAT_PERSISTENT, + test_stat = ts.stat_create("test_stat", + TS_LUA_RECORDDATATYPE_INT, + TS_LUA_STAT_PERSISTENT, TS_LUA_STAT_SYNC_COUNT) end diff --git a/doc/admin-guide/plugins/webp_transform.en.rst b/doc/admin-guide/plugins/webp_transform.en.rst index dc0c2a7..1fa2262 100644 --- a/doc/admin-guide/plugins/webp_transform.en.rst +++ b/doc/admin-guide/plugins/webp_transform.en.rst @@ -23,8 +23,8 @@ Webp Transform Plugin ********************* This plugin converts jpeg and png images and transforms them into webp format. -All response with content-type 'image/jpeg' or 'image/png' will go through the transform. -Content-type is changed to 'image/webp' on successful transformation. +All response with content-type 'image/jpeg' or 'image/png' will go through the transform. +Content-type is changed to 'image/webp' on successful transformation. Installation ============ diff --git a/doc/appendices/command-line/traffic_ctl.en.rst b/doc/appendices/command-line/traffic_ctl.en.rst index 9905fd2..026621f 100644 --- a/doc/appendices/command-line/traffic_ctl.en.rst +++ b/doc/appendices/command-line/traffic_ctl.en.rst @@ -268,7 +268,7 @@ traffic_ctl plugin will receive a callback for that hook. The :arg:`TAG` and :arg:`DATA` will be available to the plugin hook processing. It is expected that plugins will use :arg:`TAG` to select relevant messages and determine the format of the :arg:`DATA`. - + Examples ======== diff --git a/doc/checkvers.py b/doc/checkvers.py index cc95053..5a79512 100644 --- a/doc/checkvers.py +++ b/doc/checkvers.py @@ -33,14 +33,14 @@ if __name__ == '__main__': # Also 1.2 guarantees sphinx.version_info is available. try: import sphinx - + if 'version_info' in dir(sphinx) : print 'Found Sphinx version {0}'.format(sphinx.version_info) else : version = sphinx.__version__ print 'Found Sphinx version (old) {0}'.format(sphinx.__version__) sphinx.version_info = version.split('.') - + if sphinx.version_info < (1,2) : sys.exit(1) diff --git a/doc/developer-guide/api/functions/TSClientProtocolStack.en.rst b/doc/developer-guide/api/functions/TSClientProtocolStack.en.rst index 2d99e75..80f6476 100644 --- a/doc/developer-guide/api/functions/TSClientProtocolStack.en.rst +++ b/doc/developer-guide/api/functions/TSClientProtocolStack.en.rst @@ -42,36 +42,36 @@ Synopsis Description =========== -These functions are used to explore the protocol stack of the client (user agent) connection to -|TS|. The functions :func:`TSHttpTxnClientProtocolStackGet` and -:func:`TSHttpSsnClientProtocolStackGet` can be used to retrieve the entire protocol stack for the -user agent connection. :func:`TSHttpTxnClientProtocolStackContains` and -:func:`TSHttpSsnClientProtocolStackContains` will check for a specific protocol :arg:`tag` being +These functions are used to explore the protocol stack of the client (user agent) connection to +|TS|. The functions :func:`TSHttpTxnClientProtocolStackGet` and +:func:`TSHttpSsnClientProtocolStackGet` can be used to retrieve the entire protocol stack for the +user agent connection. :func:`TSHttpTxnClientProtocolStackContains` and +:func:`TSHttpSsnClientProtocolStackContains` will check for a specific protocol :arg:`tag` being present in the stack. -Each protocol is represented by tag which is a null terminated string. A particular tag will always -be returned as the same character pointer and so protocols can be reliably checked with pointer -comparisons. :func:`TSNormalizedProtocolTag` will return this character pointer for a specific -:arg:`tag`. A return value of :const:`NULL` indicates the provided :arg:`tag` is not registered as -a known protocol tag. :func:`TSRegisterProtocolTag` registers the :arg:`tag` and then returns its +Each protocol is represented by tag which is a null terminated string. A particular tag will always +be returned as the same character pointer and so protocols can be reliably checked with pointer +comparisons. :func:`TSNormalizedProtocolTag` will return this character pointer for a specific +:arg:`tag`. A return value of :const:`NULL` indicates the provided :arg:`tag` is not registered as +a known protocol tag. :func:`TSRegisterProtocolTag` registers the :arg:`tag` and then returns its normalized value. This is useful for plugins that provide custom protocols for user agents. -The protocols are ordered from higher level protocols to the lower level ones on which the higher -operate. For instance a stack might look like "http/1.1,tls/1.2,tcp,ipv4". For -:func:`TSHttpTxnClientProtocolStackGet` and :func:`TSHttpSsnClientProtocolStackGet` these values -are placed in the array :arg:`result`. :arg:`count` is the maximum number of elements of -:arg:`result` that may be modified by the function call. If :arg:`actual` is not :const:`NULL` then -the actual number of elements in the protocol stack will be returned. If this is equal or less than -:arg:`count` then all elements were returned. If it is larger then some layers were omitted from -:arg:`result`. If the full stack is required :arg:`actual` can be used to resize :arg:`result` to -be sufficient to hold all of the elements and the function called again with updated :arg:`count` -and :arg:`result`. In practice the maximum number of elements will is almost certain to be less -than 10 which therefore should suffice. These functions return :const:`TS_SUCCESS` on success and +The protocols are ordered from higher level protocols to the lower level ones on which the higher +operate. For instance a stack might look like "http/1.1,tls/1.2,tcp,ipv4". For +:func:`TSHttpTxnClientProtocolStackGet` and :func:`TSHttpSsnClientProtocolStackGet` these values +are placed in the array :arg:`result`. :arg:`count` is the maximum number of elements of +:arg:`result` that may be modified by the function call. If :arg:`actual` is not :const:`NULL` then +the actual number of elements in the protocol stack will be returned. If this is equal or less than +:arg:`count` then all elements were returned. If it is larger then some layers were omitted from +:arg:`result`. If the full stack is required :arg:`actual` can be used to resize :arg:`result` to +be sufficient to hold all of the elements and the function called again with updated :arg:`count` +and :arg:`result`. In practice the maximum number of elements will is almost certain to be less +than 10 which therefore should suffice. These functions return :const:`TS_SUCCESS` on success and :const:`TS_ERROR` on failure which should only occurr if :arg:`txnp` or :arg:`ssnp` are invalid. -The :func:`TSHttpTxnClientProtocolStackContains` and :func:`TSHttpSsnClientProtocolStackContains` -functions are provided for the convenience when only the presence of a protocol is of interest, not -its location or the presence of other protocols. These functions return NULL if the protocol +The :func:`TSHttpTxnClientProtocolStackContains` and :func:`TSHttpSsnClientProtocolStackContains` +functions are provided for the convenience when only the presence of a protocol is of interest, not +its location or the presence of other protocols. These functions return NULL if the protocol :arg:`tag` is not present, and a pointer to the normalized tag if it is present. The strings are matched with an anchor prefix search, as with debug tags. For instance if :arg:`tag` is "tls" then it will match "tls/1.2" or "tls/1.3". This makes checking for TLS or IP more convenient. If more precision diff --git a/doc/developer-guide/api/functions/TSIOBufferReader.en.rst b/doc/developer-guide/api/functions/TSIOBufferReader.en.rst index 65472e8..1ec5874 100644 --- a/doc/developer-guide/api/functions/TSIOBufferReader.en.rst +++ b/doc/developer-guide/api/functions/TSIOBufferReader.en.rst @@ -5,9 +5,9 @@ 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 diff --git a/doc/developer-guide/api/functions/TSLifecycleHookAdd.en.rst b/doc/developer-guide/api/functions/TSLifecycleHookAdd.en.rst index 24ef96d..efdcee1 100644 --- a/doc/developer-guide/api/functions/TSLifecycleHookAdd.en.rst +++ b/doc/developer-guide/api/functions/TSLifecycleHookAdd.en.rst @@ -51,53 +51,53 @@ Types Life cycle hook selector. .. cpp:enumerator:: TS_LIFECYCLE_PORTS_INITIALIZED_HOOK - + Called after the :ts:cv:`proxy server port ` data structures have been initialized but before connections are accepted on those ports. The sockets corresponding to the ports may or may not be open depending on how the :program:`traffic_server` process was invoked. Other API functions that depend on server ports should be called from this hook and not :func:`TSPluginInit`. - + Invoked with the event :c:data:`TS_EVENT_LIFECYCLE_PORTS_INITIALIZED` and ``NULL`` data. - + .. cpp:enumerator:: TS_LIFECYCLE_PORTS_READY_HOOK - + Called after enabling connections on the proxy server ports. Because |TS| is threaded this may or may not be called before any connections are accepted. The hook code may assume that any connection to |TS| started after this hook is called will be accepted by |TS|, making this a convenient place to signal external processes of that. - + Invoked with the event :c:data:`TS_EVENT_LIFECYCLE_PORTS_READY` and ``NULL`` data. - + .. cpp:enumerator:: TS_LIFECYCLE_CACHE_READY_HOOK - + Called after |TS| cache initialization has finished. - + Invoked with the event :c:data:`TS_EVENT_LIFECYCLE_CACHE_READY` and ``NULL`` data. - + .. cpp:enumerator:: TS_LIFECYCLE_MSG_HOOK - + Called when triggered by an external process, such as :program:`traffic_ctl`. - + Invoked with the event :c:data:`TS_EVENT_LIFECYCLE_MSG`. The data is an instance of the :c:type:`TSPluginMsg`. This contains a *tag* which is a null terminated string and a data payload. The payload cannot be assumed to be null terminated and is created by the external agent. Its internal structure and format are entirely under the control of the external agent although presumably there is an agreement between the plugin and the external where this is determined by the :arg:`tag`. - + .. cpp:enumerator:: TS_LIFECYCLE_CLIENT_SSL_CTX_INITIALIZED_HOOK - + Called after the initialization of the SSL context used by |TS| for outbound connections (|TS| as client). - + .. cpp:enumerator:: TS_LIFECYCLE_SERVER_SSL_CTX_INITIALIZED_HOOK - + Called after every SSL context initialization used by |TS| for inbound connections (|TS| as the server). - + .. c:type:: TSPluginMsg The format of the data for the plugin message event :c:data:`TS_EVENT_LIFECYCLE_MSG`. @@ -105,11 +105,11 @@ Types .. c:member:: const char * TSPluginMsg::tag The tag of the message. This is a null terminated string. - + .. c:member:: const void * TSPluginMsg::data Message data (payload). This is a raw slab of bytes - no structure is guaranteed. - + .. c:member:: size_t TSPluginMsg::data_size The size of :member:`TSPluginMsg::data`. diff --git a/doc/developer-guide/api/functions/TSRecords.en.rst b/doc/developer-guide/api/functions/TSRecords.en.rst index e484881..339c3dd 100644 --- a/doc/developer-guide/api/functions/TSRecords.en.rst +++ b/doc/developer-guide/api/functions/TSRecords.en.rst @@ -21,7 +21,7 @@ Traffic Server Records ********************** -|TS| maintains a set of records which cover both configuration values and statistics. +|TS| maintains a set of records which cover both configuration values and statistics. Synopsis ======== @@ -32,7 +32,7 @@ Synopsis const TSMgmtString data_default, TSRecordUpdateType update_type, \ TSRecordCheckType check_type, \ const char* check_regex, TSRecordAccessType access_type) - + .. function:: TSReturnCode TSMgmtIntCreate(TSRecordType rec_type, const char* name, \ const TSMgmtInt data_default, TSRecordUpdateType update_type, \ diff --git a/doc/developer-guide/api/types/CoreTypes.en.rst b/doc/developer-guide/api/types/CoreTypes.en.rst index 801ee8b..edb9a80 100644 --- a/doc/developer-guide/api/types/CoreTypes.en.rst +++ b/doc/developer-guide/api/types/CoreTypes.en.rst @@ -34,11 +34,11 @@ Description These types are provided by the compiler ("built-in") or from a required operating system, POSIX, or package header. - + .. cpp:type:: uint24_t - - + + .. cpp:type:: Event diff --git a/doc/developer-guide/api/types/SystemTypes.en.rst b/doc/developer-guide/api/types/SystemTypes.en.rst index 5c1a369..4263487 100644 --- a/doc/developer-guide/api/types/SystemTypes.en.rst +++ b/doc/developer-guide/api/types/SystemTypes.en.rst @@ -40,15 +40,15 @@ These types are provided by the compiler ("built-in") or from a required operati .. cpp:type:: off_t `Reference `__. - + .. cpp:type:: uint64_t `Reference `__. - + .. cpp:type:: uint32_t `Reference `__. - + .. cpp:type:: uint8_t `Reference `__. diff --git a/doc/developer-guide/api/types/TSRecordDataType.en.rst b/doc/developer-guide/api/types/TSRecordDataType.en.rst index 0eb0346..6be0026 100644 --- a/doc/developer-guide/api/types/TSRecordDataType.en.rst +++ b/doc/developer-guide/api/types/TSRecordDataType.en.rst @@ -42,7 +42,7 @@ Enumeration Members .. c:member:: TSRecordType TS_RECORDDATATYPE_FLOAT Floating point. - + .. c:member:: TSRecordType TS_RECORDDATATYPE_STRING A string. diff --git a/doc/developer-guide/api/types/TSRecordUpdateType.en.rst b/doc/developer-guide/api/types/TSRecordUpdateType.en.rst index 9a05c6a..2babed1 100644 --- a/doc/developer-guide/api/types/TSRecordUpdateType.en.rst +++ b/doc/developer-guide/api/types/TSRecordUpdateType.en.rst @@ -34,11 +34,11 @@ Enumeration Members .. c:member:: TSRecordUpdateType TS_RECORDUPDATE_NULL The value cannot be updated. This is used primarily as a default value, actual instances should not use this. - + .. c:member:: TSRecordUpdateType TS_RECORDUPDATE_DYNAMIC The value can be updated at runtime, including by using :program:`traffic_ctl`. - + .. c:member:: TSRecordUpdateType TS_RECORDUPDATE_RESTART_TS The value is updated if the :program:`traffic_server` process is restarted. @@ -50,7 +50,7 @@ Enumeration Members .. c:member:: TSRecordUpdateType TS_RECORDUPDATE_RESTART_TC The value is updated if the :program:`traffic_cop` process is restarted. This is effect a complete restart of |TS|. - + Description =========== diff --git a/doc/developer-guide/plugins/actions/index.en.rst b/doc/developer-guide/plugins/actions/index.en.rst index 12eeb24..59abc56 100644 --- a/doc/developer-guide/plugins/actions/index.en.rst +++ b/doc/developer-guide/plugins/actions/index.en.rst @@ -81,7 +81,7 @@ Below is an example of typical usage for an action: /* Net connection failed */ TSContDataSet (contp, NULL); return 0; - } + } return 0; } @@ -153,7 +153,7 @@ cancel the action. The following sample code implements this: TSContDataSet (contp, NULL); break; - } + } return 0; } diff --git a/doc/developer-guide/plugins/configuration.en.rst b/doc/developer-guide/plugins/configuration.en.rst index 409df3e..eb72dea 100644 --- a/doc/developer-guide/plugins/configuration.en.rst +++ b/doc/developer-guide/plugins/configuration.en.rst @@ -49,19 +49,19 @@ Here's how the interface works: /* Assume that you have previously defined a plugin configuration * data structure named ConfigData, along with its constructor - * plugin_config_allocator () and its destructor + * plugin_config_allocator () and its destructor * plugin_config_destructor (ConfigData *data) */ ConfigData *plugin_config; /* You will need to assign plugin_config a unique identifier of type * unsigned int. It is important to initialize this identifier to zero - * (see the documentation of the function). + * (see the documentation of the function). */ static unsigned int my_id = 0; - /* You will need an TSConfig pointer to access a snapshot of the - * current plugin_config. + /* You will need an TSConfig pointer to access a snapshot of the + * current plugin_config. */ TSConfig config_ptr; @@ -74,8 +74,8 @@ Here's how the interface works: /* Get a snapshot of the current configuration using TSConfigGet. */ config_ptr = TSConfigGet (my_id); - /* With an TSConfig pointer to the current configuration, you can - * retrieve the configuration's current data using TSConfigDataGet. + /* With an TSConfig pointer to the current configuration, you can + * retrieve the configuration's current data using TSConfigDataGet. */ plugin_config = (ConfigData*) TSConfigDataGet (config_ptr); @@ -87,9 +87,9 @@ Here's how the interface works: TSConfigRelease (my_id, config_ptr); /* Any time you want to modify plugin_config, you must repeat these - * steps, starting with + * steps, starting with * my_id = TSConfigSet (my_id,plugin_config, plugin_config_destructor); - * and continuing up to TSConfigRelease. + * and continuing up to TSConfigRelease. */ The configuration functions are: diff --git a/doc/developer-guide/plugins/example-plugins/blacklist/index.en.rst b/doc/developer-guide/plugins/example-plugins/blacklist/index.en.rst index 83f11fa..65c02c7 100644 --- a/doc/developer-guide/plugins/example-plugins/blacklist/index.en.rst +++ b/doc/developer-guide/plugins/example-plugins/blacklist/index.en.rst @@ -61,7 +61,7 @@ Here is how the static parent continuation is created in { // ... TSCont contp; - + contp = TSContCreate (blacklist_plugin, NULL); // ... } diff --git a/doc/developer-guide/plugins/example-plugins/blacklist/working-with-http-header-functions.en.rst b/doc/developer-guide/plugins/example-plugins/blacklist/working-with-http-header-functions.en.rst index f437d93..5d39460 100644 --- a/doc/developer-guide/plugins/example-plugins/blacklist/working-with-http-header-functions.en.rst +++ b/doc/developer-guide/plugins/example-plugins/blacklist/working-with-http-header-functions.en.rst @@ -37,18 +37,18 @@ transaction. This is done in the ``handle_dns`` routine, using const char *host; int i; int host_length; - + if (TSHttpTxnClientReqGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) { TSError("[blacklist] Couldn't retrieve client request header"); goto done; } - + if (TSHttpHdrUrlGet(bufp, hdr_loc, &url_loc) != TS_SUCCESS) { TSError("[blacklist] Couldn't retrieve request url"); TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc); goto done; } - + host = TSUrlHostGet(bufp, url_loc, &host_length); if (!host) { TSError("[blacklist] couldn't retrieve request hostname"); diff --git a/doc/developer-guide/plugins/example-plugins/query-remap/example-query-remap.en.rst b/doc/developer-guide/plugins/example-plugins/query-remap/example-query-remap.en.rst index 5d6ed9b..09e72eb 100644 --- a/doc/developer-guide/plugins/example-plugins/query-remap/example-query-remap.en.rst +++ b/doc/developer-guide/plugins/example-plugins/query-remap/example-query-remap.en.rst @@ -66,21 +66,21 @@ the ``tsremap_remap`` function when it is triggered for a request. char **hosts; int num_hosts; } query_remap_info; - - + + int tsremap_new_instance(int argc,char *argv[],ihandle *ih,char *errbuf,int errbuf_size) { int i; - + if (argc param_name = strdup(argv[2]); qri->param_len = strlen(qri->param_name); qri->num_hosts = argc - 3; qri->hosts = (char**) TSmalloc(qri->num_hosts*sizeof(char*)); - + for (i=0; i num_hosts; ++i) { qri->hosts[i] = strdup(argv[i+3]); } - + *ih = (ihandle)qri; return 0; } @@ -108,20 +108,20 @@ modify the request host: { int hostidx = -1; query_remap_info *qri = (query_remap_info*)ih; - + if (!qri) { TSError("[remap] NULL ihandle"); return 0; } - + if (rri && rri->request_query && rri->request_query_size > 0) { char *q, *s, *key; - + //make a copy of the query, as it is read only q = (char*) TSmalloc(rri->request_query_size+1); strncpy(q, rri->request_query, rri->request_query_size); q[rri->request_query_size] = '\0'; - + s = q; //parse query parameters for (key = strsep(&s, "&"); key != NULL; key = strsep(&s, "&")) { @@ -135,9 +135,9 @@ modify the request host: break; } } - + TSfree(q); - + if (hostidx >= 0) { rri->new_host_size = strlen(qri->hosts[hostidx]); if (rri->new_host_size new_host, qri->hosts[hostidx], rri->new_host_size); @@ -145,7 +145,7 @@ modify the request host: } } } - + //the request was not modified, TS will use the toURL from the remap rule return 0; } diff --git a/doc/developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst b/doc/developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst index 6358e74..d7a6cce 100644 --- a/doc/developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst +++ b/doc/developer-guide/plugins/hooks-and-transactions/http-alternate-selection.en.rst @@ -5,9 +5,9 @@ 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 @@ -68,21 +68,21 @@ The sample code below shows how to call the alternate APIs. { TSMBuffer client_req_buf, cache_resp_buf; TSMLoc client_req_hdr, cache_resp_hdr; - + TSMLoc accept_transform_field; TSMLoc content_transform_field; - + int accept_transform_len = -1, content_transform_len = -1; const char* accept_transform_value = NULL; const char* content_transform_value = NULL; int content_plugin, accept_plugin; - + float quality; - + /* get client request, cached request and cached response */ TSHttpAltInfoClientReqGet (infop, &client_req_buf, &client_req_hdr); TSHttpAltInfoCachedRespGet(infop, &cache_resp_buf, &cache_resp_hdr); - + /* get the Accept-Transform field value from the client request */ accept_transform_field = TSMimeHdrFieldFind(client_req_buf, client_req_hdr, "Accept-Transform", -1); @@ -92,7 +92,7 @@ The sample code below shows how to call the alternate APIs. TSDebug(DBG_TAG, "Accept-Transform = |%s|", accept_transform_value); } - + /* get the Content-Transform field value from cached server response */ content_transform_field = TSMimeHdrFieldFind(cache_resp_buf, cache_resp_hdr, "Content-Transform", -1); @@ -102,43 +102,43 @@ The sample code below shows how to call the alternate APIs. TSDebug(DBG_TAG, "Content-Transform = |%s|", content_transform_value); } - + /* compute quality */ accept_plugin = (accept_transform_value && (accept_transform_len > 0) && (strncmp(accept_transform_value, "plugin", accept_transform_len) == 0)); - + content_plugin = (content_transform_value && (content_transform_len >0) && (strncmp(content_transform_value, "plugin", content_transform_len) == 0)); - + if (accept_plugin) { quality = content_plugin ? 1.0 : 0.0; } else { quality = content_plugin ? 0.0 : 0.5; } - + TSDebug(DBG_TAG, "Setting quality to %3.1f", quality); - + /* set quality for this alternate */ TSHttpAltInfoQualitySet(infop, quality); - + /* cleanup */ if (accept_transform_field) TSHandleMLocRelease(client_req_buf, client_req_hdr, accept_transform_field); TSHandleMLocRelease(client_req_buf, TS_NULL_MLOC, client_req_hdr); - + if (content_transform_field) TSHandleMLocRelease(cache_resp_buf, cache_resp_hdr, content_transform_field); TSHandleMLocRelease(cache_resp_buf, TS_NULL_MLOC, cache_resp_hdr); } - + static int alt_plugin(TSCont contp, TSEvent event, void *edata) { TSHttpAltInfo infop; - + switch (event) { case TS_EVENT_HTTP_SELECT_ALT: infop = (TSHttpAltInfo)edata; @@ -148,10 +148,10 @@ The sample code below shows how to call the alternate APIs. default: break; } - + return 0; } - + void TSPluginInit (int argc, const char *argv[]) { TSHttpHookAdd(TS_HTTP_SELECT_ALT_HOOK, TSContCreate (alt_plugin, diff --git a/doc/developer-guide/plugins/hooks-and-transactions/http-transactions.en.rst b/doc/developer-guide/plugins/hooks-and-transactions/http-transactions.en.rst index aa6c020..bc7ad15 100644 --- a/doc/developer-guide/plugins/hooks-and-transactions/http-transactions.en.rst +++ b/doc/developer-guide/plugins/hooks-and-transactions/http-transactions.en.rst @@ -63,20 +63,20 @@ transaction and associate data to the transaction. { TxnData *data; data = TSmalloc(sizeof(TxnData)); - + data->i = 1; data->f = 0.5; data->s = "Constant String"; return data; } - + /* Free up a TxnData structure */ void txn_data_free(TxnData *data) { TSfree(data); } - + /* Handler for event READ_REQUEST and TXN_CLOSE */ static int local_hook_handler (TSCont contp, TSEvent event, void *edata) @@ -90,25 +90,25 @@ transaction and associate data to the transaction. txn_data->f = 3.5; txn_data->s = "Constant String 2"; break; - + case TS_EVENT_HTTP_TXN_CLOSE: /* Print txn data values */ TSDebug(DBG_TAG, "Txn data i=%d f=%f s=%s", txn_data->i, txn_data->f, txn_data->s); - + /* Then destroy the txn cont and its data */ txn_data_free(txn_data); TSContDestroy(contp); break; - + default: TSAssert(!"Unexpected event"); break; } - + TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE); return 1; } - + /* Handler for event TXN_START */ static int global_hook_handler (TSCont contp, TSEvent event, void *edata) @@ -116,38 +116,38 @@ transaction and associate data to the transaction. TSHttpTxn txnp = (TSHttpTxn) edata; TSCont txn_contp; TxnData *txn_data; - + switch (event) { case TS_EVENT_HTTP_TXN_START: /* Create a new continuation for this txn and associate data to it */ txn_contp = TSContCreate(local_hook_handler, TSMutexCreate()); txn_data = txn_data_alloc(); TSContDataSet(txn_contp, txn_data); - + /* Registers locally to hook READ_REQUEST and TXN_CLOSE */ TSHttpTxnHookAdd(txnp, TS_HTTP_READ_REQUEST_HDR_HOOK, txn_contp); TSHttpTxnHookAdd(txnp, TS_HTTP_TXN_CLOSE_HOOK, txn_contp); break; - + default: TSAssert(!"Unexpected event"); break; } - + TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE); return 1; } - - + + void TSPluginInit (int argc, const char *argv[]) { TSCont contp; - + /* Note that we do not need a mutex for this txn since it registers globally and doesn't have any data associated with it */ contp = TSContCreate(global_hook_handler, NULL); - + /* Register gloabally */ TSHttpHookAdd(TS_HTTP_TXN_START_HOOK, contp); } diff --git a/doc/developer-guide/plugins/hooks-and-transactions/index.en.rst b/doc/developer-guide/plugins/hooks-and-transactions/index.en.rst index 89e2d7f..af5b54d 100644 --- a/doc/developer-guide/plugins/hooks-and-transactions/index.en.rst +++ b/doc/developer-guide/plugins/hooks-and-transactions/index.en.rst @@ -131,7 +131,7 @@ HTTP Transaction State Diagram "send reply hdrs" -> "tunnel response"; "tunnel response" -> TS_HTTP_TXN_CLOSE_HOOK; TS_HTTP_TXN_CLOSE_HOOK -> accept; - + TS_HTTP_TXN_START_HOOK [shape=box]; TS_HTTP_READ_REQUEST_HDR_HOOK [shape = box]; TS_HTTP_PRE_REMAP_HOOK [shape = box]; diff --git a/doc/developer-guide/plugins/hooks-and-transactions/trafficserver-timers.en.rst b/doc/developer-guide/plugins/hooks-and-transactions/trafficserver-timers.en.rst index 194f380..849be22 100644 --- a/doc/developer-guide/plugins/hooks-and-transactions/trafficserver-timers.en.rst +++ b/doc/developer-guide/plugins/hooks-and-transactions/trafficserver-timers.en.rst @@ -8,9 +8,9 @@ HTTP Transaction Timers 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 diff --git a/doc/developer-guide/plugins/mutexes.en.rst b/doc/developer-guide/plugins/mutexes.en.rst index 2c71e8f..52e0a4e 100644 --- a/doc/developer-guide/plugins/mutexes.en.rst +++ b/doc/developer-guide/plugins/mutexes.en.rst @@ -149,17 +149,17 @@ uses a transaction-specific continuation called ``txn_contp``. .. code-block:: c - void TSPluginInit(int argc, const char *argv[]) - { - /* Plugin continuation */ - TSCont contp; - if ((contp = TSContCreate (plugin_cont_handler, NULL)) == TS_ERROR_PTR) { - LOG_ERROR("TSContCreate"); - } else { - if (TSHttpHookAdd (TS_HTTP_TXN_START_HOOK, contp) == TS_ERROR) { - LOG_ERROR("TSHttpHookAdd"); - } - } + void TSPluginInit(int argc, const char *argv[]) + { + /* Plugin continuation */ + TSCont contp; + if ((contp = TSContCreate (plugin_cont_handler, NULL)) == TS_ERROR_PTR) { + LOG_ERROR("TSContCreate"); + } else { + if (TSHttpHookAdd (TS_HTTP_TXN_START_HOOK, contp) == TS_ERROR) { + LOG_ERROR("TSHttpHookAdd"); + } + } } In the plugin continuation handler, create the new continuation @@ -168,33 +168,33 @@ In the plugin continuation handler, create the new continuation .. code-block:: c - static int plugin_cont_handler(TSCont contp, TSEvent event, void *edata) - { - TSHttpTxn txnp = (TSHttpTxn)edata; - TSCont txn_contp; + static int plugin_cont_handler(TSCont contp, TSEvent event, void *edata) + { + TSHttpTxn txnp = (TSHttpTxn)edata; + TSCont txn_contp; - switch (event) { - case TS_EVENT_HTTP_TXN_START: - /* Create the HTTP txn continuation */ - txn_contp = TSContCreate(txn_cont_handler, NULL); + switch (event) { + case TS_EVENT_HTTP_TXN_START: + /* Create the HTTP txn continuation */ + txn_contp = TSContCreate(txn_cont_handler, NULL); - /* Register txn_contp to be called back when txnp reaches TS_HTTP_TXN_CLOSE_HOOK */ - if (TSHttpTxnHookAdd (txnp, TS_HTTP_TXN_CLOSE_HOOK, txn_contp) == TS_ERROR) { - LOG_ERROR("TSHttpTxnHookAdd"); - } + /* Register txn_contp to be called back when txnp reaches TS_HTTP_TXN_CLOSE_HOOK */ + if (TSHttpTxnHookAdd (txnp, TS_HTTP_TXN_CLOSE_HOOK, txn_contp) == TS_ERROR) { + LOG_ERROR("TSHttpTxnHookAdd"); + } - break; + break; - default: - TSAssert(!"Unexpected Event"); - break; - } + default: + TSAssert(!"Unexpected Event"); + break; + } - if (TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE) == TS_ERROR) { - LOG_ERROR("TSHttpTxnReenable"); - } + if (TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE) == TS_ERROR) { + LOG_ERROR("TSHttpTxnReenable"); + } - return 0; + return 0; } Remember that the ``txn_contp`` handler must destory itself when the @@ -204,25 +204,25 @@ will have a memory leak. .. code-block:: c - static int txn_cont_handler(TSCont txn_contp, TSEvent event, void *edata) - { - TSHttpTxn txnp; - switch (event) { - case TS_EVENT_HTTP_TXN_CLOSE: - txnp = (TSHttpTxn) edata; - TSContDestroy(txn_contp); - break; + static int txn_cont_handler(TSCont txn_contp, TSEvent event, void *edata) + { + TSHttpTxn txnp; + switch (event) { + case TS_EVENT_HTTP_TXN_CLOSE: + txnp = (TSHttpTxn) edata; + TSContDestroy(txn_contp); + break; - default: - TSAssert(!"Unexpected Event"); - break; - } + default: + TSAssert(!"Unexpected Event"); + break; + } - if (TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE) == TS_ERROR) { - LOG_ERROR("TSHttpTxnReenable"); - } + if (TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE) == TS_ERROR) { + LOG_ERROR("TSHttpTxnReenable"); + } - return 0; + return 0; } How to Store Data Specific to Each HTTP Transaction @@ -234,8 +234,8 @@ suppose you want to store the state of the HTTP transaction: .. code-block:: c - typedef struct { - int state; + typedef struct { + int state; } ContData; You need to allocate the memory and initialize this structure for each @@ -244,86 +244,86 @@ it is called back with ``TS_EVENT_HTTP_TXN_START`` .. code-block:: c - static int plugin_cont_handler(TSCont contp, TSEvent event, void *edata) - { - TSHttpTxn txnp = (TSHttpTxn)edata; - TSCont txn_contp; - ContData *contData; - - switch (event) { - case TS_EVENT_HTTP_TXN_START: - /* Create the HTTP txn continuation */ - txn_contp = TSContCreate(txn_cont_handler, NULL); - - /* Allocate and initialize the txn_contp data */ - contData = (ContData*) TSmalloc(sizeof(ContData)); - contData->state = 0; - if (TSContDataSet(txn_contp, contData) == TS_ERROR) { - LOG_ERROR("TSContDataSet"); - } - - /* Register txn_contp to be called back when txnp reaches TS_HTTP_TXN_CLOSE_HOOK */ - if (TSHttpTxnHookAdd (txnp, TS_HTTP_TXN_CLOSE_HOOK, txn_contp) == TS_ERROR) { - LOG_ERROR("TSHttpTxnHookAdd"); - } - - break; - - default: - TSAssert(!"Unexpected Event"); - break; - } - - if (TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE) == TS_ERROR) { - LOG_ERROR("TSHttpTxnReenable"); - } - - return 0; + static int plugin_cont_handler(TSCont contp, TSEvent event, void *edata) + { + TSHttpTxn txnp = (TSHttpTxn)edata; + TSCont txn_contp; + ContData *contData; + + switch (event) { + case TS_EVENT_HTTP_TXN_START: + /* Create the HTTP txn continuation */ + txn_contp = TSContCreate(txn_cont_handler, NULL); + + /* Allocate and initialize the txn_contp data */ + contData = (ContData*) TSmalloc(sizeof(ContData)); + contData->state = 0; + if (TSContDataSet(txn_contp, contData) == TS_ERROR) { + LOG_ERROR("TSContDataSet"); + } + + /* Register txn_contp to be called back when txnp reaches TS_HTTP_TXN_CLOSE_HOOK */ + if (TSHttpTxnHookAdd (txnp, TS_HTTP_TXN_CLOSE_HOOK, txn_contp) == TS_ERROR) { + LOG_ERROR("TSHttpTxnHookAdd"); + } + + break; + + default: + TSAssert(!"Unexpected Event"); + break; + } + + if (TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE) == TS_ERROR) { + LOG_ERROR("TSHttpTxnReenable"); + } + + return 0; } For accessing this data from anywhere, use TSContDataGet: .. code-block:: c - TSCont txn_contp; - ContData *contData; + TSCont txn_contp; + ContData *contData; - contData = TSContDataGet(txn_contp); - if (contData == TS_ERROR_PTR) { - LOG_ERROR("TSContDataGet"); - } + contData = TSContDataGet(txn_contp); + if (contData == TS_ERROR_PTR) { + LOG_ERROR("TSContDataGet"); + } contData->state = 1; Remember to free this memory before destroying the continuation: .. code-block:: c - static int txn_cont_handler(TSCont txn_contp, TSEvent event, void *edata) - { - TSHttpTxn txnp; - ContData *contData; - switch (event) { - case TS_EVENT_HTTP_TXN_CLOSE: - txnp = (TSHttpTxn) edata; - contData = TSContDataGet(txn_contp); - if (contData == TS_ERROR_PTR) { - LOG_ERROR("TSContDataGet"); - } else { - TSfree(contData); - } - TSContDestroy(txn_contp); - break; - - default: - TSAssert(!"Unexpected Event"); - break; - } - - if (TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE) == TS_ERROR) { - LOG_ERROR("TSHttpTxnReenable"); - } - - return 0; + static int txn_cont_handler(TSCont txn_contp, TSEvent event, void *edata) + { + TSHttpTxn txnp; + ContData *contData; + switch (event) { + case TS_EVENT_HTTP_TXN_CLOSE: + txnp = (TSHttpTxn) edata; + contData = TSContDataGet(txn_contp); + if (contData == TS_ERROR_PTR) { + LOG_ERROR("TSContDataGet"); + } else { + TSfree(contData); + } + TSContDestroy(txn_contp); + break; + + default: + TSAssert(!"Unexpected Event"); + break; + } + + if (TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE) == TS_ERROR) { + LOG_ERROR("TSHttpTxnReenable"); + } + + return 0; } Using Locks diff --git a/doc/developer-guide/skeleton b/doc/developer-guide/skeleton index 0e56f80..06f80de 100755 --- a/doc/developer-guide/skeleton +++ b/doc/developer-guide/skeleton @@ -1,19 +1,19 @@ #! /usr/bin/env perl -# 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 +# 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 # usage: skeleton [--header=PATH ...] API ... # Using declarations from the given headers, generate a skeleton man page diff --git a/doc/doap.rdf b/doc/doap.rdf index 82e8967..286c084 100644 --- a/doc/doap.rdf +++ b/doc/doap.rdf @@ -1,8 +1,8 @@ include should be up there. diff --git a/example/thread-pool/test/SynTest/system.cfg b/example/thread-pool/test/SynTest/system.cfg index 4488828..4be1d45 100644 --- a/example/thread-pool/test/SynTest/system.cfg +++ b/example/thread-pool/test/SynTest/system.cfg @@ -2,14 +2,14 @@ # # This file consists of key-value pairs in MIME format. Keys must be unique # otherwise the last value seen is what's stored. -# +# # Comments start with '#'s and whitespace is ignored. # # "on" and "off" are reserved words. The corresponding keys are treated # as test group names. $SVR_HOST = cachedev.example.com -$SVR_PORT = 1973 +$SVR_PORT = 1973 $PROXY_HOST = cachedev.example.com $PROXY_PORT = 8280 @@ -23,16 +23,16 @@ proxy-port: $(PROXY_PORT) server-host: $(SVR_HOST) server-port: $(SVR_PORT) log-host: $(LOG_HOST) -log-dir: /export/workareas/franckc/traffic_tomcat/sun_opt/logs +log-dir: /export/workareas/franckc/traffic_tomcat/sun_opt/logs # log-format: cqts ttms chi crc/pssc pscl ... # log-flush-delay: 15 # System-level output control. # These settings can be overridden at the test-group and at the test levels. [output] -print-headers: true +print-headers: true print-body: false -print-verifications: false +print-verifications: false print-echo: false verbose-mode: false diff --git a/example/thread-pool/test/SynTest/tests_psi.cfg b/example/thread-pool/test/SynTest/tests_psi.cfg index 31a887e..5a843ba 100644 --- a/example/thread-pool/test/SynTest/tests_psi.cfg +++ b/example/thread-pool/test/SynTest/tests_psi.cfg @@ -16,10 +16,10 @@ $EXPIRES = 200 $LM = 0 $STAMP = $(now) -verbose-mode:false -print-headers: false -print-body: false -print-verifications: true +verbose-mode:false +print-headers: false +print-body: false +print-verifications: true # Each test group has "run" and "list" fields. @@ -28,7 +28,7 @@ print-verifications: true # [Psi] -run: true +run: true list: { generate-resource Tests/Psi/1.cfg diff --git a/iocore/cache/Makefile.am b/iocore/cache/Makefile.am index 62f749b..125f589 100644 --- a/iocore/cache/Makefile.am +++ b/iocore/cache/Makefile.am @@ -31,7 +31,7 @@ AM_CPPFLAGS = \ ADD_SRC = if BUILD_TESTS - ADD_SRC += CacheTest.cc P_CacheTest.h + ADD_SRC += CacheTest.cc P_CacheTest.h endif noinst_LIBRARIES = libinkcache.a diff --git a/iocore/cache/Notes b/iocore/cache/Notes index 54d35c8..5f116be 100644 --- a/iocore/cache/Notes +++ b/iocore/cache/Notes @@ -28,5 +28,5 @@ FIXME_CLUSTER_ARGUMENTS -> runtime arguments for clustering etc. Needs to be added by Eric cluster ifdefs -FIXME_WIRELESS_API -> RPC API's for wireless which is probably not going to +FIXME_WIRELESS_API -> RPC API's for wireless which is probably not going to be used in the future diff --git a/iocore/dns/Makefile.am b/iocore/dns/Makefile.am index 644f08e..4c42367 100644 --- a/iocore/dns/Makefile.am +++ b/iocore/dns/Makefile.am @@ -24,7 +24,7 @@ AM_CPPFLAGS = \ -I$(abs_top_srcdir)/proxy/http \ -I$(abs_top_srcdir)/proxy/hdrs \ -I$(abs_top_srcdir)/mgmt \ - -I$(abs_top_srcdir)/mgmt/utils + -I$(abs_top_srcdir)/mgmt/utils noinst_LIBRARIES = libinkdns.a diff --git a/lib/perl/README b/lib/perl/README index 88b029c..0b10953 100644 --- a/lib/perl/README +++ b/lib/perl/README @@ -29,8 +29,8 @@ IO::Socket::UNIX IO::Select Carp; -Additionally this module requires that Apache Traffic Server is -running on localhost so it has something to talk to. +Additionally this module requires that Apache Traffic Server is +running on localhost so it has something to talk to. COPYRIGHT AND LICENSE ================================== diff --git a/lib/perl/lib/Apache/TS.pm.in b/lib/perl/lib/Apache/TS.pm.in index 0f49505..f492fea 100644 --- a/lib/perl/lib/Apache/TS.pm.in +++ b/lib/perl/lib/Apache/TS.pm.in @@ -41,7 +41,7 @@ use constant { __END__ -#-=-=-=-=-=-=-=-= Give us some POD please =-=-=-=-=-=-=-=- +#-=-=-=-=-=-=-=-= Give us some POD please =-=-=-=-=-=-=-=- =head1 NAME: @@ -87,4 +87,4 @@ the sub-modules as well as scripts. =cut -#-=-=-=-=-=-=-=-= No more POD for you =-=-=-=-=-=-=-=- +#-=-=-=-=-=-=-=-= No more POD for you =-=-=-=-=-=-=-=- diff --git a/lib/perl/lib/Apache/TS/AdminClient.pm b/lib/perl/lib/Apache/TS/AdminClient.pm index 9c40af7..a29aad0 100644 --- a/lib/perl/lib/Apache/TS/AdminClient.pm +++ b/lib/perl/lib/Apache/TS/AdminClient.pm @@ -254,7 +254,7 @@ sub get_stat { __END__ -#-=-=-=-=-=-=-=-= Give us some POD please =-=-=-=-=-=-=-=- +#-=-=-=-=-=-=-=-= Give us some POD please =-=-=-=-=-=-=-=- =head1 NAME: @@ -272,17 +272,17 @@ Apache::TS::AdminClient - a perl interface to the statistics and configuration s =head1 DESCRIPTION: -AdminClient opens a TCP connection to a unix domain socket on local disk. When the connection is established, -AdminClient will write requests to the socket and wait for Apache Traffic Server to return a response. Valid -request strings can be found in RecordsConfig.cc which is included with Apache Traffic Server source. +AdminClient opens a TCP connection to a unix domain socket on local disk. When the connection is established, +AdminClient will write requests to the socket and wait for Apache Traffic Server to return a response. Valid +request strings can be found in RecordsConfig.cc which is included with Apache Traffic Server source. A list of valid request strings are included with this documentation, but this included list may not be complete -as future releases of Apache Traffic Server may include new request strings or remove existing ones. +as future releases of Apache Traffic Server may include new request strings or remove existing ones. =head1 CONSTRUCTOR When the object is created for this module, it assumes the 'Unix Domain Socket' is at the default location from the Apache Traffic Server installation. This can be changed when creating the object by setting B<'socket_path'>. -For example: +For example: =over 4 @@ -310,8 +310,8 @@ This will return a (scalar) value for this metric or configuration. =head1 traffic_ctl -There is a command line tool included with Apache Traffic Server called traffic_ctl which overlaps with this module. traffic_ctl -can be used to read and write statistics or config settings that this module can. Hence if you don't want to write a perl one-liner to +There is a command line tool included with Apache Traffic Server called traffic_ctl which overlaps with this module. traffic_ctl +can be used to read and write statistics or config settings that this module can. Hence if you don't want to write a perl one-liner to get to this information, traffic_ctl is your tool. =head1 List of configurations @@ -708,4 +708,4 @@ The Apache Traffic Server Administration Manual will explain what these strings =cut -#-=-=-=-=-=-=-=-= No more POD for you =-=-=-=-=-=-=-=- +#-=-=-=-=-=-=-=-= No more POD for you =-=-=-=-=-=-=-=- diff --git a/lib/perl/lib/Apache/TS/Config/Records.pm b/lib/perl/lib/Apache/TS/Config/Records.pm index 8c49af8..5f69113 100644 --- a/lib/perl/lib/Apache/TS/Config/Records.pm +++ b/lib/perl/lib/Apache/TS/Config/Records.pm @@ -83,7 +83,7 @@ sub load { ++($self->{_ix}); next unless ($#p == 3) && (($p[0] eq "LOCAL") || ($p[0] eq "CONFIG")); print "Warning! duplicate configuration $p[1]\n" if exists($self->{_lookup}->{$p[1]}); - + $self->{_lookup}->{$p[1]} = $self->{_ix}; } } @@ -172,7 +172,7 @@ sub append { # -# Write the new configuration file to STDOUT, or provided +# Write the new configuration file to STDOUT, or provided # sub write { my $self = shift; @@ -223,11 +223,11 @@ the records.config file as used by Apache Traffic Server. Instantiating a new Config::Records class, with a file provided, will automatically load that configuration. Don't call the load() method -explicitly in this case. +explicitly in this case. =head2 API Methods -The following are methods in the Records class. +The following are methods in the Records class. =over 8 @@ -238,7 +238,7 @@ present that file is immediately loaded (see the load() method below). Example: my $r = new Apache::TS::Config::Records(file => $fname); - + =item load Explicitly load a configuration file, merging the items with any diff --git a/lib/perl/t/Apache-TS-AdminClient.t b/lib/perl/t/Apache-TS-AdminClient.t index c527202..53aeace 100644 --- a/lib/perl/t/Apache-TS-AdminClient.t +++ b/lib/perl/t/Apache-TS-AdminClient.t @@ -30,6 +30,6 @@ BEGIN { use_ok('Apache::TS::AdminClient') }; # Insert your test code below, the Test::More module is use()ed here so read # its man page ( perldoc Test::More ) for help writing this test script. -#----- is this right or do we need to use Test::MockObject as well? +#----- is this right or do we need to use Test::MockObject as well? our @methods = qw(new DESTROY open_socket close_socket get_stat); can_ok('Apache::TS::AdminClient', @methods); diff --git a/lib/records/test_RecProcess.i b/lib/records/test_RecProcess.i index 237e351..ee3f190 100644 --- a/lib/records/test_RecProcess.i +++ b/lib/records/test_RecProcess.i @@ -233,7 +233,7 @@ Test02() } // Testing RecLinkConfigXXX, after calling RecLinkConfigXXX above, those - // variable will automatically be atomically updated when record changes in + // variable will automatically be atomically updated when record changes in // librecords. printf(" [RecLinkConfigXXX]\n"); @@ -452,16 +452,16 @@ struct RawStatCont:public Continuation } // Compare read value stat_f and expected value test_raw_stat_f - // Since RecSet only set g_rsb->global[MY_STAT_F]->count to be g_count value. - // It will not set data.rec_int for stat_f until the RecExecRawStatSyncCbs + // Since RecSet only set g_rsb->global[MY_STAT_F]->count to be g_count value. + // It will not set data.rec_int for stat_f until the RecExecRawStatSyncCbs // is called. RecExecRawStatSyncCbs callback RecRawStatSyncCount which set // data.rec_int to be g_rsb->global[MY_STAT_F]->count. The schedule for // RecExecRawStatSyncCbs is REC_RAW_STAT_SYNC_INTERVAL_SEC = 3 secs. // The normal for this dummy_function is 1 sec. There is no way we can // get the right value for this. Let ask Eric for this :) - // I have increase the ink_sleep time (about 3 secs) between RecSet and RecGet + // I have increase the ink_sleep time (about 3 secs) between RecSet and RecGet // for stat_c hoping that we got the RecExecRawStatSyncCbs at the middle of them - // so we can get the right value for stat_c. However, this will screw up + // so we can get the right value for stat_c. However, this will screw up // stat_d badly as we get NaN for stat_d. RecRawStat test_raw_stat_f; test_raw_stat_f.count = REC_ATOMIC_READ64(&(g_rsb->global[MY_STAT_F]->count)); @@ -506,7 +506,7 @@ Test03() { printf("[Test03: RawStat Test]\n"); - // Register raw statistics + // Register raw statistics g_rsb = RecAllocateRawStatBlock((int) MY_STAT_COUNT); RecRegisterRawStat(g_rsb, RECT_PROCESS, "proxy.process.test_raw_stat_a", @@ -525,7 +525,7 @@ Test03() RECD_FLOAT, RECP_NON_PERSISTENT, (int) MY_STAT_E, RecRawStatSyncHrTimeAvg); RecRegisterRawStat(g_rsb, RECT_PROCESS, "proxy.process.test_raw_stat_f", RECD_INT, RECP_NON_PERSISTENT, (int) MY_STAT_F, RecRawStatSyncCount); - // If forget to Register this RawStat, we will have SEGV when checking + // If forget to Register this RawStat, we will have SEGV when checking // g_rsb->global[MY_STAT_G] RecRegisterRawStat(g_rsb, RECT_PROCESS, "proxy.process.test_raw_stat_g", RECD_INT, RECP_NON_PERSISTENT, (int) MY_STAT_G, RecRawStatSyncSum); diff --git a/lib/records/test_records.config b/lib/records/test_records.config index be9df8e..5483233 100644 --- a/lib/records/test_records.config +++ b/lib/records/test_records.config @@ -4,13 +4,13 @@ # parse tests CONFIG proxy.config.parse_test_0a STRING CONFIG proxy.config.parse_test_1a STRING -CONFIG proxy.config.parse_test_1b STRING +CONFIG proxy.config.parse_test_1b STRING CONFIG proxy.config.parse_test_2a STRING X -CONFIG proxy.config.parse_test_2b STRING X +CONFIG proxy.config.parse_test_2b STRING X CONFIG proxy.config.parse_test_3a STRING XXX -CONFIG proxy.config.parse_test_3b STRING XXX +CONFIG proxy.config.parse_test_3b STRING XXX CONFIG proxy.config.parse_test_4a STRING XXX XXX XXX -CONFIG proxy.config.parse_test_4b STRING XXX XXX XXX +CONFIG proxy.config.parse_test_4b STRING XXX XXX XXX ########################################################################## # User Overridden Configs Below ########################################################################## diff --git a/lib/tsconfig/TsConfigSyntax.c b/lib/tsconfig/TsConfigSyntax.c index 63a0ca8..9d1bd33 100644 --- a/lib/tsconfig/TsConfigSyntax.c +++ b/lib/tsconfig/TsConfigSyntax.c @@ -8,8 +8,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 0 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -34,7 +34,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -51,7 +51,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; @@ -159,7 +159,15 @@ typedef void* yyscan_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -181,13 +189,14 @@ typedef size_t yy_size_t; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - + #define YY_LINENO_REWIND_TO(ptr) + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ + yy_size_t yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = yyg->yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ @@ -238,7 +247,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -326,7 +335,7 @@ void tsconfigfree (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ -#define tsconfigwrap(yyscanner) 1 +#define tsconfigwrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; @@ -338,6 +347,9 @@ typedef int yy_state_type; static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); +#if defined(__GNUC__) && __GNUC__ >= 3 +__attribute__((__noreturn__)) +#endif static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the @@ -368,7 +380,7 @@ static yyconst flex_int16_t yy_accept[48] = 0, 0, 0, 4, 0, 5, 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static yyconst YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, @@ -400,13 +412,13 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[21] = +static yyconst YY_CHAR yy_meta[21] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1 } ; -static yyconst flex_int16_t yy_base[54] = +static yyconst flex_uint16_t yy_base[54] = { 0, 0, 19, 23, 25, 67, 68, 64, 68, 19, 23, 68, 68, 56, 68, 52, 50, 68, 68, 68, 52, @@ -426,7 +438,7 @@ static yyconst flex_int16_t yy_def[54] = 47, 47, 47 } ; -static yyconst flex_int16_t yy_nxt[89] = +static yyconst flex_uint16_t yy_nxt[89] = { 0, 6, 7, 8, 9, 6, 10, 11, 12, 13, 6, 14, 15, 16, 17, 18, 19, 20, 6, 21, 22, @@ -483,7 +495,12 @@ static yyconst flex_int16_t yy_chk[89] = 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. - */ +*/ + +# if defined(__GNUC__) +# pragma GCC diagnostic ignored "-Wsign-compare" +# endif + # if ! (defined(__clang_analyzer__) || defined(__COVERITY__)) @@ -512,7 +529,7 @@ struct Location TsConfig_Lex_Location = { 0, 1 }; #define YY_NO_INPUT 1 -#line 516 "TsConfigSyntax.c" +#line 533 "TsConfigSyntax.c" #define INITIAL 0 #define bad 1 @@ -568,7 +585,7 @@ static int yy_init_globals (yyscan_t yyscanner ); /* This must go here because YYSTYPE and YYLTYPE are included * from bison output in section 1.*/ # define yylval yyg->yylval_r - + int tsconfiglex_init (yyscan_t* scanner); int tsconfiglex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); @@ -588,11 +605,11 @@ void tsconfigset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *tsconfigget_in (yyscan_t yyscanner ); -void tsconfigset_in (FILE * in_str ,yyscan_t yyscanner ); +void tsconfigset_in (FILE * _in_str ,yyscan_t yyscanner ); FILE *tsconfigget_out (yyscan_t yyscanner ); -void tsconfigset_out (FILE * out_str ,yyscan_t yyscanner ); +void tsconfigset_out (FILE * _out_str ,yyscan_t yyscanner ); yy_size_t tsconfigget_leng (yyscan_t yyscanner ); @@ -600,11 +617,11 @@ char *tsconfigget_text (yyscan_t yyscanner ); int tsconfigget_lineno (yyscan_t yyscanner ); -void tsconfigset_lineno (int line_number ,yyscan_t yyscanner ); +void tsconfigset_lineno (int _line_number ,yyscan_t yyscanner ); int tsconfigget_column (yyscan_t yyscanner ); -void tsconfigset_column (int column_no ,yyscan_t yyscanner ); +void tsconfigset_column (int _column_no ,yyscan_t yyscanner ); YYSTYPE * tsconfigget_lval (yyscan_t yyscanner ); @@ -622,6 +639,10 @@ extern int tsconfigwrap (yyscan_t yyscanner ); #endif #endif +#ifndef YY_NO_UNPUT + +#endif + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif @@ -642,7 +663,12 @@ static int input (yyscan_t yyscanner ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -731,7 +757,7 @@ extern int tsconfiglex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ @@ -744,16 +770,11 @@ extern int tsconfiglex \ */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 66 "TsConfigSyntax.l" - - -#line 756 "TsConfigSyntax.c" - yylval = yylval_param; if ( !yyg->yy_init ) @@ -782,7 +803,13 @@ YY_DECL tsconfig_load_buffer_state(yyscanner ); } - while ( 1 ) /* loops until end-of-file is reached */ + { +#line 71 "TsConfigSyntax.l" + + +#line 811 "TsConfigSyntax.c" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; @@ -799,7 +826,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -837,7 +864,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: /* rule 1 can match eol */ YY_RULE_SETUP -#line 68 "TsConfigSyntax.l" +#line 73 "TsConfigSyntax.l" { ++(TsConfig_Lex_Location._line); TsConfig_Lex_Location._col = 0; @@ -846,21 +873,22 @@ YY_RULE_SETUP case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 73 "TsConfigSyntax.l" +#line 78 "TsConfigSyntax.l" ZRET(STRING); /* Quote string overrides comments */ YY_BREAK case 3: YY_RULE_SETUP -#line 75 "TsConfigSyntax.l" +#line 80 "TsConfigSyntax.l" /* Ignore all white space. */ YY_BREAK case 4: /* rule 4 can match eol */ *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_cp - 1); yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 76 "TsConfigSyntax.l" +#line 81 "TsConfigSyntax.l" /* Leading '#' is a comment. */ YY_BREAK case 5: @@ -868,73 +896,73 @@ case 5: yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 77 "TsConfigSyntax.l" +#line 82 "TsConfigSyntax.l" /* Trailing '//' is a comment. */ YY_BREAK case 6: YY_RULE_SETUP -#line 79 "TsConfigSyntax.l" +#line 84 "TsConfigSyntax.l" ZRET(IDENT); YY_BREAK case 7: YY_RULE_SETUP -#line 80 "TsConfigSyntax.l" +#line 85 "TsConfigSyntax.l" ZRET(INTEGER); YY_BREAK case 8: YY_RULE_SETUP -#line 81 "TsConfigSyntax.l" +#line 86 "TsConfigSyntax.l" ZRET(GROUP_OPEN); YY_BREAK case 9: YY_RULE_SETUP -#line 82 "TsConfigSyntax.l" +#line 87 "TsConfigSyntax.l" ZRET(GROUP_CLOSE); YY_BREAK case 10: YY_RULE_SETUP -#line 83 "TsConfigSyntax.l" +#line 88 "TsConfigSyntax.l" ZRET(LIST_OPEN); YY_BREAK case 11: YY_RULE_SETUP -#line 84 "TsConfigSyntax.l" +#line 89 "TsConfigSyntax.l" ZRET(LIST_CLOSE); YY_BREAK case 12: YY_RULE_SETUP -#line 85 "TsConfigSyntax.l" +#line 90 "TsConfigSyntax.l" ZRET(PATH_OPEN); YY_BREAK case 13: YY_RULE_SETUP -#line 86 "TsConfigSyntax.l" +#line 91 "TsConfigSyntax.l" ZRET(PATH_CLOSE); YY_BREAK case 14: YY_RULE_SETUP -#line 87 "TsConfigSyntax.l" +#line 92 "TsConfigSyntax.l" ZRET(PATH_SEPARATOR); YY_BREAK case 15: YY_RULE_SETUP -#line 88 "TsConfigSyntax.l" +#line 93 "TsConfigSyntax.l" ZRET(ASSIGN); YY_BREAK case 16: YY_RULE_SETUP -#line 89 "TsConfigSyntax.l" +#line 94 "TsConfigSyntax.l" ZRET(SEPARATOR); YY_BREAK case 17: YY_RULE_SETUP -#line 91 "TsConfigSyntax.l" +#line 96 "TsConfigSyntax.l" BEGIN(bad); FILL; YY_BREAK case 18: /* rule 18 can match eol */ YY_RULE_SETUP -#line 92 "TsConfigSyntax.l" +#line 97 "TsConfigSyntax.l" { BEGIN(0); // Terminate bad token mode. ++(TsConfig_Lex_Location._line); // Must bump line count. @@ -944,20 +972,20 @@ YY_RULE_SETUP case 19: /* rule 19 can match eol */ YY_RULE_SETUP -#line 97 "TsConfigSyntax.l" +#line 102 "TsConfigSyntax.l" BEGIN(0); HANDLE_EVENT(InvalidToken); YY_BREAK case 20: YY_RULE_SETUP -#line 98 "TsConfigSyntax.l" +#line 103 "TsConfigSyntax.l" ++(yylval->_n); YY_BREAK case 21: YY_RULE_SETUP -#line 99 "TsConfigSyntax.l" +#line 104 "TsConfigSyntax.l" ECHO; YY_BREAK -#line 961 "TsConfigSyntax.c" +#line 989 "TsConfigSyntax.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(bad): yyterminate(); @@ -1090,6 +1118,7 @@ case YY_STATE_EOF(bad): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of tsconfiglex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1102,9 +1131,9 @@ case YY_STATE_EOF(bad): static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = yyg->yytext_ptr; - register int number_to_move, i; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + yy_size_t number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) @@ -1133,7 +1162,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -1146,7 +1175,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - yy_size_t num_to_read = + int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -1236,8 +1265,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner) static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; @@ -1245,7 +1274,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1270,11 +1299,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - register int yy_is_jam; + int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - register char *yy_cp = yyg->yy_c_buf_p; + char *yy_cp = yyg->yy_c_buf_p; - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1293,6 +1322,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner) return yy_is_jam ? 0 : yy_current_state; } +#ifndef YY_NO_UNPUT + +#endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) @@ -1443,12 +1476,12 @@ static void tsconfig_load_buffer_state (yyscan_t yyscanner) YY_BUFFER_STATE tsconfig_create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) tsconfigalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in tsconfig_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = (yy_size_t)size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. @@ -1509,7 +1542,7 @@ static void tsconfig_load_buffer_state (yyscan_t yyscanner) } b->yy_is_interactive = 0; - + errno = oerrno; } @@ -1609,15 +1642,15 @@ static void tsconfigensure_buffer_stack (yyscan_t yyscanner) * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ - num_to_alloc = 1; + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ yyg->yy_buffer_stack = (struct yy_buffer_state**)tsconfigalloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in tsconfigensure_buffer_stack()" ); - + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -1626,7 +1659,7 @@ static void tsconfigensure_buffer_stack (yyscan_t yyscanner) if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; + yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)tsconfigrealloc @@ -1646,12 +1679,12 @@ static void tsconfigensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE tsconfig_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -1687,7 +1720,7 @@ YY_BUFFER_STATE tsconfig_scan_buffer (char * base, yy_size_t size , yyscan_t y */ YY_BUFFER_STATE tsconfig_scan_string (yyconst char * yystr , yyscan_t yyscanner) { - + return tsconfig_scan_bytes(yystr,strlen(yystr) ,yyscanner); } @@ -1704,7 +1737,7 @@ YY_BUFFER_STATE tsconfig_scan_bytes (yyconst char * yybytes, yy_size_t _yybyte char *buf; yy_size_t n; yy_size_t i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) tsconfigalloc(n ,yyscanner ); @@ -1734,7 +1767,9 @@ YY_BUFFER_STATE tsconfig_scan_bytes (yyconst char * yybytes, yy_size_t _yybyte static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) { - (void) fprintf( stderr, "%s\n", msg ); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -1745,7 +1780,7 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) do \ { \ /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ + yy_size_t yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ @@ -1772,10 +1807,10 @@ YY_EXTRA_TYPE tsconfigget_extra (yyscan_t yyscanner) int tsconfigget_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yylineno; } @@ -1785,10 +1820,10 @@ int tsconfigget_lineno (yyscan_t yyscanner) int tsconfigget_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; - + return yycolumn; } @@ -1840,51 +1875,51 @@ void tsconfigset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) } /** Set the current line number. - * @param line_number + * @param _line_number line number * @param yyscanner The scanner object. */ -void tsconfigset_lineno (int line_number , yyscan_t yyscanner) +void tsconfigset_lineno (int _line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "tsconfigset_lineno called with no buffer" ); - - yylineno = line_number; + + yylineno = _line_number; } /** Set the current column. - * @param line_number + * @param _column_no column number * @param yyscanner The scanner object. */ -void tsconfigset_column (int column_no , yyscan_t yyscanner) +void tsconfigset_column (int _column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "tsconfigset_column called with no buffer" ); - - yycolumn = column_no; + + yycolumn = _column_no; } /** Set the input stream. This does not discard the current * input buffer. - * @param in_str A readable stream. + * @param _in_str A readable stream. * @param yyscanner The scanner object. * @see tsconfig_switch_to_buffer */ -void tsconfigset_in (FILE * in_str , yyscan_t yyscanner) +void tsconfigset_in (FILE * _in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; + yyin = _in_str ; } -void tsconfigset_out (FILE * out_str , yyscan_t yyscanner) +void tsconfigset_out (FILE * _out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; + yyout = _out_str ; } int tsconfigget_debug (yyscan_t yyscanner) @@ -1893,10 +1928,10 @@ int tsconfigget_debug (yyscan_t yyscanner) return yy_flex_debug; } -void tsconfigset_debug (int bdebug , yyscan_t yyscanner) +void tsconfigset_debug (int _bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ @@ -1960,20 +1995,20 @@ int tsconfiglex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_global errno = EINVAL; return 1; } - + *ptr_yy_globals = (yyscan_t) tsconfigalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - + if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } - + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - + tsconfigset_extra (yy_user_defined, *ptr_yy_globals); - + return yy_init_globals ( *ptr_yy_globals ); } @@ -2047,7 +2082,10 @@ int tsconfiglex_destroy (yyscan_t yyscanner) #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { - register int i; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } @@ -2056,7 +2094,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -2066,11 +2104,16 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) void *tsconfigalloc (yy_size_t size , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; return (void *) malloc( size ); } void *tsconfigrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -2083,12 +2126,14 @@ void *tsconfigrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) void tsconfigfree (void * ptr , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; free( (char *) ptr ); /* see tsconfigrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 99 "TsConfigSyntax.l" +#line 104 "TsConfigSyntax.l" diff --git a/lib/wccp/Makefile.am b/lib/wccp/Makefile.am index b17d471..8896ce5 100644 --- a/lib/wccp/Makefile.am +++ b/lib/wccp/Makefile.am @@ -27,7 +27,7 @@ AM_CPPFLAGS = \ #DEFS += $(WCCP_DEFS) noinst_LIBRARIES = libwccp.a -# noinst_PROGRAMS = test-cache +# noinst_PROGRAMS = test-cache libwccp_a_SOURCES = \ Wccp.h \ diff --git a/plugins/esi/README.combo b/plugins/esi/README.combo index 0cb3774..9e7fee2 100644 --- a/plugins/esi/README.combo +++ b/plugins/esi/README.combo @@ -12,7 +12,7 @@ The arguments in the plugin.config line in order represent 2) The name of the key used for signature verification (disabled by default) [verification not implemented yet] -3) A colon separated list of headers which, if present on atleast one +3) A colon separated list of headers which, if present on atleast one response, will be added to the combo response. A "-" can be supplied as a value for any of these arguments to request diff --git a/plugins/esi/handlers.cfg b/plugins/esi/handlers.cfg index abc3918..41202e9 100644 --- a/plugins/esi/handlers.cfg +++ b/plugins/esi/handlers.cfg @@ -17,7 +17,7 @@ # # # Format of this file: -# +# # # # diff --git a/plugins/experimental/ats_pagespeed/Makefile b/plugins/experimental/ats_pagespeed/Makefile index b0b0e7d..6bcc11c 100644 --- a/plugins/experimental/ats_pagespeed/Makefile +++ b/plugins/experimental/ats_pagespeed/Makefile @@ -52,7 +52,7 @@ INC =-I$(MOD_PAGESPEED_DIR)\ -I$(MOD_PAGESPEED_DIR)out/$(BUILDTYPE)/obj/gen\ -I$(MOD_PAGESPEED_DIR)out/$(BUILDTYPE)/obj/gen/protoc_out/instaweb -PSOL_LIBS = $(PAGESPEED_OUT)pagespeed_automatic.a +PSOL_LIBS = $(PAGESPEED_OUT)pagespeed_automatic.a #PSOL_LIBS = $(PAGESPEED_OUT)pagespeed_automatic.a $(PAGESPEED_OUT)libserf.a $(PAGESPEED_OUT)libaprutil.a $(PAGESPEED_OUT)libapr.a %.so: psol %.cc diff --git a/plugins/experimental/ats_pagespeed/Makefile.psol_source b/plugins/experimental/ats_pagespeed/Makefile.psol_source index f4c35723..1751aa6 100755 --- a/plugins/experimental/ats_pagespeed/Makefile.psol_source +++ b/plugins/experimental/ats_pagespeed/Makefile.psol_source @@ -41,9 +41,9 @@ PSOL_LIBS = $(MOD_PAGESPEED_DIR)net/instaweb/automatic/pagespeed_automatic.a all: gzip/gzip.so ats_pagespeed.so install: all - $(TSXS) -i -o ats_pagespeed.so + $(TSXS) -i -o ats_pagespeed.so cp gzip/gzip.so ./ - $(TSXS) -i -o zip.so + $(TSXS) -i -o zip.so clean: rm -f *.lo *.so *.o diff --git a/plugins/experimental/ats_pagespeed/README.md b/plugins/experimental/ats_pagespeed/README.md index c5171d5..baef8df 100644 --- a/plugins/experimental/ats_pagespeed/README.md +++ b/plugins/experimental/ats_pagespeed/README.md @@ -6,13 +6,13 @@ Apache Traffic Server web content optimization plugin powered by Google PageSpee http://www.atspagespeed.com/ To build, a simple 'make' should work. Use 'sudo make install' to install. -Optionally, patching ATS with ethread.patch helps with eliminating latency that +Optionally, patching ATS with ethread.patch helps with eliminating latency that sometimes gets induced when synchronising ATS's and PSOL's thread pools. After that, update ATS's plugin.config with: ``` -ats_pagespeed.so -gzip.so /usr/local/etc/trafficserver/gzip.config +ats_pagespeed.so +gzip.so /usr/local/etc/trafficserver/gzip.config ```` gzip.so also is build with ats_pagespeed, as it currently is a slightly modified version of the official one from the ATS repository. @@ -27,7 +27,7 @@ up immediately. A sample configuration: ``` # Base configuration for the module, all host-specific configuration -# will inherit. +# will inherit. pagespeed RewriteLevel CoreFilters # Mandatory FileCachePath setting. The path must exist and be read/write for the traffic_server process. pagespeed FileCachePath /tmp/ats_pagespeed/ diff --git a/plugins/experimental/ats_pagespeed/gzip/Makefile b/plugins/experimental/ats_pagespeed/gzip/Makefile index 6a02ae2..e36786c 100644 --- a/plugins/experimental/ats_pagespeed/gzip/Makefile +++ b/plugins/experimental/ats_pagespeed/gzip/Makefile @@ -18,7 +18,7 @@ TSXS?=tsxs all: $(TSXS) -o gzip.so -v -C *.cc -install: +install: $(TSXS) -v -i -o gzip.so clean: rm -f *.lo *.so diff --git a/plugins/experimental/ats_pagespeed/gzip/README b/plugins/experimental/ats_pagespeed/gzip/README index 2e74681..1a3b785 100644 --- a/plugins/experimental/ats_pagespeed/gzip/README +++ b/plugins/experimental/ats_pagespeed/gzip/README @@ -1,4 +1,4 @@ This gzip is not compiled, but only here to be able to diff later -with the official gzip plugin. It is very slightly modified no -be able to disable caching of its compressed output through a +with the official gzip plugin. It is very slightly modified no +be able to disable caching of its compressed output through a response header \ No newline at end of file diff --git a/plugins/experimental/buffer_upload/README b/plugins/experimental/buffer_upload/README index d09b8b2..90a6c2d 100644 --- a/plugins/experimental/buffer_upload/README +++ b/plugins/experimental/buffer_upload/README @@ -9,15 +9,15 @@ Version 0.1 (04/20/10) Upload proxy specs for phase I: -1. Memory buffering (buffer the entire POST data in IOBuffer before connecting to OS) +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 a request's size is larger than "mem_buffer_size" specifiied in config file, then the upload proxy feature will be disabled for this particular request -2. Disk buffering (buffer the entire POST data on disk before connecting to OS) +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 + . 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) @@ -37,7 +37,7 @@ Upload proxy specs for phase I: 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 + 4.4. use exact match, don't support regex for now 5. URL conversion for Mail's specific URL format 5.1. for now check if the "host" part in the URL is same as the proxy server name, then will do this conversion diff --git a/plugins/experimental/cache_range_requests/README b/plugins/experimental/cache_range_requests/README index faddeb5..18a88c6 100644 --- a/plugins/experimental/cache_range_requests/README +++ b/plugins/experimental/cache_range_requests/README @@ -12,8 +12,8 @@ This plugin reads the range request header byte range value and then creates a new cache key url using the original request url with the range value appended to it. The range header is removed where appropriate from the requests and the origin server response code is changed from a 206 to a 200 to insure that the -object is written to cache using the new cache key url. The response code sent -to the client will be changed back to a 206 and all requests to the origin server +object is written to cache using the new cache key url. The response code sent +to the client will be changed back to a 206 and all requests to the origin server will contain the range header so that the correct response is received. Installation: diff --git a/plugins/experimental/collapsed_connection/README b/plugins/experimental/collapsed_connection/README index 1eed602..0d85d1e 100644 --- a/plugins/experimental/collapsed_connection/README +++ b/plugins/experimental/collapsed_connection/README @@ -4,8 +4,8 @@ ATS (Apache Traffic Server) Collapsed Connection Handling Plugin This plugin collapses connections with identical CacheUrl/EffectiveUrl. If an entry was created for a given CacheUrl/EffectiveUrl in our global hashTable, -successive GET requests with identical CacheUrl/EffectiveUrl will be blocked in -POST_REMAP hook until the hash entry was removed. (POST_REMAP hook is the last +successive GET requests with identical CacheUrl/EffectiveUrl will be blocked in +POST_REMAP hook until the hash entry was removed. (POST_REMAP hook is the last hook before 'cache lookup') For requests going into 'cache lookup' stage, @@ -19,7 +19,7 @@ For requests going into 'read server response header' stage, if proxy.config.cache.enable_read_while_writer is enabled, hash entry will be removed at earliest possible time. else - hash entry will be removed in TXN_CLOSE hook. + hash entry will be removed in TXN_CLOSE hook. if response is not public cacheable, we will update hash entry with a special value to let successive requests pass collapsed check, this special hash entry will be removed in TXN_CLOSE hook if value of keep_pass_record_time is 0, diff --git a/plugins/experimental/custom_redirect/README b/plugins/experimental/custom_redirect/README index 05bf447..87448d8 100644 --- a/plugins/experimental/custom_redirect/README +++ b/plugins/experimental/custom_redirect/README @@ -1,4 +1,4 @@ -In /home/y/conf/yts/plugin.config, you can add +In /home/y/conf/yts/plugin.config, you can add 1) custom_redirect.so or 2) custom_redirect.so wretch-redirect-url @@ -7,7 +7,7 @@ In /home/y/conf/yts/plugin.config, you can add Case 1) means using the default header (x-redirect-url) to specify a URL to redirect to; Case 2) user specifies their specific header name (to replace the default one) to specify a URL to redirect to; -Case 3) user sepcifies the specific return code, if return code matches, then plugin will force to redirect to the +Case 3) user sepcifies the specific return code, if return code matches, then plugin will force to redirect to the URL specified in standard "Location" header. For simplicity, we recommend to use case 1) @@ -28,9 +28,9 @@ Version 0.2 (11/09/09, wenjing) - Add more instruction This is a plugin for YTS (Yahoo Traffic Server) that allows OS (Origin Server) -to do either of the following two things: +to do either of the following two things: - 1) specify a particular response header (default: x-redirect-url) with a URL + 1) specify a particular response header (default: x-redirect-url) with a URL that forces YTS redirect to that URL; 2) specify a particular return error code (such as 507) with a standard Location @@ -38,4 +38,4 @@ to do either of the following two things: Version 0.1 (09/17/09, wenjing) - Initial version. - + diff --git a/plugins/experimental/geoip_acl/README b/plugins/experimental/geoip_acl/README index 9694218..4c51e70 100644 --- a/plugins/experimental/geoip_acl/README +++ b/plugins/experimental/geoip_acl/README @@ -13,7 +13,7 @@ The build and installation requires a full installation of Apache Traffic Server v3.0.0 or later. A prerequisite for this is an installation of the MaxMind GeoIP libraries and include files. E.g. GeoIP-devel. - + Configuration ============= @@ -67,7 +67,7 @@ allow all requests that don't match. For example map http://example.com http://music.example.com \ @plugin=geoip_acl.so @pparam=country @pparam=allow @pparam= US \ - @pparam=regex::/etc/music.regex + @pparam=regex::/etc/music.regex This tells the plugin that in the situation where there is no matching diff --git a/plugins/experimental/money_trace/Makefile.inc b/plugins/experimental/money_trace/Makefile.inc index 70bda66..f86ccee 100644 --- a/plugins/experimental/money_trace/Makefile.inc +++ b/plugins/experimental/money_trace/Makefile.inc @@ -17,5 +17,5 @@ pkglib_LTLIBRARIES += experimental/money_trace/money_trace.la experimental_money_trace_money_trace_la_SOURCES = \ - experimental/money_trace/money_trace.cc + experimental/money_trace/money_trace.cc diff --git a/plugins/experimental/money_trace/README b/plugins/experimental/money_trace/README index 56401ea..f24cbb1 100644 --- a/plugins/experimental/money_trace/README +++ b/plugins/experimental/money_trace/README @@ -1,20 +1,20 @@ -Money trace plugin +Money trace plugin This is a remap plugin that allows ATS to participate in a distrbuted tracing system based upon the Comcast "Money" distributed tracing and monitoring library. The Comcast "Money" library has its roots in Google's Dapper and Twitters Zipkin systems. A money trace header or session id, is - attached to transaction and allows an operator with the appropriate logging systems in place, - to determine where errors and/or latency may exit. + attached to transaction and allows an operator with the appropriate logging systems in place, + to determine where errors and/or latency may exit. - Use of the library enables the tracing of a transaction through all systems that participate in - handling the request. See the documentation on this open source library at + Use of the library enables the tracing of a transaction through all systems that participate in + handling the request. See the documentation on this open source library at https://github.com/Comcast/money/wiki. This plugin checks incoming requests for the "X-MoneyTrace" header. If the header is not present no further processing takes place. However if the header is present, the plugin will check to to see if the request has been cached. If so, the plugin will add the "X-Moneytrace" header from the - incoming request to the cached response returned to the client as required by the money_trace - protocol. If the request has not been cached, the plugin will extends the trace context by creating a new + incoming request to the cached response returned to the client as required by the money_trace + protocol. If the request has not been cached, the plugin will extends the trace context by creating a new "X-MoneyTrace" header for inclusion in the outgoing request to a parent cache or origin server. The extended header includes the 'trace-id' from the incoming request, the incoming span-id becomes the outgoing parent-id and the plugin generates a new random long span id for the outgoing request. diff --git a/plugins/experimental/mysql_remap/README b/plugins/experimental/mysql_remap/README index ab224f4..2817fe1 100644 --- a/plugins/experimental/mysql_remap/README +++ b/plugins/experimental/mysql_remap/README @@ -5,7 +5,7 @@ Apache Traffic Server MySQL-based remap plugin This is a basic plugin for doing dynamic "remaps" from a database. It essentially rewrites the incoming request's Host header / origin server connection to one retrieved from a database. -The generic proxying setup is the following: +The generic proxying setup is the following: UA ----> Traffic Server ----> Origin Server @@ -19,15 +19,15 @@ Ends up requesting http://original.host.com/path/to/something With this plugin enabled, you can easily change that to anywhere you desire. Imagine the many possibilities.... I have benchmarked this at about 9200 requests/sec (1.7k object) on a junky imac with mysql, ab & trafficserver local. Real performance -is likely substantially higher up to your mysql's max queries / second. +is likely substantially higher up to your mysql's max queries / second. == Build == A simple % make install -should do it, assuming that you have the tsxs script in your search path. -This script is installed with your installation of Apache Traffic Server. +should do it, assuming that you have the tsxs script in your search path. +This script is installed with your installation of Apache Traffic Server. NOTE: you may need to open the Makefile and adjust the paths to MySQL client includes & libraries @@ -49,7 +49,7 @@ The INI file should contain the following values: mysql_host = localhost #default mysql_port = 3306 #default mysql_username = root -mysql_password = +mysql_password = mysql_database = mysql_remap #default To debug errors, start trafficserver manually using: @@ -63,7 +63,7 @@ And resolve any errors or warnings displayed. * ericb@apache.org / eric@ericbalsa.com * http://www.ericbalsa.com -== TODO == +== TODO == * some stupid bug in the ini parsing requiring a blank trailing \n * make db backend pluggable * handle mysql connections a bit more intelligently diff --git a/plugins/experimental/mysql_remap/sample.ini b/plugins/experimental/mysql_remap/sample.ini index e7f7a60..912090c 100644 --- a/plugins/experimental/mysql_remap/sample.ini +++ b/plugins/experimental/mysql_remap/sample.ini @@ -20,5 +20,5 @@ mysql_host = localhost #default mysql_port = 3306 #default mysql_username = root -mysql_password = +mysql_password = mysql_database = mysql_remap #default diff --git a/plugins/experimental/ssl_cert_loader/ssl_cert_loader.cfg b/plugins/experimental/ssl_cert_loader/ssl_cert_loader.cfg index 10bd37e..20b1d1b 100644 --- a/plugins/experimental/ssl_cert_loader/ssl_cert_loader.cfg +++ b/plugins/experimental/ssl_cert_loader/ssl_cert_loader.cfg @@ -38,14 +38,14 @@ runtime-table-size = "10000"; // The attributes specified by matches in both rule lists will be used // to process the connection. If either rule list specifies a "tunnel" action -// the connection will be blind tunneled. If either rule specifies a "deny" +// the connection will be blind tunneled. If either rule specifies a "deny" // action, the handshake processing will stop // Each rule list will be evaluated in order and stop on a match - + ssl-server-match = ( - { server-ip = "192.168.56.0-192.168.56.255"; + { server-ip = "192.168.56.0-192.168.56.255"; action="proxy"; /* Default if no action is specified */ server-cert = "server1.pem"; ssl-key-name = "privkey.pem"; @@ -65,7 +65,7 @@ ssl-server-match = ssl-key-name = "privkey.pem"; }, { - /* Could include characteristics of the offered ciphers in + /* Could include characteristics of the offered ciphers in evaluating the actions */ offered-cipher-constraint = { compare-op = "not-include"; @@ -75,15 +75,15 @@ ssl-server-match = ssl-key-name = "privkey.pem"; }, - { + { /* Default, if no server-ip or server-name is specified, use the name in the certificate */ - server-name = "@"; - action="proxy"; + server-name = "@"; + action="proxy"; server-cert = "server3.pem"; ssl-key-name = "privkey.pem"; }, - { + { /* With the defaults, devolves to the base case of the ssl_multicert.config */ server-cert = "server5.pem"; @@ -94,10 +94,10 @@ ssl-server-match = directly in the match rule will override the ssl-options */ { server-ip = "192.168.100.0-192.168.100.100"; - ssl-options = ; + ssl-options = ; }, { server-ip = "192.168.110.0-192.168.110.100"; - ssl-options = ; + ssl-options = ; }, { server-name = "*.yahoo.com"; action="tunnel"; @@ -108,7 +108,7 @@ ssl-server-match = } ); -ssl-client-match: +ssl-client-match: ( // In all cases, use the same cipher-suites { use-client-cipher-suite = < cipher-suites.ecdhe >; @@ -118,19 +118,19 @@ ssl-client-match: { client-ip = ("10.10.10.0-10.10.10.255", "10.10.50.152"); action = "tunnel"; } - /* Clients from the office must use an authorized client certificate + /* Clients from the office must use an authorized client certificate Proxy must verify. Must specify cert to use with origin server */ { client-ip = "10.10.20.0-10.10.20.255"; client-cert = "valid"; /* Specify, or rely on your system settings for cert verification */ - ssl-signer-cert-name = "signers.pem"; + ssl-signer-cert-name = "signers.pem"; client-cert-name = "client1.pem"; priv-key-name = "client-priv-key.pem"; }, /* Clients from the other office are not yet set up with client certs. But must provide client certs for the origin server */ { client-ip = "10.10.30.0-10.10.30.255"; - /* Could be present or not, don't care, this is the default + /* Could be present or not, don't care, this is the default Other options are valid, present, or none */ client-cert = "unknown"; diff --git a/plugins/experimental/ssl_cert_loader/ssl_start.cfg b/plugins/experimental/ssl_cert_loader/ssl_start.cfg index 39d45cb..48525bd 100644 --- a/plugins/experimental/ssl_cert_loader/ssl_start.cfg +++ b/plugins/experimental/ssl_cert_loader/ssl_start.cfg @@ -38,16 +38,16 @@ runtime-table-size = "10000" // The attributes specified by matches in both rule lists will be used // to process the connection. If either rule list specifies a "tunnel" action -// the connection will be blind tunneled. If either rule specifies a "deny" +// the connection will be blind tunneled. If either rule specifies a "deny" // action, the handshake processing will stop // Each rule list will be evaluated in order and stop on a match - -ssl-server-match = + +ssl-server-match = ( // Using the same private key for all of my certs { ssl-key-name = "privkey.pem"; - child-match = + child-match = ( { server-ip = "107.23.60.186"; action = "tunnel" @@ -57,7 +57,7 @@ ssl-server-match = }, { server-cert-name = "asba.pem" }, - { server-name = "www.yahoo.com"; + { server-name = "www.yahoo.com"; server-cert-name = "asba.pem" }, { server-cert-name = "buseyil.pem" diff --git a/plugins/experimental/stale_while_revalidate/Makefile.tsxs b/plugins/experimental/stale_while_revalidate/Makefile.tsxs index 30e651e..805c458 100644 --- a/plugins/experimental/stale_while_revalidate/Makefile.tsxs +++ b/plugins/experimental/stale_while_revalidate/Makefile.tsxs @@ -18,7 +18,7 @@ PLUGIN=stale_while_revalidate TSXS?=tsxs all: ${PLUGIN}.c - $(TSXS) -v -o ${PLUGIN}.so $? + $(TSXS) -v -o ${PLUGIN}.so $? install: $(TSXS) -i -o ${PLUGIN}.so diff --git a/plugins/experimental/ts_lua/ci/.luacov b/plugins/experimental/ts_lua/ci/.luacov index 0d92930..e1e9077 100644 --- a/plugins/experimental/ts_lua/ci/.luacov +++ b/plugins/experimental/ts_lua/ci/.luacov @@ -41,7 +41,7 @@ return { -- Delete stats file after reporting? deletestats = false, - + -- Process Lua code loaded from raw strings -- (that is, when the 'source' field in the debug info -- does not start with '@') diff --git a/plugins/experimental/ts_lua/ci/README b/plugins/experimental/ts_lua/ci/README index a96e0ac..89710a2 100644 --- a/plugins/experimental/ts_lua/ci/README +++ b/plugins/experimental/ts_lua/ci/README @@ -10,10 +10,10 @@ Follow the steps below to use busted framework to run some unit tests on sample 4) Run "sudo luarocks install luacov" -5) "cd trafficserver/plugins/experimental/ts_lua/ci" +5) "cd trafficserver/plugins/experimental/ts_lua/ci" 6) Run "busted -c module_test.lua; luacov". It will produce "luacov.report.out" containing the code coverage on -"module.lua" +"module.lua" 7) Run "busted -c script_test.lua; luacov". It will produce "luacov.report.out" containing the code coverage on "script.lua" @@ -22,6 +22,6 @@ Reference for further information 1) Busted - http://olivinelabs.com/busted/ 2) Specifications for asserts/mocks/stubs/etc inside busted framework - -https://github.com/Olivine-Labs/luassert/tree/master/spec +https://github.com/Olivine-Labs/luassert/tree/master/spec 3) luacov - https://luarocks.org/modules/hisham/luacov diff --git a/plugins/experimental/ts_lua/ci/module_test.lua b/plugins/experimental/ts_lua/ci/module_test.lua index b5ccd16..b142238 100644 --- a/plugins/experimental/ts_lua/ci/module_test.lua +++ b/plugins/experimental/ts_lua/ci/module_test.lua @@ -31,20 +31,20 @@ describe("Busted unit testing framework", function() end) it("test - module.set_hook", function() - stub(ts, "hook") + stub(ts, "hook") local module = require("module") module.set_hook() - + assert.stub(ts.hook).was.called_with(TS_LUA_HOOK_TXN_CLOSE, module.test) end) it("test - module.set_context", function() local module = require("module") - + module.set_context() - + assert.are.equals('test10', ts.ctx['test']) end) @@ -58,7 +58,7 @@ describe("Busted unit testing framework", function() it("test - module.return_constant", function() local module = require("module") - + local result = module.return_constant() assert.are.equals(TS_LUA_REMAP_DID_REMAP, result) diff --git a/plugins/experimental/ts_lua/ci/script_test.lua b/plugins/experimental/ts_lua/ci/script_test.lua index 1c1d158..d663ca4 100644 --- a/plugins/experimental/ts_lua/ci/script_test.lua +++ b/plugins/experimental/ts_lua/ci/script_test.lua @@ -23,11 +23,11 @@ describe("Busted unit testing framework", function() it("test - script", function() stub(ts.client_request, "set_url_host") stub(ts.client_request, "set_url_port") - stub(ts.client_request, "set_url_scheme") + stub(ts.client_request, "set_url_scheme") require("script") local result = do_remap() - + assert.stub(ts.client_request.set_url_host).was.called_with("192.168.231.130") assert.stub(ts.client_request.set_url_port).was.called_with(80) assert.stub(ts.client_request.set_url_scheme).was.called_with("http") diff --git a/plugins/experimental/ts_lua/example/test_closure.lua b/plugins/experimental/ts_lua/example/test_closure.lua index edd973d..ad1a741 100644 --- a/plugins/experimental/ts_lua/example/test_closure.lua +++ b/plugins/experimental/ts_lua/example/test_closure.lua @@ -14,7 +14,7 @@ -- See the License for the specific language governing permissions and -- limitations under the License. -ts.hook(TS_LUA_HOOK_READ_REQUEST_HDR, +ts.hook(TS_LUA_HOOK_READ_REQUEST_HDR, function() ts.debug('read_request') return 0 diff --git a/plugins/experimental/ts_lua/example/test_global_hook.lua b/plugins/experimental/ts_lua/example/test_global_hook.lua index fcdb56b..daaaeeb 100644 --- a/plugins/experimental/ts_lua/example/test_global_hook.lua +++ b/plugins/experimental/ts_lua/example/test_global_hook.lua @@ -18,7 +18,7 @@ function do_global_txn_start() ts.debug('txn_start') return 0 -end +end function do_global_read_request() ts.debug('read_request') @@ -64,7 +64,7 @@ end function do_global_cache_lookup_complete() ts.debug('cache_lookup_complete') - + return 0 end diff --git a/plugins/experimental/ts_lua/example/test_txn_hook.lua b/plugins/experimental/ts_lua/example/test_txn_hook.lua index e95a4df..09b9789 100644 --- a/plugins/experimental/ts_lua/example/test_txn_hook.lua +++ b/plugins/experimental/ts_lua/example/test_txn_hook.lua @@ -30,7 +30,7 @@ function do_global_txn_start() ts.hook(TS_LUA_HOOK_TXN_CLOSE, txn_close) return 0 -end +end function read_request() ts.debug('read_request') @@ -76,7 +76,7 @@ end function cache_lookup() ts.debug('cache_lookup_complete') - + return 0 end diff --git a/plugins/experimental/webp_transform/README b/plugins/experimental/webp_transform/README index 595d0e6..21bda14 100644 --- a/plugins/experimental/webp_transform/README +++ b/plugins/experimental/webp_transform/README @@ -1,4 +1,4 @@ Converting jpeg and png to webp using ImageMagick Magick++ lib Pre-requisites -1. Magick++ api for ImageMagick +1. Magick++ api for ImageMagick diff --git a/plugins/gzip/README b/plugins/gzip/README index 4872369..601c0a6 100644 --- a/plugins/gzip/README +++ b/plugins/gzip/README @@ -9,7 +9,7 @@ make && sudo make install if no makefile is present, you can compile it using tsxs -o gzip.so *.cc -and then install it using +and then install it using tsxs -i -o gzip.so after installation, add a line to plugin.config: @@ -60,7 +60,7 @@ disallow /notthis/*.js disallow /notthat* disallow */bla* -#override the global configuration for a host. +#override the global configuration for a host. #www.foo.nl does NOT inherit anything [www.foo.nl] enabled true diff --git a/plugins/gzip/sample.gzip.config b/plugins/gzip/sample.gzip.config index 2dd34ae..5fec6f5 100644 --- a/plugins/gzip/sample.gzip.config +++ b/plugins/gzip/sample.gzip.config @@ -43,7 +43,7 @@ disallow /notthis/*.js disallow /notthat* disallow */bla* -#override the global configuration for a host. +#override the global configuration for a host. #www.foo.nl does NOT inherit anything [www.foo.nl] enabled true diff --git a/plugins/healthchecks/README b/plugins/healthchecks/README index e3e9791..fbae057 100644 --- a/plugins/healthchecks/README +++ b/plugins/healthchecks/README @@ -1,6 +1,6 @@ This is a simple plugin, to provide basic (but configurable) health checks. This is a server intercept plugin, and it takes one single configuration -option in plugin.config, the configuration file name. +option in plugin.config, the configuration file name. This configuration contains one, or several, lines of the format diff --git a/proxy/ClassH.txt b/proxy/ClassH.txt index 95fbfc7..abe6701 100644 --- a/proxy/ClassH.txt +++ b/proxy/ClassH.txt @@ -1,5 +1,5 @@ - - + + Thread { thread_key, processor } | @@ -9,35 +9,35 @@ DLL timeout_events, DLL free_events } - + | | IOThread { DLL io_events, DLL free_connections; } - + / \ / \ DNSThread AcceptThread - - + + VConnection - + | | EventContinuation - + / \ / \ IOVConnection DNSEntry - + / \ \ / \ \ \ \ @@ -50,7 +50,7 @@ DiskIOVConnection \ \ Processor - + | | EventProcessor @@ -63,18 +63,18 @@ DiskIOVConnection \ \ / \ / \ \ - DiskProcessor + DiskProcessor NetProcessor - + | | - + DNSProcessor - - + + class VConnection: ================== vio_queue : queue of io operations. diff --git a/proxy/InkAPI-ensure-funcs-present.pl b/proxy/InkAPI-ensure-funcs-present.pl index fd02dc9..660a609 100644 --- a/proxy/InkAPI-ensure-funcs-present.pl +++ b/proxy/InkAPI-ensure-funcs-present.pl @@ -45,5 +45,5 @@ foreach $func (@funcs) print $result; } - - + + diff --git a/proxy/README-stats.otl b/proxy/README-stats.otl index 4474c56..91a7bd3 100644 --- a/proxy/README-stats.otl +++ b/proxy/README-stats.otl @@ -12,7 +12,7 @@ existing stat system: 6) relationship with manager. Specifically, some of the stats reported seemed incorrect. -In the cases where individual stats were incorrect (e.g. +In the cases where individual stats were incorrect (e.g. number of bytes transferred), it is suspected that atomicity issues played a role. For example, if the stat variable was 64 bits long, were all 64 bits being read and written atomically? @@ -28,13 +28,13 @@ the hit rate may appear incorrect. Some stats are interrelated with other stats (e.g. number of client requests and number of cache lookups). Inconsistencies -between such stats may show up if for example one of the +between such stats may show up if for example one of the values is accessed and before the other value is accessed, it is allowed to change. A single client request may then, for example, show two cache lookups. These issues can be aggravated by allowing administrators to -clear stat values. This lead us to introduce persistence: +clear stat values. This lead us to introduce persistence: disallow clearing of stats. While this does deal with the problems associated with clearing, it does not address the coupling, inconsistency or atomicity problems. Those remain. @@ -98,7 +98,7 @@ require just atomic access, however, it may be better to allow direct access, without getting a lock. This may reduce lock contention. We ran two experiments to investigate the performance issue. -The existing stat system allows for individual atomic access to all stats. +The existing stat system allows for individual atomic access to all stats. We compared the performance of this system with a system where instead of atomic access, all access requires getting a single lock. The results from inkbench are as follows. @@ -176,17 +176,17 @@ divide stats into 2 groups: Types Of Stats: --------------- * event system stats - ** average idle time per thread - ** variance of idle time per thread - ** average event exec rate per thread - ** variance of event exec rate per thread - ** average execution time per event - ** variance of execution time per event - ** average failed mutexes per event - ** variance of failed mutexes per event + ** average idle time per thread + ** variance of idle time per thread + ** average event exec rate per thread + ** variance of event exec rate per thread + ** average execution time per event + ** variance of execution time per event + ** average failed mutexes per event + ** variance of failed mutexes per event ** average time lag per event ** variance of time lag per event - + * socks processor stats ** connections unsuccessful ** connections successful @@ -274,7 +274,7 @@ Types Of Stats: **** POSTs **** DELETEs **** CONNECTs - *** number of invalid requests + *** number of invalid requests *** number of broken client connections *** number of proxied requests **** user-specified @@ -345,7 +345,7 @@ STAT(Count, log2_stat_log_files_space_used), UI // events STAT(Count, log2_stat_event_log_error), UI STAT(Count, log2_stat_event_log_access), UI -STAT(Count, log2_stat_event_log_access_fail), +STAT(Count, log2_stat_event_log_access_fail), STAT(Count, log2_stat_event_log_access_skip), UI --------------------------------------------------------------------------------- diff --git a/proxy/config/body_factory/default/access#redirect_url b/proxy/config/body_factory/default/access#redirect_url index d06b4bd..3a4fcf1 100644 --- a/proxy/config/body_factory/default/access#redirect_url +++ b/proxy/config/body_factory/default/access#redirect_url @@ -1,15 +1,15 @@ - - - Authentication Failed - - + + + Authentication Failed + + - -

Authentication Failed.

-
- - Please wait while you are redirected to another page. + +

Authentication Failed.

+
+ + Please wait while you are redirected to another page. If your browser fails to redirect, click on this link. - +
diff --git a/proxy/config/body_factory/default/interception#no_host b/proxy/config/body_factory/default/interception#no_host index 18d29dc..7159d91 100644 --- a/proxy/config/body_factory/default/interception#no_host +++ b/proxy/config/body_factory/default/interception#no_host @@ -8,7 +8,7 @@
-Description: An attempt was made to transparently proxy your request, +Description: An attempt was made to transparently proxy your request, but this attempt failed because your browser did not send an HTTP "Host" header. To access this web site correctly, you will need to upgrade to a browser that supports the HTTP "Host" header field. diff --git a/proxy/config/body_factory/default/request#cycle_detected b/proxy/config/body_factory/default/request#cycle_detected index 0cc7c59..b0facc5 100644 --- a/proxy/config/body_factory/default/request#cycle_detected +++ b/proxy/config/body_factory/default/request#cycle_detected @@ -8,7 +8,7 @@
-Description: Could not process your request for the document +Description: Could not process your request for the document because it would cause an HTTP proxy cycle. Please check the URL and your browser's proxy settings. diff --git a/proxy/config/body_factory/default/request#syntax_error b/proxy/config/body_factory/default/request#syntax_error index bb3fbb2..419cbe2 100644 --- a/proxy/config/body_factory/default/request#syntax_error +++ b/proxy/config/body_factory/default/request#syntax_error @@ -8,7 +8,7 @@
-Description: Could not process this request. +Description: Could not process this request.
diff --git a/proxy/config/body_factory/default/timeout#activity b/proxy/config/body_factory/default/timeout#activity index 0d3eabe..12c9c50 100644 --- a/proxy/config/body_factory/default/timeout#activity +++ b/proxy/config/body_factory/default/timeout#activity @@ -8,7 +8,7 @@
-Description: Too much time has passed transmitting document. +Description: Too much time has passed transmitting document.
diff --git a/proxy/config/body_factory/default/timeout#inactivity b/proxy/config/body_factory/default/timeout#inactivity index 0ac28da..353ba9a 100644 --- a/proxy/config/body_factory/default/timeout#inactivity +++ b/proxy/config/body_factory/default/timeout#inactivity @@ -8,7 +8,7 @@
-Description: Too much time has passed without sending any data for document. +Description: Too much time has passed without sending any data for document.
diff --git a/proxy/config/cache.config.default b/proxy/config/cache.config.default index f795978..a5d7e0a 100644 --- a/proxy/config/cache.config.default +++ b/proxy/config/cache.config.default @@ -53,5 +53,5 @@ # # Examples # -# Revalidate all http objects from www.example.com after 2 hours +# Revalidate all http objects from www.example.com after 2 hours # dest_domain=www.example.com scheme=http revalidate=2h diff --git a/proxy/config/cluster.config.default b/proxy/config/cluster.config.default index fb94d84..a9962f8 100644 --- a/proxy/config/cluster.config.default +++ b/proxy/config/cluster.config.default @@ -8,7 +8,7 @@ # ############################################################################ # Number -# IP:Port +# IP:Port # ... ############################################################################ # Number = { 0, 1 ... } where 0 is a stand-alone proxy diff --git a/proxy/config/hosting.config.default b/proxy/config/hosting.config.default index 6ab193e..e4100b6 100644 --- a/proxy/config/hosting.config.default +++ b/proxy/config/hosting.config.default @@ -4,7 +4,7 @@ # Documentation: # https://docs.trafficserver.apache.org/en/latest/admin-guide/files/hosting.config.en.html # -# The purpose of this file is to specify the volumes that +# The purpose of this file is to specify the volumes that # specific hostnames or domains should be stored in. # # Each line consists of a set of tag value pairs. The pairs @@ -19,13 +19,13 @@ # # Available directives are: # volume= (comma separated list of volumes) -# -# All requests that -# don't belong to the list of hostnames in this file go to the +# +# All requests that +# don't belong to the list of hostnames in this file go to the # volumes specified with the hostname or domain name = '*' -# -# For example: to store all inktomi objects in volume 2 +# +# For example: to store all inktomi objects in volume 2 # hostname=www.example.com volume=2 # To direct all other requests to volumes 3 and 4 # hostname=* volume=3,4 -# +# diff --git a/proxy/config/icp.config.default b/proxy/config/icp.config.default index f123e8c..7fa54a4 100644 --- a/proxy/config/icp.config.default +++ b/proxy/config/icp.config.default @@ -35,8 +35,8 @@ # # Example #2 (1 parent and 1 sibling using MultiCast): # ============================================================================ -# host1 209.1.33.10 1 8080 3130 1 239.128.16.128 1 -# host2 209.1.33.11 2:8080:3130 1 239.128.16.128 1 +# host1 209.1.33.10 1 8080 3130 1 239.128.16.128 1 +# host2 209.1.33.11 2:8080:3130 1 239.128.16.128 1 # Note: trailing space in previous lines. # ############################################################################### diff --git a/proxy/config/parent.config.default b/proxy/config/parent.config.default index 1bc5881..4a92cee 100644 --- a/proxy/config/parent.config.default +++ b/proxy/config/parent.config.default @@ -37,15 +37,15 @@ # go_direct={true,false} # round_robin={strict,true,false} # -# Note: for round_robin, strict means strict round_robin - parents are -# tried one by one, true means round_robin based on client IP +# Note: for round_robin, strict means strict round_robin - parents are +# tried one by one, true means round_robin based on client IP # addresses, false means no round_robin -# +# # Each line must include a parent= directive or a go_direct= # directive. If both appear, Traffic Server will directly -# contact the origin server if all the listed parent proxies +# contact the origin server if all the listed parent proxies # are down -# +# # Example # # Alternate requests between proxy1 and proxy2 diff --git a/proxy/config/socks.config.default b/proxy/config/socks.config.default index cd9e06a..b0ead07 100644 --- a/proxy/config/socks.config.default +++ b/proxy/config/socks.config.default @@ -22,7 +22,7 @@ no_socks 123.14.84.1 - 123.14.89.4, 109.32.15.2 # Format for username/password used by traffic_server when it connects to # the SOCKS server: # auth u -# The letter u says it is of type username/password. +# The letter u says it is of type username/password. # e.g: # auth u traffic_server inktomi # diff --git a/proxy/config/splitdns.config.default b/proxy/config/splitdns.config.default index bd1d483..a6f1dd3 100644 --- a/proxy/config/splitdns.config.default +++ b/proxy/config/splitdns.config.default @@ -10,7 +10,7 @@ # Each line consists of a set of tag value pairs. The pairs # are in the format =. Please note that there # should not be any spaces in the specifiers. -# +# # Each line must include exactly one primary specifier # # Primary destination specifiers are @@ -23,36 +23,36 @@ # Required: # named= ( required; a DNS server; port may be included, # separated by ':'. If none provided, the default -# port used is 53. Multiple DNS server may be +# port used is 53. Multiple DNS server may be # specified, separated by spaces or ';'. The -# DNS servers are required to be in ip address +# DNS servers are required to be in ip address # format ) # -# Optional: +# Optional: # def_domain= ( optional; when provided, only one default # may be listed on the line ) # -# search_list= ( optional; however, if provided, requires at +# search_list= ( optional; however, if provided, requires at # least one search domain. If an organization -# has multiple zones, they may be specified, +# has multiple zones, they may be specified, # separated by spaces or ';'. ) -# +# # Each line must include at least a named= directive with an IP address # in the "dot" format. "def_domain=" and "search_list=" are optional. # # Additional notes: # # For improved performance, the system has a 'fast path', which is activated -# when all the primary destination specifiers are of the type +# when all the primary destination specifiers are of the type # 'dest_domain' or 'dest_host'. It also requires that the number of rules # not exceed four (4). One of the side effect of this is, the first match # will terminate the search. # -# If a host name is not fully qualified, i.e. does not have the domain +# If a host name is not fully qualified, i.e. does not have the domain # specifier (ex. 'internal' instead of internal.example.com'), then -# there is no rule using the primary destination specifier 'url_regex'. +# there is no rule using the primary destination specifier 'url_regex'. +# # -# # Example: # #dest_domain=int.ik.com named="255.257..." def_domain="int.ik.com" search_list="int.ik.com mkt.ik.com" diff --git a/proxy/config/volume.config.default b/proxy/config/volume.config.default index 593d3c7..c1aa036 100644 --- a/proxy/config/volume.config.default +++ b/proxy/config/volume.config.default @@ -11,24 +11,24 @@ # Each line consists of a tag value pair. # volume= scheme= size= # -# volume_number can be any value between 1 and 255. -# This limits the maximum number of volumes to 255. -# Volume number 0 is reserved for the special free volume. +# volume_number can be any value between 1 and 255. +# This limits the maximum number of volumes to 255. +# Volume number 0 is reserved for the special free volume. # Each line MUST have a distinct volume number. # # The only scheme currently supported is 'http. # # volume_size can either be specified in percentage of the total # cache space or absolute value. It must be a multiple of 128 Megabytes, -# with 128 Megabytes being the smallest size possible. If specified in -# percentage, the size is rounded down to the closest multiple of -# 128 Megabytes. A volume can be as big as the whole cache. -# Each volume is striped across several disks to -# achieve parallel I/O. For example, if there are 4 disks, +# with 128 Megabytes being the smallest size possible. If specified in +# percentage, the size is rounded down to the closest multiple of +# 128 Megabytes. A volume can be as big as the whole cache. +# Each volume is striped across several disks to +# achieve parallel I/O. For example, if there are 4 disks, # a 1 Gigabyte volume will have 256 Megabytes on each # disk (assuming each disk has enough free space available). # -# To create one volume of size 10% of the total cache space and -# another 1 Gig volume, +# To create one volume of size 10% of the total cache space and +# another 1 Gig volume, # volume=1 scheme=http size=10% # volume=2 scheme=http size=1024 diff --git a/proxy/congest/FeatureSpec.txt b/proxy/congest/FeatureSpec.txt index 7986653..051ac8e 100644 --- a/proxy/congest/FeatureSpec.txt +++ b/proxy/congest/FeatureSpec.txt @@ -5,8 +5,8 @@ Feature Name: ------------- Congestion Control -Synopsis of Feature: --------------------- +Synopsis of Feature: +-------------------- The main purpose of this congestion control feature is to keep track of which hosts are congested so that TS will not forward requests to @@ -27,50 +27,50 @@ CASE 1. Connection Failures: (2) A server is marked congested if there are more than M connection failures within N seconds. -(3) If a server is marked congested, then TS will not forward requests to it +(3) If a server is marked congested, then TS will not forward requests to it until Proxy Retry After Time (PRAT) (which is current time + t) (4) For a request to a congested server before the server's PRAT time, TS sends a Retry-After response to tell the client to retry the request after - Client Retry After Time (CRAT) (= PRAT - current time + T + a random + Client Retry After Time (CRAT) (= PRAT - current time + T + a random interger from 0 to alpha). (5) For a request to a congested server after the server's PRAT time, TS will - try at most m' times to connect to the server, and the timeout is n' + try at most m' times to connect to the server, and the timeout is n' seconds for each try. -(6) A congested server will stay dead if TS cannot make a successful +(6) A congested server will stay dead if TS cannot make a successful connection; otherwise, the server becomes live again. CASE 2: Maximum Number of Connections ------------------------------------- TS will temporarily mark a server as congested if a "max_connection" number -to the server is reached. If a new client request comes in and needs a new -connection to the server, the client will get 503 Retry-After back. +to the server is reached. If a new client request comes in and needs a new +connection to the server, the client will get 503 Retry-After back. There is no PRAT on the "max_connection" reached servers. -Here a server can be identified by IP address (per_ip) or by host name -(per_host). For example, www.example.com has two IP addresses, +Here a server can be identified by IP address (per_ip) or by host name +(per_host). For example, www.example.com has two IP addresses, 209.131.63.206 and 209.131.63.207. If per_ip is used, then each IP address has its own number of connection failures, and each IP address will be marked -congested or not by itself. That is, if 206 is marked congested (but 207 is +congested or not by itself. That is, if 206 is marked congested (but 207 is not), requests can still be forwarded to 207. On the other hand, if per_host is used, then one connection failure to either 206 or 207 will be counted to the -number if connection failures of host www.example.com. If the host +number if connection failures of host www.example.com. If the host www.example.com is marked congested, then essentially both 206 and 207 are -marked congested. +marked congested. -We can also use prefix as a secondary specifier to specify the scope of -congestion control to sub-host (service) area. For example, +We can also use prefix as a secondary specifier to specify the scope of +congestion control to sub-host (service) area. For example, dest_host=www.example.com prefix=/cgi/search.exe This rule can detect the stop of the cgi program or database it depends on. -Each specification has an independent counter. The error of requests to -www.example.com/index.html will count independently to the counter of this +Each specification has an independent counter. The error of requests to +www.example.com/index.html will count independently to the counter of this line. The prefix=/cgi/ means all requests to the objects under /cgi/ have -one common counter with specified parameters. It does not mean each URI +one common counter with specified parameters. It does not mean each URI under the directory has its own counter. -The TS administrator will be able to specify the customizeable error_page, +The TS administrator will be able to specify the customizeable error_page, the error_page can be customized to return the reason (for example: "The site is under maintenance") of congestion for '503'. In the error_page, the URL of the page congested, and the Retry-After time can be returned. @@ -81,8 +81,8 @@ ENGINEERING DESCRIPTION: Risk points of feature: ----------------------- -The set of "origin server connect attempts" configuration varibles in -records.config will be affected by this feature. See the following +The set of "origin server connect attempts" configuration varibles in +records.config will be affected by this feature. See the following "Requirement on Server Management" and the above "Synopsis of feature" sections for more information. @@ -96,7 +96,7 @@ Effect on SDK/API: Management Implications: ----------------------- - + There is one new config variable to enable/disable/test congestion control. proxy.config.http.congestion_control.enabled INT 0|1|2 proxy.config.http.congestion_control.filename STRING congestion.config @@ -105,16 +105,16 @@ There is one new config variable to enable/disable/test congestion control. 1. Number of congestions because of connection failures stat name: proxy.process.congestion.congested_on_conn_failures -2. Number of congestions because of max_connection reached +2. Number of congestions because of max_connection reached stat name: proxy.process.congestion.congested_on_max_connection -A new .config file "congestion.config" is used to specify the parameters for +A new .config file "congestion.config" is used to specify the parameters for different servers. -Each rule will have one primary key to identify the servers, the primaries -can be +Each rule will have one primary key to identify the servers, the primaries +can be dest_host= dest_domain= dest_ip= @@ -136,7 +136,7 @@ The tag=value pairs are used to specify the rules: dead_os_conn_timeout= // n' dead_os_conn_retries= // m' max_connection= // -1 means unlimited - error_page= + error_page= congestion_scheme=per_ip|per_host The suggested default values are as follows: @@ -153,7 +153,7 @@ The suggested default values are as follows: error_page="congestion#retryAfter" congestion_scheme="per_ip" -The above tag values will be used as default if the tag is not specified +The above tag values will be used as default if the tag is not specified in the rule. The default values can be overrided by setting the records.config variables @@ -168,60 +168,60 @@ be affected by this congestion control feature: proxy.config.http.down_server.cache_time proxy.config.http.down_server.abort_threshold -For a request to a server that does not have an applicable rule in -congestion.config, the values for these "origins server connect attempts" -variables are used by TS. Otherwise, the corresponding values specified +For a request to a server that does not have an applicable rule in +congestion.config, the values for these "origins server connect attempts" +variables are used by TS. Otherwise, the corresponding values specified in congestion.config will override them. Add two new alarm types to Traffic Manager: -1) MGMT_SIGNAL_HTTP_CONGESTED_SERVER +1) MGMT_SIGNAL_HTTP_CONGESTED_SERVER used to indicate a congested server -2) MGMT_SIGNAL_HTTP_ALLEVIATED_SERVER +2) MGMT_SIGNAL_HTTP_ALLEVIATED_SERVER used to indicate a congested server is no longer congested These alarms are not processed like the other Traffic Manager alarms. Whenever these alarms are signalled (even if they are repeat alarms) *only* an SNMP trap will be sent. Note, that this means that potentially, users can be flooded with SNMP traps if a congested -server is always signalling an alarm. +server is always signalling an alarm. -For configuration purposes, we will add a new "Congestion Control" tab to the -"Configure -> Networking -> Connection Management" section of the web UI. +For configuration purposes, we will add a new "Congestion Control" tab to the +"Configure -> Networking -> Connection Management" section of the web UI. Within this tab users can: 1. enable/disable the congestion control feature 2. edit the congestion.config file (which will be displayed in a html text box) -Use the traffic_line command-line interface to retrieve the congestion +Use the traffic_line command-line interface to retrieve the congestion statistics and monitoring information. -1. "traffic_line -r " - Returns the value of the statistic specified -2. "traffic_line -q" - Returns a list of currently congested sites (one site per line); - for each congested site, displays the information in the following format: +1. "traffic_line -r " + Returns the value of the statistic specified +2. "traffic_line -q" + Returns a list of currently congested sites (one site per line); + for each congested site, displays the information in the following format: '