trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudhe...@apache.org
Subject [1/3] trafficserver git commit: [TS-2812]: Initial version of header_normalize plugin
Date Tue, 11 Nov 2014 19:06:40 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master aba98345d -> 0a8e3c965


[TS-2812]: Initial version of header_normalize plugin


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/cb63dd96
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/cb63dd96
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/cb63dd96

Branch: refs/heads/master
Commit: cb63dd96e25b5c82620c19c5925ac09e6a249bd2
Parents: aba9834
Author: Sudheer Vinukonda <sudheerv@yahoo-inc.com>
Authored: Tue Nov 11 19:02:24 2014 +0000
Committer: Sudheer Vinukonda <sudheerv@yahoo-inc.com>
Committed: Tue Nov 11 19:02:24 2014 +0000

----------------------------------------------------------------------
 configure.ac                                    |   1 +
 plugins/experimental/Makefile.am                |   1 +
 .../experimental/header_normalize/Makefile.am   |  21 +
 .../experimental/header_normalize/Makefile.in   | 842 +++++++++++++++++++
 .../header_normalize/header_normalize.cc        | 249 ++++++
 5 files changed, 1114 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb63dd96/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 770d7f1..044cf0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1936,6 +1936,7 @@ AS_IF([test "x$enable_experimental_plugins" = xyes], [
     plugins/experimental/escalate/Makefile
     plugins/experimental/esi/Makefile
     plugins/experimental/geoip_acl/Makefile
+    plugins/experimental/header_normalize/Makefile
     plugins/experimental/healthchecks/Makefile
     plugins/experimental/hipes/Makefile
     plugins/experimental/metalink/Makefile

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb63dd96/plugins/experimental/Makefile.am
----------------------------------------------------------------------
diff --git a/plugins/experimental/Makefile.am b/plugins/experimental/Makefile.am
index 7bb1452..51b06f0 100644
--- a/plugins/experimental/Makefile.am
+++ b/plugins/experimental/Makefile.am
@@ -26,6 +26,7 @@ SUBDIRS = \
  escalate \
  esi \
  geoip_acl \
+ header_normalize \
  healthchecks \
  hipes \
  metalink \

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb63dd96/plugins/experimental/header_normalize/Makefile.am
----------------------------------------------------------------------
diff --git a/plugins/experimental/header_normalize/Makefile.am b/plugins/experimental/header_normalize/Makefile.am
new file mode 100644
index 0000000..f5a7c00
--- /dev/null
+++ b/plugins/experimental/header_normalize/Makefile.am
@@ -0,0 +1,21 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+include $(top_srcdir)/build/plugins.mk
+
+pkglib_LTLIBRARIES = header_normalize.la
+header_normalize_la_SOURCES = header_normalize.cc
+header_normalize_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb63dd96/plugins/experimental/header_normalize/Makefile.in
----------------------------------------------------------------------
diff --git a/plugins/experimental/header_normalize/Makefile.in b/plugins/experimental/header_normalize/Makefile.in
new file mode 100644
index 0000000..feada03
--- /dev/null
+++ b/plugins/experimental/header_normalize/Makefile.in
@@ -0,0 +1,842 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+# plugins.mk: Common automake build variables for Traffic Server plugins.
+
+VPATH = @srcdir@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/build/plugins.mk
+subdir = plugins/experimental/header_normalize
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/build/ax_check_openssl.m4 \
+	$(top_srcdir)/build/ax_compare_version.m4 \
+	$(top_srcdir)/build/ax_compiler_vendor.m4 \
+	$(top_srcdir)/build/ax_cxx_compile_stdcxx_11.m4 \
+	$(top_srcdir)/build/ax_lib_curl.m4 \
+	$(top_srcdir)/build/ax_lib_readline.m4 \
+	$(top_srcdir)/build/ax_path_generic.m4 \
+	$(top_srcdir)/build/ax_perl_modules.m4 \
+	$(top_srcdir)/build/ax_with_curses.m4 \
+	$(top_srcdir)/build/common.m4 $(top_srcdir)/build/crypto.m4 \
+	$(top_srcdir)/build/jemalloc.m4 $(top_srcdir)/build/libtool.m4 \
+	$(top_srcdir)/build/ltoptions.m4 \
+	$(top_srcdir)/build/ltsugar.m4 \
+	$(top_srcdir)/build/ltversion.m4 \
+	$(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/lzma.m4 \
+	$(top_srcdir)/build/network.m4 $(top_srcdir)/build/pcre.m4 \
+	$(top_srcdir)/build/pkg.m4 $(top_srcdir)/build/tcl.m4 \
+	$(top_srcdir)/build/tcmalloc.m4 $(top_srcdir)/build/xml.m4 \
+	$(top_srcdir)/build/zlib.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/lib/ts/ink_autoconf.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pkglibdir)"
+LTLIBRARIES = $(pkglib_LTLIBRARIES)
+header_normalize_la_LIBADD =
+am_header_normalize_la_OBJECTS = header_normalize.lo
+header_normalize_la_OBJECTS = $(am_header_normalize_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+header_normalize_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(header_normalize_la_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/lib/ts
+depcomp = $(SHELL) $(top_srcdir)/build/aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(header_normalize_la_SOURCES)
+DIST_SOURCES = $(header_normalize_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkgdatadir = @pkgdatadir@
+pkglibdir = $(pkglibexecdir)
+pkglibexecdir = @pkglibexecdir@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_CFLAGS = @AM_CFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+API_DEFS = @API_DEFS@
+AR = @AR@
+ASCPP = @ASCPP@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCACHE = @CCACHE@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CURL_CFLAGS = @CURL_CFLAGS@
+CURL_CONFIG = @CURL_CONFIG@
+CURL_LIBS = @CURL_LIBS@
+CURSES_LIB = @CURSES_LIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXPAT_LDFLAGS = @EXPAT_LDFLAGS@
+EXTRA_CC_LDFLAGS = @EXTRA_CC_LDFLAGS@
+EXTRA_CXX_LDFLAGS = @EXTRA_CXX_LDFLAGS@
+FGREP = @FGREP@
+FLEX_CFLAGS = @FLEX_CFLAGS@
+GEOIP_LIBS = @GEOIP_LIBS@
+GREP = @GREP@
+HOST_GUESS = @HOST_GUESS@
+HWLOC_CFLAGS = @HWLOC_CFLAGS@
+HWLOC_LIBS = @HWLOC_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBCAP = @LIBCAP@
+LIBCRYPT = @LIBCRYPT@
+LIBEXPAT = @LIBEXPAT@
+LIBLZMA = @LIBLZMA@
+LIBOBJS = @LIBOBJS@
+LIBPCRE = @LIBPCRE@
+LIBPROFILER = @LIBPROFILER@
+LIBREADLINE = @LIBREADLINE@
+LIBRESOLV = @LIBRESOLV@
+LIBS = @LIBS@
+LIBTCL = @LIBTCL@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_LINK_FLAGS = @LIBTOOL_LINK_FLAGS@
+LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
+LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
+LIBZ = @LIBZ@
+LIB_MYSQLCLIENT = @LIB_MYSQLCLIENT@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LUA_LDFLAGS = @LUA_LDFLAGS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_INCLUDES = @OPENSSL_INCLUDES@
+OPENSSL_LDFLAGS = @OPENSSL_LDFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PCRE_CONFIG = @PCRE_CONFIG@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHARED_CFLAGS = @SHARED_CFLAGS@
+SHARED_CXXFLAGS = @SHARED_CXXFLAGS@
+SHARED_CXXLINKFLAGS = @SHARED_CXXLINKFLAGS@
+SHARED_LDFLAGS = @SHARED_LDFLAGS@
+SHELL = @SHELL@
+SPDYLAY_CFLAGS = @SPDYLAY_CFLAGS@
+SPDYLAY_LIBS = @SPDYLAY_LIBS@
+SPHINXBUILD = @SPHINXBUILD@
+SPHINXOPTS = @SPHINXOPTS@
+STRIP = @STRIP@
+TCL_BIN_DIR = @TCL_BIN_DIR@
+TCL_LIB_FILE = @TCL_LIB_FILE@
+TCL_LIB_FLAG = @TCL_LIB_FLAG@
+TCL_LIB_SPEC = @TCL_LIB_SPEC@
+TCL_PATCH_LEVEL = @TCL_PATCH_LEVEL@
+TCL_SRC_DIR = @TCL_SRC_DIR@
+TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
+TCL_STUB_LIB_FLAG = @TCL_STUB_LIB_FLAG@
+TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
+TCL_VERSION = @TCL_VERSION@
+TFW_PACKAGE_SUFFIX = @TFW_PACKAGE_SUFFIX@
+TS_LIBTOOL_VERSION = @TS_LIBTOOL_VERSION@
+TS_LUAJIT_LDFLAGS = @TS_LUAJIT_LDFLAGS@
+TS_MAN1_MANPAGES = @TS_MAN1_MANPAGES@
+TS_MAN3_MANPAGES = @TS_MAN3_MANPAGES@
+TS_MAN5_MANPAGES = @TS_MAN5_MANPAGES@
+TS_MAN8_MANPAGES = @TS_MAN8_MANPAGES@
+TS_VERSION_MAJOR = @TS_VERSION_MAJOR@
+TS_VERSION_MICRO = @TS_VERSION_MICRO@
+TS_VERSION_MINOR = @TS_VERSION_MINOR@
+TS_VERSION_NUMBER = @TS_VERSION_NUMBER@
+TS_VERSION_STRING = @TS_VERSION_STRING@
+VERSION = @VERSION@
+YACC = @YACC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_cv_sizeof_voidp = @ac_cv_sizeof_voidp@
+allocah = @allocah@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+arpa_ineth = @arpa_ineth@
+arpa_nameser_compath = @arpa_nameser_compath@
+arpa_nameserh = @arpa_nameserh@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_group = @build_group@
+build_machine = @build_machine@
+build_number = @build_number@
+build_os = @build_os@
+build_person = @build_person@
+build_vendor = @build_vendor@
+builddir = @builddir@
+cachedir = @cachedir@
+cpioh = @cpioh@
+ctypeh = @ctypeh@
+datadir = @datadir@
+datarootdir = @datarootdir@
+default_loopback_iface = @default_loopback_iface@
+defer_accept = @defer_accept@
+docdir = @docdir@
+dvidir = @dvidir@
+enable_remote_cov_commit = @enable_remote_cov_commit@
+endianh = @endianh@
+exec_prefix = @exec_prefix@
+execinfoh = @execinfoh@
+exp_bindir = @exp_bindir@
+exp_cachedir = @exp_cachedir@
+exp_datadir = @exp_datadir@
+exp_docdir = @exp_docdir@
+exp_exec_prefix = @exp_exec_prefix@
+exp_includedir = @exp_includedir@
+exp_infodir = @exp_infodir@
+exp_installbuilddir = @exp_installbuilddir@
+exp_libdir = @exp_libdir@
+exp_libexecdir = @exp_libexecdir@
+exp_localstatedir = @exp_localstatedir@
+exp_logdir = @exp_logdir@
+exp_mandir = @exp_mandir@
+exp_prefix = @exp_prefix@
+exp_runtimedir = @exp_runtimedir@
+exp_sbindir = @exp_sbindir@
+exp_sysconfdir = @exp_sysconfdir@
+expath = @expath@
+floath = @floath@
+gethostbyname_r_glibc2 = @gethostbyname_r_glibc2@
+has_128bit_cas = @has_128bit_cas@
+has_backtrace = @has_backtrace@
+has_in6_is_addr_unspecified = @has_in6_is_addr_unspecified@
+has_interim_cache = @has_interim_cache@
+has_ip_tos = @has_ip_tos@
+has_mysql = @has_mysql@
+has_profiler = @has_profiler@
+has_so_mark = @has_so_mark@
+has_spdy = @has_spdy@
+has_tcmalloc = @has_tcmalloc@
+has_tests = @has_tests@
+has_wccp = @has_wccp@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+ifaddrsh = @ifaddrsh@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+installbuilddir = @installbuilddir@
+iocore_include_dirs = @iocore_include_dirs@
+ip_transparent = @ip_transparent@
+jemalloch = @jemalloch@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libgenh = @libgenh@
+localedir = @localedir@
+localstatedir = @localstatedir@
+logdir = @logdir@
+lt_ECHO = @lt_ECHO@
+lzmah = @lzmah@
+machine_endianh = @machine_endianh@
+malloch = @malloch@
+mandir = @mandir@
+mathh = @mathh@
+max_api_stats = @max_api_stats@
+max_event_threads = @max_event_threads@
+max_host_name_len = @max_host_name_len@
+max_threads_per_type = @max_threads_per_type@
+mkdir_p = @mkdir_p@
+net_ppp_defsh = @net_ppp_defsh@
+netdbh = @netdbh@
+netinet_in_systmh = @netinet_in_systmh@
+netinet_inh = @netinet_inh@
+netinet_ip_icmph = @netinet_ip_icmph@
+netinet_iph = @netinet_iph@
+netinet_tcph = @netinet_tcph@
+oldincludedir = @oldincludedir@
+pcre_pcreh = @pcre_pcreh@
+pcreh = @pcreh@
+pdfdir = @pdfdir@
+pkgbindir = @pkgbindir@
+pkgcachedir = @pkgcachedir@
+pkgdocdir = @pkgdocdir@
+pkglocalstatedir = @pkglocalstatedir@
+pkglogdir = @pkglogdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+pkgruntimedir = @pkgruntimedir@
+pkgsbindir = @pkgsbindir@
+pkgsysconfdir = @pkgsysconfdir@
+pkgsysgroup = @pkgsysgroup@
+pkgsysuser = @pkgsysuser@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pthread_nph = @pthread_nph@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+readline_readlineh = @readline_readlineh@
+rel_bindir = @rel_bindir@
+rel_cachedir = @rel_cachedir@
+rel_datadir = @rel_datadir@
+rel_docdir = @rel_docdir@
+rel_exec_prefix = @rel_exec_prefix@
+rel_includedir = @rel_includedir@
+rel_infodir = @rel_infodir@
+rel_installbuilddir = @rel_installbuilddir@
+rel_libdir = @rel_libdir@
+rel_libexecdir = @rel_libexecdir@
+rel_localstatedir = @rel_localstatedir@
+rel_logdir = @rel_logdir@
+rel_mandir = @rel_mandir@
+rel_prefix = @rel_prefix@
+rel_runtimedir = @rel_runtimedir@
+rel_sbindir = @rel_sbindir@
+rel_sysconfdir = @rel_sysconfdir@
+runtimedir = @runtimedir@
+sbindir = @sbindir@
+schedh = @schedh@
+sharedstatedir = @sharedstatedir@
+siginfoh = @siginfoh@
+srcdir = @srcdir@
+stroptsh = @stroptsh@
+subdirs = @subdirs@
+sys_byteorderh = @sys_byteorderh@
+sys_cpuseth = @sys_cpuseth@
+sys_epollh = @sys_epollh@
+sys_eventh = @sys_eventh@
+sys_ioctlh = @sys_ioctlh@
+sys_mounth = @sys_mounth@
+sys_paramh = @sys_paramh@
+sys_pseth = @sys_pseth@
+sys_sockioh = @sys_sockioh@
+sys_sysctlh = @sys_sysctlh@
+sys_sysinfoh = @sys_sysinfoh@
+sys_sysmacrosh = @sys_sysmacrosh@
+sys_systeminfoh = @sys_systeminfoh@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+use_diags = @use_diags@
+use_epoll = @use_epoll@
+use_fast_sdk = @use_fast_sdk@
+use_freelist = @use_freelist@
+use_hwloc = @use_hwloc@
+use_kqueue = @use_kqueue@
+use_linux_native_aio = @use_linux_native_aio@
+use_port = @use_port@
+use_posix_cap = @use_posix_cap@
+use_reclaimable_freelist = @use_reclaimable_freelist@
+use_remote_unwinding = @use_remote_unwinding@
+use_tls_alpn = @use_tls_alpn@
+use_tls_eckey = @use_tls_eckey@
+use_tls_npn = @use_tls_npn@
+use_tls_sni = @use_tls_sni@
+use_tproxy = @use_tproxy@
+valuesh = @valuesh@
+waith = @waith@
+zlibh = @zlibh@
+TS_PLUGIN_LDFLAGS = \
+  -module \
+  -shared \
+  -avoid-version \
+  -export-symbols-regex '^(TSRemapInit|TSRemapDone|TSRemapDoRemap|TSRemapNewInstance|TSRemapDeleteInstance|TSRemapOSResponse|TSPluginInit)$$'
+
+TS_PLUGIN_CPPFLAGS = \
+  -I$(top_builddir)/proxy/api \
+  -I$(top_srcdir)/proxy/api \
+  -I$(top_builddir)/lib/ts \
+  -I$(top_srcdir)/lib/ts \
+  -I$(top_srcdir)/lib
+
+
+# Provide a default AM_CPPFLAGS. Automake handles this correctly, but libtool
+# throws an error if we try to do the same with AM_LDFLAGS. Hence, we provide
+# TS_PLUGIN variables that can be used to construct the necessary automake
+# syntax.
+AM_CPPFLAGS = $(TS_PLUGIN_CPPFLAGS)
+pkglib_LTLIBRARIES = header_normalize.la
+header_normalize_la_SOURCES = header_normalize.cc
+header_normalize_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/build/plugins.mk $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign plugins/experimental/header_normalize/Makefile';
\
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign plugins/experimental/header_normalize/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)';
\
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);;
\
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
+	@list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG)
$$list2 '$(DESTDIR)$(pkglibdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG)
$$list2 "$(DESTDIR)$(pkglibdir)"; \
+	}
+
+uninstall-pkglibLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'";
\
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f";
\
+	done
+
+clean-pkglibLTLIBRARIES:
+	-test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+	@list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+header_normalize.la: $(header_normalize_la_OBJECTS) $(header_normalize_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(header_normalize_la_LINK) -rpath $(pkglibdir) $(header_normalize_la_OBJECTS)
$(header_normalize_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/header_normalize.Plo@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W)
'$<'` &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+	for dir in "$(DESTDIR)$(pkglibdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-pkglibLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-pkglibLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-pkglibLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-pkglibLTLIBRARIES \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb63dd96/plugins/experimental/header_normalize/header_normalize.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/header_normalize/header_normalize.cc b/plugins/experimental/header_normalize/header_normalize.cc
new file mode 100644
index 0000000..91517db
--- /dev/null
+++ b/plugins/experimental/header_normalize/header_normalize.cc
@@ -0,0 +1,249 @@
+//////////////////////////////////////////////////////////////////////////////////////////////
+// header_normalize::
+//
+// ATS plugin to convert headers into camel-case. It may be useful to solve
+// interworking issues with legacy origins not supporting lower case headers
+// required by protocols such as spdy/http2 etc. 
+//
+// To use this plugin, configure a remap.config rule like
+//
+//   map http://foo.com http://bar.com @plugin=header_normalize.so
+//
+//
+// The list of of all available parameters is in the README.
+//
+//
+// Note that the path to the plugin itself must be absolute, and by default it is
+//
+//    /home/y/libexec/trafficserver/header_normalize.so
+//
+//
+
+#define UNUSED __attribute__ ((unused))
+static char UNUSED rcsId__header_normalize_cc[] = "@(#) $Id: header_normalize.cc 218 2014-11-11
01:29:16Z sudheerv $ built on " __DATE__ " " __TIME__;
+
+
+#include <sys/time.h>
+#include <ts/ts.h>
+#include <ts/remap.h>
+#include <set>
+#include <string>
+#include <string.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <netdb.h>
+#include <map>
+
+using namespace std;
+///////////////////////////////////////////////////////////////////////////////
+// Some constants.
+//
+const char* PLUGIN_NAME = "header_normalize";
+
+std::map<std::string, std::string, std::less<std::string> >  hdrMap;
+
+static void
+buildHdrMap()
+{
+  hdrMap["accept"] = "Accept";
+  hdrMap["accept-charset"] = "Accept-Charset";
+  hdrMap["accept-encoding"] = "Accept-Encoding";
+  hdrMap["accept-language"] = "Accept-Language";
+  hdrMap["accept-ranges"] = "Accept-Ranges";
+  hdrMap["age"] = "Age";
+  hdrMap["allow"] = "Allow";
+  hdrMap["approved"] = "Approved";
+  hdrMap["bytes"] = "Bytes";
+  hdrMap["cache-control"] = "Cache-Control";
+  hdrMap["client-ip"] = "Client-Ip";
+  hdrMap["connection"] = "Connection";
+  hdrMap["content-base"] = "Content-Base";
+  hdrMap["content-encoding"] = "Content-Encoding";
+  hdrMap["content-language"] = "Content-Language";
+  hdrMap["content-length"] = "Content-Length";
+  hdrMap["content-location"] = "Content-Location";
+  hdrMap["content-md5"] = "Content-MD5";
+  hdrMap["content-range"] = "Content-Range";
+  hdrMap["content-type"] = "Content-Type";
+  hdrMap["control"] = "Control";
+  hdrMap["cookie"] = "Cookie";
+  hdrMap["date"] = "Date";
+  hdrMap["distribution"] = "Distribution";
+  hdrMap["etag"] = "Etag";
+  hdrMap["expect"] = "Expect";
+  hdrMap["expires"] = "Expires";
+  hdrMap["followup-to"] = "Followup-To";
+  hdrMap["from"] = "From";
+  hdrMap["host"] = "Host";
+  hdrMap["if-match"] = "If-Match";
+  hdrMap["if-modified-since"] = "If-Modified-Since";
+  hdrMap["if-none-match"] = "If-None-Match";
+  hdrMap["if-range"] = "If-Range";
+  hdrMap["if-unmodified-since"] = "If-Unmodified-Since";
+  hdrMap["keep-alive"] = "Keep-Alive";
+  hdrMap["keywords"] = "Keywords";
+  hdrMap["last-modified"] = "Last-Modified";
+  hdrMap["lines"] = "Lines";
+  hdrMap["location"] = "Location";
+  hdrMap["max-forwards"] = "Max-Forwards";
+  hdrMap["message-id"] = "Message-Id";
+  hdrMap["newsgroups"] = "Newsgroups";
+  hdrMap["organization"] = "Organization";
+  hdrMap["path"] = "Path";
+  hdrMap["pragma"] = "Pragma";
+  hdrMap["proxy-authenticate"] = "Proxy-Authenticate";
+  hdrMap["proxy-authorization"] = "Proxy-Authorization";
+  hdrMap["proxy-connection"] = "Proxy-Connection";
+  hdrMap["public"] = "Public";
+  hdrMap["range"] = "Range";
+  hdrMap["references"] = "References";
+  hdrMap["referer"] = "Referer";
+  hdrMap["reply-to"] = "Reply-To";
+  hdrMap["retry-after"] = "Retry-After";
+  hdrMap["sender"] = "Sender";
+  hdrMap["server"] = "Server";
+  hdrMap["set-cookie"] = "Set-Cookie";
+  hdrMap["strict-transport-security"] = "Strict-Transport-Security";
+  hdrMap["subject"] = "Subject";
+  hdrMap["summary"] = "Summary";
+  hdrMap["te"] = "Te";
+  hdrMap["transfer-encoding"] = "Transfer-Encoding";
+  hdrMap["upgrade"] = "Upgrade";
+  hdrMap["user-agent"] = "User-Agent";
+  hdrMap["vary"] = "Vary";
+  hdrMap["via"] = "Via";
+  hdrMap["warning"] = "Warning";
+  hdrMap["www-authenticate"] = "Www-Authenticate";
+  hdrMap["xref"] = "Xref";
+  hdrMap["@datainfo"] = "@DataInfo";
+  hdrMap["x-id"] = "X-ID";
+  hdrMap["x-forwarded-for"] = "X-Forwarded-For";
+  hdrMap["sec-websocket-key"] = "Sec-WebSocket-Key";
+  hdrMap["sec-websocket-version"] = "Sec-WebSocket-Version";
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Initialize the plugin.
+//
+//
+//
+TSReturnCode
+TSRemapInit(TSRemapInterface *api_info, char *errbuf, int errbuf_size)
+{
+  if (!api_info) {
+    strncpy(errbuf, "[tsremap_init] - Invalid TSREMAP_INTERFACE argument", errbuf_size -
1);
+    return TS_ERROR;
+  }
+  if (api_info->tsremap_version < TSREMAP_VERSION) {
+    snprintf(errbuf, errbuf_size - 1, "[tsremap_init] - Incorrect API version %ld.%ld",
+             api_info->tsremap_version >> 16, (api_info->tsremap_version &
0xffff));
+    return TS_ERROR;
+  }
+  buildHdrMap();
+  TSDebug(PLUGIN_NAME, "plugin is succesfully initialized");
+  return TS_SUCCESS;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// One instance per remap.config invocation.
+//
+TSReturnCode
+TSRemapNewInstance(int /* argc */, char * /* argv[] */, void ** /* ih */, char * /* errbuf
*/, int /* errbuf_size */)
+{
+  return TS_SUCCESS;
+}
+
+void
+TSRemapDelteInstance(void * /* ih */)
+{
+}
+
+static int
+read_request_hook(TSCont /* contp */, TSEvent /* event */, void *edata)
+{
+
+  TSHttpTxn rh = (TSHttpTxn) edata;
+
+  TSMLoc hdr, next_hdr;
+  TSMBuffer hdr_bufp;
+  TSMLoc req_hdrs;
+
+  if (TSHttpTxnClientReqGet(rh, &hdr_bufp, &req_hdrs) == TS_SUCCESS) {
+    hdr = TSMimeHdrFieldGet(hdr_bufp, req_hdrs, 0);
+    int n_mime_headers = TSMimeHdrFieldsCount(hdr_bufp, req_hdrs);
+
+    TSDebug(PLUGIN_NAME, "*** Camel Casing %u hdrs in the request", n_mime_headers);
+
+    for (int i = 0; i < n_mime_headers; ++i) {
+      if (hdr == NULL)
+	break;
+      next_hdr = TSMimeHdrFieldNext(hdr_bufp, req_hdrs, hdr);
+      int old_hdr_len;
+      const char* old_hdr_name = TSMimeHdrFieldNameGet(hdr_bufp, req_hdrs, hdr, &old_hdr_len);
+
+      // TSMimeHdrFieldNameGet returns the MIME_FIELD_NAME 
+      // for all MIME hdrs, which is always in Camel Case
+      if (islower(old_hdr_name[0])) {
+         TSDebug(PLUGIN_NAME, "*** non MIME Hdr %s, leaving it for now", old_hdr_name);
+
+         TSHandleMLocRelease(hdr_bufp, req_hdrs, hdr);
+         hdr = next_hdr;
+	 continue;
+      }
+
+      int hdr_value_len = 0;
+      const char *hdr_value = TSMimeHdrFieldValueStringGet(hdr_bufp, req_hdrs, hdr, 0, &hdr_value_len);
+
+      // hdr returned by TSMimeHdrFieldNameGet is already
+      // in camel case, just destroy the lowercase spdy header
+      // and replace it with TSMimeHdrFieldNameGet
+      char* new_hdr_name = (char*)old_hdr_name; 
+    
+      if (new_hdr_name) {
+        TSMLoc new_hdr_loc;
+        TSReturnCode rval = TSMimeHdrFieldCreateNamed(hdr_bufp, req_hdrs, new_hdr_name, old_hdr_len,
&new_hdr_loc);
+
+        if (rval == TS_SUCCESS) {
+          TSDebug(PLUGIN_NAME, "*** hdr convert %s to %s", old_hdr_name, new_hdr_name);
+          TSMimeHdrFieldValueStringSet(hdr_bufp, req_hdrs, new_hdr_loc, -1, hdr_value, hdr_value_len);
+          TSMimeHdrFieldAppend(hdr_bufp, req_hdrs, new_hdr_loc);
+          TSHandleMLocRelease(hdr_bufp, req_hdrs, new_hdr_loc);
+        }
+
+        TSMimeHdrFieldDestroy(hdr_bufp, req_hdrs, hdr);
+      } else {
+          TSDebug(PLUGIN_NAME, "*** can't find hdr %s in hdrMap", old_hdr_name);
+      }
+
+      TSHandleMLocRelease(hdr_bufp, req_hdrs, hdr);
+      hdr = next_hdr;
+    }
+
+    TSHandleMLocRelease(hdr_bufp, TS_NULL_MLOC, req_hdrs);
+  }
+
+  TSHttpTxnReenable(rh, TS_EVENT_HTTP_CONTINUE);
+
+  return 0;
+}
+
+void
+TSPluginInit(int /* argc */, const char * /* argv[] */)
+{
+  TSDebug(PLUGIN_NAME, "initializing plugin");
+  TSCont contp;
+  buildHdrMap();
+  contp = TSContCreate(read_request_hook, NULL);
+  TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, contp);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// This is the main "entry" point for the plugin, called for every request.
+//
+TSRemapStatus
+TSRemapDoRemap (void * /* ih */, TSHttpTxn rh, TSRemapRequestInfo * /* rri */)
+{
+  read_request_hook(NULL, TS_EVENT_HTTP_READ_REQUEST_HDR, rh);
+  return TSREMAP_DID_REMAP;
+}


Mime
View raw message