Repository: trafficserver Updated Branches: refs/heads/master c1c680459 -> 7052d85c3
TS-3296: use Regex.h in preference to raw PCRE headers Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/7052d85c Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/7052d85c Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/7052d85c Branch: refs/heads/master Commit: 7052d85c3850f795f1cfd9fad865deae022c2503 Parents: c1c6804 Author: James Peach <jpe...@apache.org> Authored: Thu Jan 8 09:37:49 2015 -0800 Committer: James Peach <jpe...@apache.org> Committed: Wed Jan 14 21:24:50 2015 -0800 ---------------------------------------------------------------------- CHANGES | 2 ++ mgmt/WebMgmtUtils.cc | 8 +------- proxy/CacheControl.cc | 8 +------- proxy/ControlMatcher.h | 9 ++------- proxy/http/HttpConfig.h | 11 ++--------- proxy/http/remap/UrlMapping.h | 10 ++-------- proxy/http/remap/UrlRewrite.h | 9 ++------- 7 files changed, 12 insertions(+), 45 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7052d85c/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 7173d78..3278f2f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 5.3.0 + *) [TS-3296] Use Regex.h to find PCRE headers. + *) [TS-3295] Remove obsolete Compatability.h header. *) [TS-3292] Make tr-pass work for SSL. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7052d85c/mgmt/WebMgmtUtils.cc ---------------------------------------------------------------------- diff --git a/mgmt/WebMgmtUtils.cc b/mgmt/WebMgmtUtils.cc index 423c612..f2bcbbf 100644 --- a/mgmt/WebMgmtUtils.cc +++ b/mgmt/WebMgmtUtils.cc @@ -26,13 +26,7 @@ #include "MgmtUtils.h" #include "WebMgmtUtils.h" #include "MultiFile.h" - -#ifdef HAVE_PCRE_PCRE_H -#include <pcre/pcre.h> -#else -#include <pcre.h> -#endif - +#include "Regex.h" /**************************************************************************** * http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7052d85c/proxy/CacheControl.cc ---------------------------------------------------------------------- diff --git a/proxy/CacheControl.cc b/proxy/CacheControl.cc index 2a2c2be..efadab0 100644 --- a/proxy/CacheControl.cc +++ b/proxy/CacheControl.cc @@ -31,13 +31,6 @@ #include <sys/types.h> #include "ink_config.h" - -#ifdef HAVE_PCRE_PCRE_H -#include <pcre/pcre.h> -#else -#include <pcre.h> -#endif - #include "CacheControl.h" #include "ControlMatcher.h" #include "Main.h" @@ -48,6 +41,7 @@ #include "HttpConfig.h" #include "StatSystem.h" #include "P_Cache.h" +#include "Regex.h" static const char modulePrefix[] = "[CacheControl]"; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7052d85c/proxy/ControlMatcher.h ---------------------------------------------------------------------- diff --git a/proxy/ControlMatcher.h b/proxy/ControlMatcher.h index 55ec396..2ec4b9d 100644 --- a/proxy/ControlMatcher.h +++ b/proxy/ControlMatcher.h @@ -90,15 +90,10 @@ #include "DynArray.h" #include <ts/IpMap.h> +#include "ink_apidefs.h" #include "ink_defs.h" #include "HTTP.h" -#include "ink_apidefs.h" - -#ifdef HAVE_PCRE_PCRE_H -#include <pcre/pcre.h> -#else -#include <pcre.h> -#endif +#include "Regex.h" #ifdef HAVE_CTYPE_H #include <ctype.h> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7052d85c/proxy/http/HttpConfig.h ---------------------------------------------------------------------- diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h index dcc98f7..fae8b43 100644 --- a/proxy/http/HttpConfig.h +++ b/proxy/http/HttpConfig.h @@ -37,21 +37,14 @@ #include <stdlib.h> #include <stdio.h> -#include "libts.h" - -#ifdef HAVE_PCRE_PCRE_H -#include <pcre/pcre.h> -#else -#include <pcre.h> -#endif - #ifdef HAVE_CTYPE_H #include <ctype.h> #endif +#include "libts.h" +#include "Regex.h" #include "HttpProxyAPIEnums.h" #include "ProxyConfig.h" - #include "P_RecProcess.h" /* Instead of enumerating the stats in DynamicStats.h, each module needs http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7052d85c/proxy/http/remap/UrlMapping.h ---------------------------------------------------------------------- diff --git a/proxy/http/remap/UrlMapping.h b/proxy/http/remap/UrlMapping.h index fe3ab01..72751d1 100644 --- a/proxy/http/remap/UrlMapping.h +++ b/proxy/http/remap/UrlMapping.h @@ -24,22 +24,16 @@ #ifndef _URL_MAPPING_H_ #define _URL_MAPPING_H_ +#include "ink_config.h" #include "AclFiltering.h" #include "Main.h" #include "Error.h" #include "URL.h" #include "RemapPluginInfo.h" -#include "ink_config.h" - -#ifdef HAVE_PCRE_PCRE_H -#include <pcre/pcre.h> -#else -#include <pcre.h> -#endif +#include "Regex.h" static const unsigned int MAX_REMAP_PLUGIN_CHAIN = 10; - /** * Used to store http referer strings (and/or regexp) **/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7052d85c/proxy/http/remap/UrlRewrite.h ---------------------------------------------------------------------- diff --git a/proxy/http/remap/UrlRewrite.h b/proxy/http/remap/UrlRewrite.h index 8f1e32d..330d9a1 100644 --- a/proxy/http/remap/UrlRewrite.h +++ b/proxy/http/remap/UrlRewrite.h @@ -24,15 +24,10 @@ #ifndef _URL_REWRITE_H_ #define _URL_REWRITE_H_ +#include "ink_config.h" #include "UrlMapping.h" #include "HttpTransact.h" -#include "ink_config.h" - -#ifdef HAVE_PCRE_PCRE_H -#include <pcre/pcre.h> -#else -#include <pcre.h> -#endif +#include "Regex.h" #define URL_REMAP_FILTER_NONE 0x00000000 #define URL_REMAP_FILTER_REFERER 0x00000001 /* enable "referer" header validation */