trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r1079662 - in /trafficserver/traffic/trunk: lib/records/I_RecCore.h lib/records/I_RecDefs.h lib/records/RecCore.cc lib/ts/ink_atomic.h mgmt/MgmtDefs.h proxy/InkAPI.cc proxy/http/HttpConfig.cc proxy/http/HttpConfig.h proxy/http/HttpTransact.cc
Date Wed, 09 Mar 2011 04:35:22 GMT
Author: zwoop
Date: Wed Mar  9 04:35:21 2011
New Revision: 1079662

URL: http://svn.apache.org/viewvc?rev=1079662&view=rev
Log:
TS-609 Added suport for treating the 64-bit config ints as 8-bit ints

This is particularly useful in the Http Transaction class, because
a larger portion of those configs are now overridable per transaction,
so this saves a chunk of memory on every active transaction.

It might make sense to modify other core modules to use the new
MgmtByte as well, but it's probably not critical. Any config that is
a "toggle" (on|off), or small integers (0..3) are candidates to use
this new type.

Modified:
    trafficserver/traffic/trunk/lib/records/I_RecCore.h
    trafficserver/traffic/trunk/lib/records/I_RecDefs.h
    trafficserver/traffic/trunk/lib/records/RecCore.cc
    trafficserver/traffic/trunk/lib/ts/ink_atomic.h
    trafficserver/traffic/trunk/mgmt/MgmtDefs.h
    trafficserver/traffic/trunk/proxy/InkAPI.cc
    trafficserver/traffic/trunk/proxy/http/HttpConfig.cc
    trafficserver/traffic/trunk/proxy/http/HttpConfig.h
    trafficserver/traffic/trunk/proxy/http/HttpTransact.cc

Modified: trafficserver/traffic/trunk/lib/records/I_RecCore.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/lib/records/I_RecCore.h?rev=1079662&r1=1079661&r2=1079662&view=diff
==============================================================================
--- trafficserver/traffic/trunk/lib/records/I_RecCore.h (original)
+++ trafficserver/traffic/trunk/lib/records/I_RecCore.h Wed Mar  9 04:35:21 2011
@@ -78,6 +78,7 @@ int RecLinkConfigInkU32(const char *name
 int RecLinkConfigFloat(const char *name, RecFloat * rec_float);
 int RecLinkConfigCounter(const char *name, RecCounter * rec_counter);
 int RecLinkConfigString(const char *name, RecString * rec_string);
+int RecLinkConfigByte(const char *name, RecByte * rec_byte);
 
 int RecRegisterConfigUpdateCb(const char *name, RecConfigUpdateCb update_cb, void *cookie);
 int RecRegisterRawStatUpdateFunc(const char *name, RecRawStatBlock * rsb, int id, RecStatUpdateFunc update_func, void *cookie);
@@ -105,6 +106,8 @@ int RecGetRecordFloat(const char *name, 
 int RecGetRecordString(const char *name, char *buf, int buf_len, bool lock = true);
 int RecGetRecordString_Xmalloc(const char *name, RecString * rec_string, bool lock = true);
 int RecGetRecordCounter(const char *name, RecCounter * rec_counter, bool lock = true);
+// Convenience to allow us to treat the RecInt as a single byte internally
+int RecGetRecordByte(const char *name, RecByte * rec_byte, bool lock = true);
 
 //------------------------------------------------------------------------
 // Record Attributes Reading
@@ -163,7 +166,7 @@ void RecSignalManager(int, const char *)
 #define REC_RegisterConfigUpdateFunc(_config_var_name, func, flag) \
   RecRegisterConfigUpdateCb(_config_var_name, func, flag)
 
-#define REC_EstablishStaticConfigInteger(_var, _config_var_name) do{ \
+#define REC_EstablishStaticConfigInteger(_var, _config_var_name) do { \
   RecLinkConfigInt(_config_var_name, &_var); \
   _var = (int64_t)REC_ConfigReadInteger(_config_var_name); \
 } while (0)
@@ -183,16 +186,18 @@ void RecSignalManager(int, const char *)
   _var = (RecString)REC_ConfigReadString(_config_var_name); \
 } while (0)
 
-#define REC_EstablishStaticConfigLongLong(_var, _config_var_name) do { \
-  RecLinkConfigCounter(_config_var_name, &_var); \
-  _var = (RecCounter)REC_ConfigReadCounter(_config_var_name); \
-} while (0)
-
 #define REC_EstablishStaticConfigFloat(_var, _config_var_name) do { \
   RecLinkConfigFloat(_config_var_name, &_var); \
   _var = (RecFloat)REC_ConfigReadFloat(_config_var_name); \
 } while (0)
 
+// Allow to treat our "INT" configs as a byte type internally. Note
+// that the byte type is just a wrapper around RECD_INT.
+#define REC_EstablishStaticConfigByte(_var, _config_var_name) do { \
+    RecLinkConfigByte(_config_var_name, &_var); \
+    _var = REC_ConfigReadInteger(_config_var_name) ? true : false; \
+  } while (0)
+
 RecInt REC_ConfigReadInteger(const char *name);
 char *REC_ConfigReadString(const char *name);
 RecFloat REC_ConfigReadFloat(const char *name);

Modified: trafficserver/traffic/trunk/lib/records/I_RecDefs.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/lib/records/I_RecDefs.h?rev=1079662&r1=1079661&r2=1079662&view=diff
==============================================================================
--- trafficserver/traffic/trunk/lib/records/I_RecDefs.h (original)
+++ trafficserver/traffic/trunk/lib/records/I_RecDefs.h Wed Mar  9 04:35:21 2011
@@ -52,6 +52,7 @@ typedef float RecFloat;
 typedef char *RecString;
 typedef const char *RecStringConst;
 typedef int64_t RecCounter;
+typedef int8_t RecByte;
 
 enum RecT
 {

Modified: trafficserver/traffic/trunk/lib/records/RecCore.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/lib/records/RecCore.cc?rev=1079662&r1=1079661&r2=1079662&view=diff
==============================================================================
--- trafficserver/traffic/trunk/lib/records/RecCore.cc (original)
+++ trafficserver/traffic/trunk/lib/records/RecCore.cc Wed Mar  9 04:35:21 2011
@@ -138,6 +138,20 @@ link_counter(const char *name, RecDataT 
   return REC_ERR_OKAY;
 }
 
+// This is a convenience wrapper, to allow us to treat the RecInt's as a
+// 1-byte entity internally.
+static int
+link_byte(const char *name, RecDataT data_type, RecData data, void *cookie)
+{
+  REC_NOWARN_UNUSED(name);
+  REC_NOWARN_UNUSED(data_type);
+  RecByte *rec_byte = (RecByte *) cookie;
+  RecByte byte = static_cast<RecByte>(data.rec_int);
+
+  ink_atomic_swap8(rec_byte, byte);
+  return REC_ERR_OKAY;
+}
+
 // mimic Config.cc::config_string_alloc_cb
 static int
 link_string_alloc(const char *name, RecDataT data_type, RecData data, void *cookie)
@@ -295,6 +309,15 @@ RecLinkConfigString(const char *name, Re
   return RecRegisterConfigUpdateCb(name, link_string_alloc, (void *) rec_string);
 }
 
+int
+RecLinkConfigByte(const char *name, RecByte * rec_byte)
+{
+  if (RecGetRecordByte(name, rec_byte) == REC_ERR_FAIL) {
+    return REC_ERR_FAIL;
+  }
+  return RecRegisterConfigUpdateCb(name, link_byte, (void *) rec_byte);
+}
+
 
 //-------------------------------------------------------------------------
 // RecRegisterConfigUpdateCb
@@ -422,6 +445,16 @@ RecGetRecordCounter(const char *name, Re
   return err;
 }
 
+int
+RecGetRecordByte(const char *name, RecByte *rec_byte, bool lock)
+{
+  int err;
+  RecData data;
+  if ((err = RecGetRecord_Xmalloc(name, RECD_INT, &data, lock)) == REC_ERR_OKAY)
+    *rec_byte = data.rec_int;
+  return err;
+}
+
 
 //-------------------------------------------------------------------------
 // RecGetRec Attributes

Modified: trafficserver/traffic/trunk/lib/ts/ink_atomic.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/lib/ts/ink_atomic.h?rev=1079662&r1=1079661&r2=1079662&view=diff
==============================================================================
--- trafficserver/traffic/trunk/lib/ts/ink_atomic.h (original)
+++ trafficserver/traffic/trunk/lib/ts/ink_atomic.h Wed Mar  9 04:35:21 2011
@@ -46,15 +46,22 @@
 #include "ink_apidefs.h"
 #include "ink_mutex.h"
 
+typedef volatile int8_t vint8;
+typedef volatile int16_t vint16;
 typedef volatile int32_t vint32;
 typedef volatile int64_t vint64;
 typedef volatile void *vvoidp;
+
+typedef vint8 *pvint8;
+typedef vint16 *pvint16;
 typedef vint32 *pvint32;
 typedef vint64 *pvint64;
 typedef vvoidp *pvvoidp;
 
 // Sun/Solaris and the SunPRO compiler
 #if defined(__SUNPRO_CC)
+typedef volatile uint8_t vuint8;
+typedef volatile uint16_t vuint16;
 typedef volatile uint32_t vuint32;
 #if __WORDSIZE == 64
 typedef unsigned long uint64_s;
@@ -62,14 +69,21 @@ typedef unsigned long uint64_s;
 typedef uint64_t uint64_s;
 #endif
 typedef volatile uint64_s vuint64_s;
+typedef vuint8 *pvuint8;
+typedef vuint16 *pvuint16;
 typedef vuint32 *pvuint32;
 typedef vuint64_s *pvuint64_s;
 
 #include <atomic.h>
 
+static inline int8_t ink_atomic_swap8(pvint8 mem, int8_t value) { return (int8_t)atomic_swap_8((pvuint8)mem, (uint8_t)value); }
+static inline int16_t ink_atomic_swap16(pvint16 mem, int16_t value) { return (int16_t)atomic_swap_16((pvuint16)mem, (uint16_t)value); }
+static inline int32_t ink_atomic_swap32(pvint32 mem, int32_t value) { return (int32_t)atomic_swap_32((pvuint32)mem, (uint32_t)value); }
+
 static inline int32_t ink_atomic_swap(pvint32 mem, int32_t value) { return (int32_t)atomic_swap_32((pvuint32)mem, (uint32_t)value); }
 static inline int64_t ink_atomic_swap64(pvint64 mem, int64_t value) { return (int64_t)atomic_swap_64((pvuint64_s)mem, (uint64_s)value); }
 static inline void *ink_atomic_swap_ptr(vvoidp mem, void *value) { return atomic_swap_ptr((vvoidp)mem, value); }
+
 static inline int ink_atomic_cas(pvint32 mem, int old, int new_value) { return atomic_cas_32((pvuint32)mem, (uint32_t)old, (uint32_t)new_value) == old; }
 static inline int ink_atomic_cas64(pvint64 mem, int64_t old, int64_t new_value) { return atomic_cas_64((pvuint64_s)mem, (uint64_s)old, (uint64_s)new_value) == old; }
 static inline int ink_atomic_cas_ptr(pvvoidp mem, void* old, void* new_value) { return atomic_cas_ptr((vvoidp)mem, old, new_value) == old; }
@@ -83,14 +97,21 @@ static inline void *ink_atomic_increment
 
 #else /* ! defined(__SUNPRO_CC) */
 
+/* GCC compiler >= 4.1 */
 #if defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)
 
 /* see http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html */
 
+static inline int8_t ink_atomic_swap8(pvint8 mem, int8_t value) { return __sync_lock_test_and_set(mem, value); }
+static inline int16_t ink_atomic_swap16(pvint16 mem, int16_t value) { return __sync_lock_test_and_set(mem, value); }
+static inline int32_t ink_atomic_swap32(pvint32 mem, int32_t value) { return __sync_lock_test_and_set(mem, value); }
+
 static inline int32_t ink_atomic_swap(pvint32 mem, int32_t value) { return __sync_lock_test_and_set(mem, value); }
 static inline void *ink_atomic_swap_ptr(vvoidp mem, void *value) { return __sync_lock_test_and_set((void**)mem, value); }
+
 static inline int ink_atomic_cas(pvint32 mem, int old, int new_value) { return __sync_bool_compare_and_swap(mem, old, new_value); }
 static inline int ink_atomic_cas_ptr(pvvoidp mem, void* old, void* new_value) { return __sync_bool_compare_and_swap(mem, old, new_value); }
+
 static inline int ink_atomic_increment(pvint32 mem, int value) { return __sync_fetch_and_add(mem, value); }
 static inline void *ink_atomic_increment_ptr(pvvoidp mem, intptr_t value) { return __sync_fetch_and_add((void**)mem, value); }
 
@@ -127,8 +148,7 @@ ink_atomic_increment64(pvint64 mem, int6
   return curr + value;
 }
 
-#else /* Intel 64-bit */
-
+#else /* Intel 64-bit operations */
 static inline int64_t ink_atomic_swap64(pvint64 mem, int64_t value) { return __sync_lock_test_and_set(mem, value); }
 static inline int64_t ink_atomic_cas64(pvint64 mem, int64_t old, int64_t new_value) { return __sync_bool_compare_and_swap(mem, old, new_value); }
 static inline int64_t ink_atomic_increment64(pvint64 mem, int64_t value) { return __sync_fetch_and_add(mem, value); }

Modified: trafficserver/traffic/trunk/mgmt/MgmtDefs.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/mgmt/MgmtDefs.h?rev=1079662&r1=1079661&r2=1079662&view=diff
==============================================================================
--- trafficserver/traffic/trunk/mgmt/MgmtDefs.h (original)
+++ trafficserver/traffic/trunk/mgmt/MgmtDefs.h Wed Mar  9 04:35:21 2011
@@ -42,6 +42,7 @@
 
 typedef int64_t MgmtIntCounter;
 typedef int64_t MgmtInt;
+typedef int8_t MgmtByte;
 typedef float MgmtFloat;
 typedef char *MgmtString;
 

Modified: trafficserver/traffic/trunk/proxy/InkAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPI.cc?rev=1079662&r1=1079661&r2=1079662&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPI.cc Wed Mar  9 04:35:21 2011
@@ -7152,7 +7152,7 @@ typedef enum
     OVERRIDABLE_TYPE_INT,
     OVERRIDABLE_TYPE_FLOAT,
     OVERRIDABLE_TYPE_STRING,
-    OVERRIDABLE_TYPE_BOOL
+    OVERRIDABLE_TYPE_BYTE
   } OverridableDataType;
 
 void*

Modified: trafficserver/traffic/trunk/proxy/http/HttpConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/HttpConfig.cc?rev=1079662&r1=1079661&r2=1079662&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/HttpConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/http/HttpConfig.cc Wed Mar  9 04:35:21 2011
@@ -51,6 +51,10 @@
   REC_EstablishStaticConfigFloat(_ix,_n); \
   REC_RegisterConfigUpdateFunc(_n, http_config_cb, NULL)
 
+#define HttpEstablishStaticConfigByte(_ix,_n) \
+  REC_EstablishStaticConfigByte(_ix,_n); \
+  REC_RegisterConfigUpdateFunc(_n, http_config_cb, NULL)
+
 
 RecRawStatBlock *http_rsb;
 #define HTTP_CLEAR_DYN_STAT(x) \
@@ -1142,50 +1146,46 @@ HttpConfig::startup()
   }
 
   HttpEstablishStaticConfigLongLong(c.server_max_connections, "proxy.config.http.server_max_connections");
-
   HttpEstablishStaticConfigLongLong(c.oride.origin_max_connections, "proxy.config.http.origin_max_connections");
-
   HttpEstablishStaticConfigLongLong(c.origin_min_keep_alive_connections, "proxy.config.http.origin_min_keep_alive_connections");
 
-  HttpEstablishStaticConfigLongLong(c.parent_proxy_routing_enable, "proxy.config.http.parent_proxy_routing_enable");
+  HttpEstablishStaticConfigByte(c.parent_proxy_routing_enable, "proxy.config.http.parent_proxy_routing_enable");
 
   // Wank me.
-  REC_ReadConfigInteger(c.disable_ssl_parenting, "proxy.local.http.parent_proxy.disable_connect_tunneling");
-  HttpEstablishStaticConfigLongLong(c.no_dns_forward_to_parent, "proxy.config.http.no_dns_just_forward_to_parent");
-  HttpEstablishStaticConfigLongLong(c.uncacheable_requests_bypass_parent,
-                                    "proxy.config.http.uncacheable_requests_bypass_parent");
-  HttpEstablishStaticConfigLongLong(c.no_origin_server_dns, "proxy.config.http.no_origin_server_dns");
-  HttpEstablishStaticConfigLongLong(c.use_client_target_addr, "proxy.config.http.use_client_target_addr");
-  HttpEstablishStaticConfigLongLong(c.oride.maintain_pristine_host_hdr, "proxy.config.url_remap.pristine_host_hdr");
-
-  HttpEstablishStaticConfigLongLong(c.snarf_username_from_authorization,
-                                    "proxy.config.http.snarf_username_from_authorization");
-
-  HttpEstablishStaticConfigLongLong(c.enable_url_expandomatic, "proxy.config.http.enable_url_expandomatic");
-
-  HttpEstablishStaticConfigLongLong(c.oride.insert_request_via_string, "proxy.config.http.insert_request_via_str");
-  HttpEstablishStaticConfigLongLong(c.oride.insert_response_via_string, "proxy.config.http.insert_response_via_str");
-  HttpEstablishStaticConfigLongLong(c.verbose_via_string, "proxy.config.http.verbose_via_str");
+  HttpEstablishStaticConfigByte(c.disable_ssl_parenting, "proxy.local.http.parent_proxy.disable_connect_tunneling");
+  HttpEstablishStaticConfigByte(c.no_dns_forward_to_parent, "proxy.config.http.no_dns_just_forward_to_parent");
+  HttpEstablishStaticConfigByte(c.uncacheable_requests_bypass_parent, "proxy.config.http.uncacheable_requests_bypass_parent");
+  HttpEstablishStaticConfigByte(c.no_origin_server_dns, "proxy.config.http.no_origin_server_dns");
+  HttpEstablishStaticConfigByte(c.use_client_target_addr, "proxy.config.http.use_client_target_addr");
+  HttpEstablishStaticConfigByte(c.oride.maintain_pristine_host_hdr, "proxy.config.url_remap.pristine_host_hdr");
+
+  HttpEstablishStaticConfigByte(c.snarf_username_from_authorization, "proxy.config.http.snarf_username_from_authorization");
+
+  HttpEstablishStaticConfigByte(c.enable_url_expandomatic, "proxy.config.http.enable_url_expandomatic");
+
+  HttpEstablishStaticConfigByte(c.oride.insert_request_via_string, "proxy.config.http.insert_request_via_str");
+  HttpEstablishStaticConfigByte(c.oride.insert_response_via_string, "proxy.config.http.insert_response_via_str");
+  HttpEstablishStaticConfigByte(c.verbose_via_string, "proxy.config.http.verbose_via_str");
 
   HttpEstablishStaticConfigStringAlloc(c.proxy_request_via_string, "proxy.config.http.request_via_str");
   c.proxy_request_via_string_len = -1;
   HttpEstablishStaticConfigStringAlloc(c.proxy_response_via_string, "proxy.config.http.response_via_str");
   c.proxy_response_via_string_len = -1;
 
-  HttpEstablishStaticConfigLongLong(c.wuts_enabled, "proxy.config.http.wuts_enabled");
-  HttpEstablishStaticConfigLongLong(c.log_spider_codes, "proxy.config.http.log_spider_codes");
+  HttpEstablishStaticConfigByte(c.wuts_enabled, "proxy.config.http.wuts_enabled");
+  HttpEstablishStaticConfigByte(c.log_spider_codes, "proxy.config.http.log_spider_codes");
 
   HttpEstablishStaticConfigStringAlloc(c.url_expansions_string, "proxy.config.dns.url_expansions");
   HttpEstablishStaticConfigLongLong(c.proxy_server_port, "proxy.config.http.server_port");
   HttpEstablishStaticConfigStringAlloc(c.proxy_server_other_ports, "proxy.config.http.server_other_ports");
-  HttpEstablishStaticConfigLongLong(c.oride.keep_alive_enabled, "proxy.config.http.keep_alive_enabled");
-  HttpEstablishStaticConfigLongLong(c.oride.chunking_enabled, "proxy.config.http.chunking_enabled");
-  HttpEstablishStaticConfigLongLong(c.session_auth_cache_keep_alive_enabled,
-                                   "proxy.config.http.session_auth_cache_keep_alive_enabled");
+  HttpEstablishStaticConfigByte(c.oride.keep_alive_enabled, "proxy.config.http.keep_alive_enabled");
+  HttpEstablishStaticConfigByte(c.oride.chunking_enabled, "proxy.config.http.chunking_enabled");
+  HttpEstablishStaticConfigByte(c.session_auth_cache_keep_alive_enabled,
+                                "proxy.config.http.session_auth_cache_keep_alive_enabled");
   HttpEstablishStaticConfigLongLong(c.origin_server_pipeline, "proxy.config.http.origin_server_pipeline");
   HttpEstablishStaticConfigLongLong(c.user_agent_pipeline, "proxy.config.http.user_agent_pipeline");
   HttpEstablishStaticConfigLongLong(c.share_server_sessions, "proxy.config.http.share_server_sessions");
-  HttpEstablishStaticConfigLongLong(c.oride.keep_alive_post_out, "proxy.config.http.keep_alive_post_out");
+  HttpEstablishStaticConfigByte(c.oride.keep_alive_post_out, "proxy.config.http.keep_alive_post_out");
 
   HttpEstablishStaticConfigLongLong(c.oride.keep_alive_no_activity_timeout_in,
                                     "proxy.config.http.keep_alive_no_activity_timeout_in");
@@ -1196,12 +1196,10 @@ HttpConfig::startup()
   HttpEstablishStaticConfigLongLong(c.oride.transaction_no_activity_timeout_out,
                                     "proxy.config.http.transaction_no_activity_timeout_out");
   HttpEstablishStaticConfigLongLong(c.transaction_active_timeout_in, "proxy.config.http.transaction_active_timeout_in");
-  HttpEstablishStaticConfigLongLong(c.oride.transaction_active_timeout_out,
-                                    "proxy.config.http.transaction_active_timeout_out");
+  HttpEstablishStaticConfigLongLong(c.oride.transaction_active_timeout_out, "proxy.config.http.transaction_active_timeout_out");
   HttpEstablishStaticConfigLongLong(c.accept_no_activity_timeout, "proxy.config.http.accept_no_activity_timeout");
 
-  HttpEstablishStaticConfigLongLong(c.background_fill_active_timeout,
-                                    "proxy.config.http.background_fill_active_timeout");
+  HttpEstablishStaticConfigLongLong(c.background_fill_active_timeout, "proxy.config.http.background_fill_active_timeout");
   HttpEstablishStaticConfigFloat(c.background_fill_threshold, "proxy.config.http.background_fill_completed_threshold");
 
   HttpEstablishStaticConfigLongLong(c.oride.connect_attempts_max_retries, "proxy.config.http.connect_attempts_max_retries");
@@ -1212,10 +1210,8 @@ HttpConfig::startup()
   HttpEstablishStaticConfigLongLong(c.oride.connect_attempts_timeout, "proxy.config.http.connect_attempts_timeout");
   HttpEstablishStaticConfigLongLong(c.oride.post_connect_attempts_timeout, "proxy.config.http.post_connect_attempts_timeout");
   HttpEstablishStaticConfigLongLong(c.parent_connect_attempts, "proxy.config.http.parent_proxy.total_connect_attempts");
-  HttpEstablishStaticConfigLongLong(c.per_parent_connect_attempts,
-                                    "proxy.config.http.parent_proxy.per_parent_connect_attempts");
-  HttpEstablishStaticConfigLongLong(c.parent_connect_timeout,
-                                    "proxy.config.http.parent_proxy.connect_attempts_timeout");
+  HttpEstablishStaticConfigLongLong(c.per_parent_connect_attempts, "proxy.config.http.parent_proxy.per_parent_connect_attempts");
+  HttpEstablishStaticConfigLongLong(c.parent_connect_timeout, "proxy.config.http.parent_proxy.connect_attempts_timeout");
 
   HttpEstablishStaticConfigLongLong(c.oride.sock_recv_buffer_size_out, "proxy.config.net.sock_recv_buffer_size_out");
   HttpEstablishStaticConfigLongLong(c.oride.sock_send_buffer_size_out, "proxy.config.net.sock_send_buffer_size_out");
@@ -1223,35 +1219,35 @@ HttpConfig::startup()
 
   c.fwd_proxy_auth_to_parent = 0;
 
-  HttpEstablishStaticConfigLongLong(c.oride.anonymize_remove_from, "proxy.config.http.anonymize_remove_from");
-  HttpEstablishStaticConfigLongLong(c.oride.anonymize_remove_referer, "proxy.config.http.anonymize_remove_referer");
-  HttpEstablishStaticConfigLongLong(c.oride.anonymize_remove_user_agent, "proxy.config.http.anonymize_remove_user_agent");
-  HttpEstablishStaticConfigLongLong(c.oride.anonymize_remove_cookie, "proxy.config.http.anonymize_remove_cookie");
-  HttpEstablishStaticConfigLongLong(c.oride.anonymize_remove_client_ip, "proxy.config.http.anonymize_remove_client_ip");
-  HttpEstablishStaticConfigLongLong(c.oride.anonymize_insert_client_ip, "proxy.config.http.anonymize_insert_client_ip");
-  HttpEstablishStaticConfigLongLong(c.oride.append_xforwards_header, "proxy.config.http.append_xforwards_header");
+  HttpEstablishStaticConfigByte(c.oride.anonymize_remove_from, "proxy.config.http.anonymize_remove_from");
+  HttpEstablishStaticConfigByte(c.oride.anonymize_remove_referer, "proxy.config.http.anonymize_remove_referer");
+  HttpEstablishStaticConfigByte(c.oride.anonymize_remove_user_agent, "proxy.config.http.anonymize_remove_user_agent");
+  HttpEstablishStaticConfigByte(c.oride.anonymize_remove_cookie, "proxy.config.http.anonymize_remove_cookie");
+  HttpEstablishStaticConfigByte(c.oride.anonymize_remove_client_ip, "proxy.config.http.anonymize_remove_client_ip");
+  HttpEstablishStaticConfigByte(c.oride.anonymize_insert_client_ip, "proxy.config.http.anonymize_insert_client_ip");
+  HttpEstablishStaticConfigByte(c.oride.append_xforwards_header, "proxy.config.http.append_xforwards_header");
   HttpEstablishStaticConfigStringAlloc(c.anonymize_other_header_list, "proxy.config.http.anonymize_other_header_list");
   HttpEstablishStaticConfigStringAlloc(c.global_user_agent_header, "proxy.config.http.global_user_agent_header");
   c.global_user_agent_header_size = c.global_user_agent_header ? strlen(c.global_user_agent_header) : 0;
 
-  HttpEstablishStaticConfigLongLong(c.oride.proxy_response_server_enabled, "proxy.config.http.response_server_enabled");
+  HttpEstablishStaticConfigByte(c.oride.proxy_response_server_enabled, "proxy.config.http.response_server_enabled");
   HttpEstablishStaticConfigStringAlloc(c.oride.proxy_response_server_string, "proxy.config.http.response_server_str");
   c.oride.proxy_response_server_string_len = c.oride.proxy_response_server_string ?
     strlen(c.oride.proxy_response_server_string) : 0;
 
-  HttpEstablishStaticConfigLongLong(c.oride.insert_squid_x_forwarded_for, "proxy.config.http.insert_squid_x_forwarded_for");
+  HttpEstablishStaticConfigByte(c.oride.insert_squid_x_forwarded_for, "proxy.config.http.insert_squid_x_forwarded_for");
 
 
-  HttpEstablishStaticConfigLongLong(c.insert_age_in_response, "proxy.config.http.insert_age_in_response");
+  HttpEstablishStaticConfigByte(c.insert_age_in_response, "proxy.config.http.insert_age_in_response");
 
-  HttpEstablishStaticConfigLongLong(c.avoid_content_spoofing, "proxy.config.http.avoid_content_spoofing");
+  HttpEstablishStaticConfigByte(c.avoid_content_spoofing, "proxy.config.http.avoid_content_spoofing");
 
-  HttpEstablishStaticConfigLongLong(c.enable_http_stats, "proxy.config.http.enable_http_stats");
+  HttpEstablishStaticConfigByte(c.enable_http_stats, "proxy.config.http.enable_http_stats");
 
-  HttpEstablishStaticConfigLongLong(c.normalize_ae_gzip, "proxy.config.http.normalize_ae_gzip");
+  HttpEstablishStaticConfigByte(c.normalize_ae_gzip, "proxy.config.http.normalize_ae_gzip");
 
-  HttpEstablishStaticConfigLongLong(c.icp_enabled, "proxy.config.icp.enabled");
-  HttpEstablishStaticConfigLongLong(c.stale_icp_enabled, "proxy.config.icp.stale_icp_enabled");
+  HttpEstablishStaticConfigByte(c.icp_enabled, "proxy.config.icp.enabled");
+  HttpEstablishStaticConfigByte(c.stale_icp_enabled, "proxy.config.icp.stale_icp_enabled");
 
   HttpEstablishStaticConfigLongLong(c.oride.cache_heuristic_min_lifetime, "proxy.config.http.cache.heuristic_min_lifetime");
   HttpEstablishStaticConfigLongLong(c.oride.cache_heuristic_max_lifetime, "proxy.config.http.cache.heuristic_max_lifetime");
@@ -1277,33 +1273,27 @@ HttpConfig::startup()
   // open write failure retries
   HttpEstablishStaticConfigLongLong(c.max_cache_open_write_retries, "proxy.config.http.cache.max_open_write_retries");
 
-  HttpEstablishStaticConfigLongLong(c.oride.cache_http, "proxy.config.http.cache.http");
-  HttpEstablishStaticConfigLongLong(c.oride.cache_ignore_client_no_cache, "proxy.config.http.cache.ignore_client_no_cache");
-  HttpEstablishStaticConfigLongLong(c.oride.cache_ignore_client_cc_max_age,
-                                    "proxy.config.http.cache.ignore_client_cc_max_age");
-  HttpEstablishStaticConfigLongLong(c.oride.cache_ims_on_client_no_cache, "proxy.config.http.cache.ims_on_client_no_cache");
-  HttpEstablishStaticConfigLongLong(c.oride.cache_ignore_server_no_cache, "proxy.config.http.cache.ignore_server_no_cache");
-  HttpEstablishStaticConfigLongLong(c.oride.cache_responses_to_cookies, "proxy.config.http.cache.cache_responses_to_cookies");
-
-  HttpEstablishStaticConfigLongLong(c.oride.cache_ignore_auth, "proxy.config.http.cache.ignore_authentication");
-  HttpEstablishStaticConfigLongLong(c.oride.cache_urls_that_look_dynamic,
-                                    "proxy.config.http.cache.cache_urls_that_look_dynamic");
-  HttpEstablishStaticConfigLongLong(c.cache_enable_default_vary_headers,
-                                    "proxy.config.http.cache.enable_default_vary_headers");
-
-  HttpEstablishStaticConfigLongLong(c.ignore_accept_mismatch, "proxy.config.http.cache.ignore_accept_mismatch");
-  HttpEstablishStaticConfigLongLong(c.ignore_accept_language_mismatch,
-                                    "proxy.config.http.cache.ignore_accept_language_mismatch");
-  HttpEstablishStaticConfigLongLong(c.ignore_accept_encoding_mismatch,
-                                    "proxy.config.http.cache.ignore_accept_encoding_mismatch");
-  HttpEstablishStaticConfigLongLong(c.ignore_accept_charset_mismatch,
-                                    "proxy.config.http.cache.ignore_accept_charset_mismatch");
+  HttpEstablishStaticConfigByte(c.oride.cache_http, "proxy.config.http.cache.http");
+  HttpEstablishStaticConfigByte(c.oride.cache_ignore_client_no_cache, "proxy.config.http.cache.ignore_client_no_cache");
+  HttpEstablishStaticConfigByte(c.oride.cache_ignore_client_cc_max_age, "proxy.config.http.cache.ignore_client_cc_max_age");
+  HttpEstablishStaticConfigByte(c.oride.cache_ims_on_client_no_cache, "proxy.config.http.cache.ims_on_client_no_cache");
+  HttpEstablishStaticConfigByte(c.oride.cache_ignore_server_no_cache, "proxy.config.http.cache.ignore_server_no_cache");
+  HttpEstablishStaticConfigByte(c.oride.cache_responses_to_cookies, "proxy.config.http.cache.cache_responses_to_cookies");
+
+  HttpEstablishStaticConfigByte(c.oride.cache_ignore_auth, "proxy.config.http.cache.ignore_authentication");
+  HttpEstablishStaticConfigByte(c.oride.cache_urls_that_look_dynamic, "proxy.config.http.cache.cache_urls_that_look_dynamic");
+  HttpEstablishStaticConfigByte(c.cache_enable_default_vary_headers, "proxy.config.http.cache.enable_default_vary_headers");
+
+  HttpEstablishStaticConfigByte(c.ignore_accept_mismatch, "proxy.config.http.cache.ignore_accept_mismatch");
+  HttpEstablishStaticConfigByte(c.ignore_accept_language_mismatch, "proxy.config.http.cache.ignore_accept_language_mismatch");
+  HttpEstablishStaticConfigByte(c.ignore_accept_encoding_mismatch, "proxy.config.http.cache.ignore_accept_encoding_mismatch");
+  HttpEstablishStaticConfigByte(c.ignore_accept_charset_mismatch, "proxy.config.http.cache.ignore_accept_charset_mismatch");
 
-  HttpEstablishStaticConfigLongLong(c.oride.cache_when_to_revalidate, "proxy.config.http.cache.when_to_revalidate");
-  HttpEstablishStaticConfigLongLong(c.cache_when_to_add_no_cache_to_msie_requests,
+  HttpEstablishStaticConfigByte(c.oride.cache_when_to_revalidate, "proxy.config.http.cache.when_to_revalidate");
+  HttpEstablishStaticConfigByte(c.cache_when_to_add_no_cache_to_msie_requests,
                                     "proxy.config.http.cache.when_to_add_no_cache_to_msie_requests");
-  HttpEstablishStaticConfigLongLong(c.oride.cache_required_headers, "proxy.config.http.cache.required_headers");
-  HttpEstablishStaticConfigLongLong(c.cache_range_lookup, "proxy.config.http.cache.range.lookup");
+  HttpEstablishStaticConfigByte(c.oride.cache_required_headers, "proxy.config.http.cache.required_headers");
+  HttpEstablishStaticConfigByte(c.cache_range_lookup, "proxy.config.http.cache.range.lookup");
 
   HttpEstablishStaticConfigStringAlloc(c.connect_ports_string, "proxy.config.http.connect_ports");
 
@@ -1311,31 +1301,30 @@ HttpConfig::startup()
 
   HttpEstablishStaticConfigLongLong(c.response_hdr_max_size, "proxy.config.http.response_header_max_size");
 
-  HttpEstablishStaticConfigLongLong(c.push_method_enabled, "proxy.config.http.push_method_enabled");
+  HttpEstablishStaticConfigByte(c.push_method_enabled, "proxy.config.http.push_method_enabled");
 
-  HttpEstablishStaticConfigLongLong(c.reverse_proxy_enabled, "proxy.config.reverse_proxy.enabled");
-  HttpEstablishStaticConfigLongLong(c.url_remap_required, "proxy.config.url_remap.remap_required");
+  HttpEstablishStaticConfigByte(c.reverse_proxy_enabled, "proxy.config.reverse_proxy.enabled");
+  HttpEstablishStaticConfigByte(c.url_remap_required, "proxy.config.url_remap.remap_required");
 
-  HttpEstablishStaticConfigStringAlloc(c.reverse_proxy_no_host_redirect,
-                                       "proxy.config.header.parse.no_host_url_redirect");
+  HttpEstablishStaticConfigStringAlloc(c.reverse_proxy_no_host_redirect, "proxy.config.header.parse.no_host_url_redirect");
   c.reverse_proxy_no_host_redirect_len = -1;
 
-  HttpEstablishStaticConfigLongLong(c.errors_log_error_pages, "proxy.config.http.errors.log_error_pages");
+  HttpEstablishStaticConfigByte(c.errors_log_error_pages, "proxy.config.http.errors.log_error_pages");
 
   HttpEstablishStaticConfigLongLong(c.slow_log_threshold, "proxy.config.http.slow.log.threshold");
 
-  HttpEstablishStaticConfigLongLong(c.record_cop_page, "proxy.config.http.record_heartbeat");
+  HttpEstablishStaticConfigByte(c.record_cop_page, "proxy.config.http.record_heartbeat");
 
-  HttpEstablishStaticConfigLongLong(c.record_tcp_mem_hit, "proxy.config.http.record_tcp_mem_hit");
+  HttpEstablishStaticConfigByte(c.record_tcp_mem_hit, "proxy.config.http.record_tcp_mem_hit");
 
-  HttpEstablishStaticConfigLongLong(c.oride.send_http11_requests, "proxy.config.http.send_http11_requests");
+  HttpEstablishStaticConfigByte(c.oride.send_http11_requests, "proxy.config.http.send_http11_requests");
 
   // HTTP Referer Filtering
-  HttpEstablishStaticConfigLongLong(c.referer_filter_enabled, "proxy.config.http.referer_filter");
-  HttpEstablishStaticConfigLongLong(c.referer_format_redirect, "proxy.config.http.referer_format_redirect");
+  HttpEstablishStaticConfigByte(c.referer_filter_enabled, "proxy.config.http.referer_filter");
+  HttpEstablishStaticConfigByte(c.referer_format_redirect, "proxy.config.http.referer_format_redirect");
 
   // HTTP Accept_Encoding filtering (depends on User-Agent)
-  HttpEstablishStaticConfigLongLong(c.accept_encoding_filter_enabled, "proxy.config.http.accept_encoding_filter_enabled");
+  HttpEstablishStaticConfigByte(c.accept_encoding_filter_enabled, "proxy.config.http.accept_encoding_filter_enabled");
 
   // HTTP Quick filter
   HttpEstablishStaticConfigLongLong(c.quick_filter_mask, "proxy.config.http.quick_filter.mask");
@@ -1345,11 +1334,11 @@ HttpConfig::startup()
   HttpEstablishStaticConfigLongLong(c.oride.client_abort_threshold, "proxy.config.http.down_server.abort_threshold");
 
   // Negative revalidating
-  HttpEstablishStaticConfigLongLong(c.negative_revalidating_enabled, "proxy.config.http.negative_revalidating_enabled");
+  HttpEstablishStaticConfigByte(c.negative_revalidating_enabled, "proxy.config.http.negative_revalidating_enabled");
   HttpEstablishStaticConfigLongLong(c.negative_revalidating_lifetime, "proxy.config.http.negative_revalidating_lifetime");
 
   // Negative response caching
-  HttpEstablishStaticConfigLongLong(c.oride.negative_caching_enabled, "proxy.config.http.negative_caching_enabled");
+  HttpEstablishStaticConfigByte(c.oride.negative_caching_enabled, "proxy.config.http.negative_caching_enabled");
   HttpEstablishStaticConfigLongLong(c.oride.negative_caching_lifetime, "proxy.config.http.negative_caching_lifetime");
 
   // Buffer size
@@ -1359,8 +1348,9 @@ HttpConfig::startup()
   HttpEstablishStaticConfigLongLong(c.default_buffer_water_mark, "proxy.config.http.default_buffer_water_mark");
 
   // Stat Page Info
-  HttpEstablishStaticConfigLongLong(c.enable_http_info, "proxy.config.http.enable_http_info");
+  HttpEstablishStaticConfigByte(c.enable_http_info, "proxy.config.http.enable_http_info");
 
+  // Support SRV records
   HttpEstablishStaticConfigLongLong(c.srv_enabled, "proxy.config.srv_enabled");
 
   //##############################################################################
@@ -1372,11 +1362,8 @@ HttpConfig::startup()
   //# 3. post_copy_size: The maximum POST data size YTS permits to copy
   //#
   //##############################################################################
-
-  HttpEstablishStaticConfigLongLong(c.redirection_enabled, "proxy.config.http.redirection_enabled");
-
+  HttpEstablishStaticConfigByte(c.redirection_enabled, "proxy.config.http.redirection_enabled");
   HttpEstablishStaticConfigLongLong(c.number_of_redirections, "proxy.config.http.number_of_redirections");
-
   HttpEstablishStaticConfigLongLong(c.post_copy_size, "proxy.config.http.post_copy_size");
 
   // Transparency flag.
@@ -1419,6 +1406,7 @@ void
 HttpConfig::reconfigure()
 {
 #define INT_TO_BOOL(i) ((i) ? 1 : 0);
+#define INT_TO_BYTE(i) (MgmtByte)(i);
 
   HttpConfigParams *params;
 
@@ -1436,7 +1424,7 @@ HttpConfig::reconfigure()
 
   params->snarf_username_from_authorization = INT_TO_BOOL(m_master.snarf_username_from_authorization);
 
-  params->disable_ssl_parenting = m_master.disable_ssl_parenting;
+  params->disable_ssl_parenting = INT_TO_BOOL(m_master.disable_ssl_parenting);
 
   params->server_max_connections = m_master.server_max_connections;
   params->oride.origin_max_connections = m_master.oride.origin_max_connections;
@@ -1454,7 +1442,7 @@ HttpConfig::reconfigure()
 
   params->oride.insert_request_via_string = INT_TO_BOOL(m_master.oride.insert_request_via_string);
   params->oride.insert_response_via_string = INT_TO_BOOL(m_master.oride.insert_response_via_string);
-  params->verbose_via_string = m_master.verbose_via_string;
+  params->verbose_via_string = INT_TO_BYTE(m_master.verbose_via_string);
   params->proxy_request_via_string = xstrdup(m_master.proxy_request_via_string);
   params->proxy_request_via_string_len = (params->proxy_request_via_string) ? strlen(params->proxy_request_via_string) : 0;
   params->proxy_response_via_string = xstrdup(m_master.proxy_response_via_string);
@@ -1474,7 +1462,7 @@ HttpConfig::reconfigure()
   params->origin_server_pipeline = m_master.origin_server_pipeline;
   params->user_agent_pipeline = m_master.user_agent_pipeline;
   params->share_server_sessions = INT_TO_BOOL(m_master.share_server_sessions);
-  params->oride.keep_alive_post_out = m_master.oride.keep_alive_post_out;
+  params->oride.keep_alive_post_out = INT_TO_BOOL(m_master.oride.keep_alive_post_out);
 
   params->oride.keep_alive_no_activity_timeout_in = m_master.oride.keep_alive_no_activity_timeout_in;
   params->keep_alive_no_activity_timeout_out = m_master.keep_alive_no_activity_timeout_out;
@@ -1515,7 +1503,7 @@ HttpConfig::reconfigure()
   params->oride.proxy_response_server_string = xstrdup(m_master.oride.proxy_response_server_string);
   params->oride.proxy_response_server_string_len = params->oride.proxy_response_server_string ?
     strlen(params->oride.proxy_response_server_string) : 0;
-  params->oride.proxy_response_server_enabled = m_master.oride.proxy_response_server_enabled;
+  params->oride.proxy_response_server_enabled = INT_TO_BOOL(m_master.oride.proxy_response_server_enabled);
 
   params->oride.insert_squid_x_forwarded_for = INT_TO_BOOL(m_master.oride.insert_squid_x_forwarded_for);
   params->insert_age_in_response = INT_TO_BOOL(m_master.insert_age_in_response);
@@ -1523,8 +1511,8 @@ HttpConfig::reconfigure()
   params->enable_http_stats = INT_TO_BOOL(m_master.enable_http_stats);
   params->normalize_ae_gzip = INT_TO_BOOL(m_master.normalize_ae_gzip);
 
-  params->icp_enabled = (m_master.icp_enabled == ICP_MODE_SEND_RECEIVE ? 1 : 0);
-  params->stale_icp_enabled = m_master.stale_icp_enabled;
+  params->icp_enabled = (m_master.icp_enabled == ICP_MODE_SEND_RECEIVE ? 1 : 0); // INT_TO_BOOL
+  params->stale_icp_enabled = INT_TO_BOOL(m_master.stale_icp_enabled);
 
   params->oride.cache_heuristic_min_lifetime = m_master.oride.cache_heuristic_min_lifetime;
   params->oride.cache_heuristic_max_lifetime = m_master.oride.cache_heuristic_max_lifetime;
@@ -1554,7 +1542,7 @@ HttpConfig::reconfigure()
   params->oride.cache_ignore_client_cc_max_age = INT_TO_BOOL(m_master.oride.cache_ignore_client_cc_max_age);
   params->oride.cache_ims_on_client_no_cache = INT_TO_BOOL(m_master.oride.cache_ims_on_client_no_cache);
   params->oride.cache_ignore_server_no_cache = INT_TO_BOOL(m_master.oride.cache_ignore_server_no_cache);
-  params->oride.cache_responses_to_cookies = m_master.oride.cache_responses_to_cookies;
+  params->oride.cache_responses_to_cookies = INT_TO_BYTE(m_master.oride.cache_responses_to_cookies);
   params->oride.cache_ignore_auth = INT_TO_BOOL(m_master.oride.cache_ignore_auth);
   params->oride.cache_urls_that_look_dynamic = INT_TO_BOOL(m_master.oride.cache_urls_that_look_dynamic);
   params->cache_enable_default_vary_headers = INT_TO_BOOL(m_master.cache_enable_default_vary_headers);
@@ -1564,10 +1552,10 @@ HttpConfig::reconfigure()
   params->ignore_accept_encoding_mismatch = INT_TO_BOOL(m_master.ignore_accept_encoding_mismatch);
   params->ignore_accept_charset_mismatch = INT_TO_BOOL(m_master.ignore_accept_charset_mismatch);
 
-  params->oride.cache_when_to_revalidate = m_master.oride.cache_when_to_revalidate;
-  params->cache_when_to_add_no_cache_to_msie_requests = m_master.cache_when_to_add_no_cache_to_msie_requests;
+  params->oride.cache_when_to_revalidate = INT_TO_BYTE(m_master.oride.cache_when_to_revalidate);
+  params->cache_when_to_add_no_cache_to_msie_requests = INT_TO_BYTE(m_master.cache_when_to_add_no_cache_to_msie_requests);
 
-  params->oride.cache_required_headers = m_master.oride.cache_required_headers;
+  params->oride.cache_required_headers = INT_TO_BYTE(m_master.oride.cache_required_headers);
   params->cache_range_lookup = INT_TO_BOOL(m_master.cache_range_lookup);
 
   params->connect_ports_string = xstrdup(m_master.connect_ports_string);
@@ -1575,7 +1563,7 @@ HttpConfig::reconfigure()
 
   params->request_hdr_max_size = m_master.request_hdr_max_size;
   params->response_hdr_max_size = m_master.response_hdr_max_size;
-  params->push_method_enabled = m_master.push_method_enabled;
+  params->push_method_enabled = INT_TO_BOOL(m_master.push_method_enabled);
 
   params->reverse_proxy_enabled = INT_TO_BOOL(m_master.reverse_proxy_enabled);
   params->url_remap_required = INT_TO_BOOL(m_master.url_remap_required);
@@ -1583,8 +1571,8 @@ HttpConfig::reconfigure()
   params->slow_log_threshold = m_master.slow_log_threshold;
   params->record_cop_page = INT_TO_BOOL(m_master.record_cop_page);
   params->record_tcp_mem_hit = INT_TO_BOOL(m_master.record_tcp_mem_hit);
-  params->oride.send_http11_requests = m_master.oride.send_http11_requests;
-  params->doc_in_cache_skip_dns = m_master.doc_in_cache_skip_dns;
+  params->oride.send_http11_requests = INT_TO_BYTE(m_master.oride.send_http11_requests);
+  params->doc_in_cache_skip_dns = INT_TO_BOOL(m_master.doc_in_cache_skip_dns);
   params->default_buffer_size_index = m_master.default_buffer_size_index;
   params->default_buffer_water_mark = m_master.default_buffer_water_mark;
   params->enable_http_info = INT_TO_BOOL(m_master.enable_http_info);
@@ -1592,20 +1580,20 @@ HttpConfig::reconfigure()
   params->reverse_proxy_no_host_redirect_len =
     params->reverse_proxy_no_host_redirect ? strlen(params->reverse_proxy_no_host_redirect) : 0;
 
-  params->referer_filter_enabled = m_master.referer_filter_enabled;
-  params->referer_format_redirect = m_master.referer_format_redirect;
+  params->referer_filter_enabled = INT_TO_BOOL(m_master.referer_filter_enabled);
+  params->referer_format_redirect = INT_TO_BOOL(m_master.referer_format_redirect);
 
-  params->accept_encoding_filter_enabled = m_master.accept_encoding_filter_enabled;
+  params->accept_encoding_filter_enabled = INT_TO_BOOL(m_master.accept_encoding_filter_enabled);
 
   params->quick_filter_mask = m_master.quick_filter_mask;
 
   params->oride.down_server_timeout = m_master.oride.down_server_timeout;
   params->oride.client_abort_threshold = m_master.oride.client_abort_threshold;
 
-  params->negative_revalidating_enabled = m_master.negative_revalidating_enabled;
+  params->negative_revalidating_enabled = INT_TO_BOOL(m_master.negative_revalidating_enabled);
   params->negative_revalidating_lifetime = m_master.negative_revalidating_lifetime;
 
-  params->oride.negative_caching_enabled = m_master.oride.negative_caching_enabled;
+  params->oride.negative_caching_enabled = INT_TO_BOOL(m_master.oride.negative_caching_enabled);
   params->oride.negative_caching_lifetime = m_master.oride.negative_caching_lifetime;
 
   //##############################################################################

Modified: trafficserver/traffic/trunk/proxy/http/HttpConfig.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/HttpConfig.h?rev=1079662&r1=1079661&r2=1079662&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/HttpConfig.h (original)
+++ trafficserver/traffic/trunk/proxy/http/HttpConfig.h Wed Mar  9 04:35:21 2011
@@ -409,13 +409,13 @@ struct OverridableHttpConfigParams {
        negative_caching_enabled(0), negative_caching_lifetime(0),
        cache_when_to_revalidate(0), keep_alive_enabled(0), keep_alive_post_out(0),
        sock_recv_buffer_size_out(0), sock_send_buffer_size_out(0), sock_option_flag_out(0),
-       anonymize_remove_from(false), anonymize_remove_referer(false), anonymize_remove_user_agent(false),
-       anonymize_remove_cookie(false), anonymize_remove_client_ip(false), anonymize_insert_client_ip(true),
-       append_xforwards_header(false), proxy_response_server_enabled(0),
+       anonymize_remove_from(0), anonymize_remove_referer(0), anonymize_remove_user_agent(0),
+       anonymize_remove_cookie(0), anonymize_remove_client_ip(0), anonymize_insert_client_ip(1),
+       append_xforwards_header(0), proxy_response_server_enabled(0),
        insert_squid_x_forwarded_for(0), send_http11_requests(3), // SEND_HTTP11_IF_REQUEST_11_AND_HOSTDB
-       cache_http(false), cache_ignore_client_no_cache(false),     cache_ignore_client_cc_max_age(true),
-       cache_ims_on_client_no_cache(false), cache_ignore_server_no_cache(false), cache_responses_to_cookies(0),
-       cache_ignore_auth(0), cache_urls_that_look_dynamic(false), cache_required_headers(0), // CACHE_REQUIRED_HEADERS_NONE
+       cache_http(0), cache_ignore_client_no_cache(0), cache_ignore_client_cc_max_age(1),
+       cache_ims_on_client_no_cache(0), cache_ignore_server_no_cache(0), cache_responses_to_cookies(0),
+       cache_ignore_auth(0), cache_urls_that_look_dynamic(0), cache_required_headers(0), // CACHE_REQUIRED_HEADERS_NONE
        insert_request_via_string(0), insert_response_via_string(0),
        cache_heuristic_min_lifetime(0), cache_heuristic_max_lifetime(0),
        cache_guaranteed_min_lifetime(0), cache_guaranteed_max_lifetime(0), cache_max_stale_age(0),
@@ -440,19 +440,19 @@ struct OverridableHttpConfigParams {
   // configs!!!
 
   // The first three configs used to be @-parameters in remap.config
-  MgmtInt maintain_pristine_host_hdr;
-  MgmtInt chunking_enabled;
+  MgmtByte maintain_pristine_host_hdr;
+  MgmtByte chunking_enabled;
 
   ////////////////////////////////
   //  Negative Response Caching //
   ////////////////////////////////
-  MgmtInt negative_caching_enabled;
+  MgmtByte negative_caching_enabled;
   MgmtInt negative_caching_lifetime;
 
-  MgmtInt cache_when_to_revalidate;
+  MgmtByte cache_when_to_revalidate;
 
-  MgmtInt keep_alive_enabled;
-  MgmtInt keep_alive_post_out;  // share server sessions for post
+  MgmtByte keep_alive_enabled;
+  MgmtByte keep_alive_post_out;  // share server sessions for post
 
   ///////////////////////////////////////
   // origin server connection settings //
@@ -464,41 +464,41 @@ struct OverridableHttpConfigParams {
   ///////////////////////////////////////////////////////////////////
   // Privacy: fields which are removed from the user agent request //
   ///////////////////////////////////////////////////////////////////
-  MgmtInt anonymize_remove_from;
-  MgmtInt anonymize_remove_referer;
-  MgmtInt anonymize_remove_user_agent;
-  MgmtInt anonymize_remove_cookie;
-  MgmtInt anonymize_remove_client_ip;
-  MgmtInt anonymize_insert_client_ip;
-  MgmtInt append_xforwards_header;
+  MgmtByte anonymize_remove_from;
+  MgmtByte anonymize_remove_referer;
+  MgmtByte anonymize_remove_user_agent;
+  MgmtByte anonymize_remove_cookie;
+  MgmtByte anonymize_remove_client_ip;
+  MgmtByte anonymize_insert_client_ip;
+  MgmtByte append_xforwards_header;
 
-  MgmtInt proxy_response_server_enabled;
+  MgmtByte proxy_response_server_enabled;
 
   /////////////////////
   // X-Forwarded-For //
   /////////////////////
-  MgmtInt insert_squid_x_forwarded_for;
+  MgmtByte insert_squid_x_forwarded_for;
 
   //////////////////////
   //  Version Hell    //
   //////////////////////
-  MgmtInt send_http11_requests;
+  MgmtByte send_http11_requests;
 
   ///////////////////
   // cache control //
   ///////////////////
-  MgmtInt cache_http;
-  MgmtInt cache_ignore_client_no_cache;
-  MgmtInt cache_ignore_client_cc_max_age;
-  MgmtInt cache_ims_on_client_no_cache;
-  MgmtInt cache_ignore_server_no_cache;
-  MgmtInt cache_responses_to_cookies;
-  MgmtInt cache_ignore_auth;
-  MgmtInt cache_urls_that_look_dynamic;
-  MgmtInt cache_required_headers;
+  MgmtByte cache_http;
+  MgmtByte cache_ignore_client_no_cache;
+  MgmtByte cache_ignore_client_cc_max_age;
+  MgmtByte cache_ims_on_client_no_cache;
+  MgmtByte cache_ignore_server_no_cache;
+  MgmtByte cache_responses_to_cookies;
+  MgmtByte cache_ignore_auth;
+  MgmtByte cache_urls_that_look_dynamic;
+  MgmtByte cache_required_headers;
 
-  MgmtInt insert_request_via_string;
-  MgmtInt insert_response_via_string;
+  MgmtByte insert_request_via_string;
+  MgmtByte insert_response_via_string;
 
   /////////////////////
   // cache variables //
@@ -598,18 +598,18 @@ public:
   MgmtInt server_max_connections;
   MgmtInt origin_min_keep_alive_connections; // TODO: This one really ought to be overridable, but difficult right now.
 
-  MgmtInt parent_proxy_routing_enable;
-  MgmtInt disable_ssl_parenting;
+  MgmtByte parent_proxy_routing_enable;
+  MgmtByte disable_ssl_parenting;
 
-  MgmtInt enable_url_expandomatic;
-  MgmtInt no_dns_forward_to_parent;
-  MgmtInt uncacheable_requests_bypass_parent;
-  MgmtInt no_origin_server_dns;
-  MgmtInt use_client_target_addr;
+  MgmtByte enable_url_expandomatic;
+  MgmtByte no_dns_forward_to_parent;
+  MgmtByte uncacheable_requests_bypass_parent;
+  MgmtByte no_origin_server_dns;
+  MgmtByte use_client_target_addr;
 
-  MgmtInt snarf_username_from_authorization;
+  MgmtByte snarf_username_from_authorization;
 
-  MgmtInt verbose_via_string;
+  MgmtByte verbose_via_string;
 
   char *proxy_request_via_string;
   int proxy_request_via_string_len;
@@ -619,8 +619,8 @@ public:
   //////////////////
   // WUTS headers //
   //////////////////
-  MgmtInt wuts_enabled;
-  MgmtInt log_spider_codes;
+  MgmtByte wuts_enabled;
+  MgmtByte log_spider_codes;
 
   ///////////////////////////////////
   // URL expansions for DNS lookup //
@@ -634,7 +634,7 @@ public:
   ///////////////////////////////////////////////////
   MgmtInt proxy_server_port;
   char *proxy_server_other_ports;
-  MgmtInt session_auth_cache_keep_alive_enabled;
+  MgmtByte session_auth_cache_keep_alive_enabled;
   MgmtInt origin_server_pipeline;
   MgmtInt user_agent_pipeline;
   MgmtInt share_server_sessions;
@@ -665,15 +665,15 @@ public:
   /////////////////////
   // Benchmark hacks //
   /////////////////////
-  MgmtInt insert_age_in_response;       // INKqa09853
-  MgmtInt avoid_content_spoofing;       // INKqa10426
-  MgmtInt enable_http_stats;    // INKqa09879
+  MgmtByte insert_age_in_response;
+  MgmtByte avoid_content_spoofing;
+  MgmtByte enable_http_stats;
 
   ///////////////////
   // ICP variables //
   ///////////////////
-  MgmtInt icp_enabled;
-  MgmtInt stale_icp_enabled;
+  MgmtByte icp_enabled;
+  MgmtByte stale_icp_enabled;
 
   char *cache_vary_default_text;
   char *cache_vary_default_images;
@@ -685,9 +685,9 @@ public:
   ///////////////////
   // cache control //
   ///////////////////
-  MgmtInt cache_enable_default_vary_headers;
-  MgmtInt cache_when_to_add_no_cache_to_msie_requests;
-  MgmtInt cache_range_lookup;
+  MgmtByte cache_enable_default_vary_headers;
+  MgmtByte cache_when_to_add_no_cache_to_msie_requests;
+  MgmtByte cache_range_lookup;
 
   ////////////////////////////////////////////
   // CONNECT ports (used to be == ssl_ports //
@@ -704,18 +704,18 @@ public:
   //////////
   // Push //
   //////////
-  MgmtInt push_method_enabled;
+  MgmtByte push_method_enabled;
 
   ////////////////////////////
   // HTTP Referer filtering //
   ////////////////////////////
-  MgmtInt referer_filter_enabled;
-  MgmtInt referer_format_redirect;
+  MgmtByte referer_filter_enabled;
+  MgmtByte referer_format_redirect;
 
   ////////////////////////////////////////////////////////
   // HTTP Accept-Encoding filtering based on User-Agent //
   ////////////////////////////////////////////////////////
-  MgmtInt accept_encoding_filter_enabled;
+  MgmtByte accept_encoding_filter_enabled;
 
   //////////////////////////
   // HTTP Quick filtering //
@@ -733,41 +733,41 @@ public:
   ///////////////////
   // reverse proxy //
   ///////////////////
-  MgmtInt reverse_proxy_enabled;
-  MgmtInt url_remap_required;
+  MgmtByte reverse_proxy_enabled;
+  MgmtByte url_remap_required;
   char *reverse_proxy_no_host_redirect;
   int reverse_proxy_no_host_redirect_len;
 
   ////////////////////////////
   //  Negative Revalidating //
   ////////////////////////////
-  MgmtInt negative_revalidating_enabled;
+  MgmtByte negative_revalidating_enabled;
   MgmtInt negative_revalidating_lifetime;
 
   ///////////////////
   // cop access    //
   ///////////////////
-  MgmtInt record_cop_page;
+  MgmtByte record_cop_page;
 
   ////////////////////////
   // record tcp_mem_hit //
   ////////////////////////
-  MgmtInt record_tcp_mem_hit;
+  MgmtByte record_tcp_mem_hit;
 
   /////////////////////
   // Error Reporting //
   /////////////////////
-  MgmtInt errors_log_error_pages;
+  MgmtByte errors_log_error_pages;
   MgmtInt slow_log_threshold;
 
   //////////////////////
   //  DOC IN CACHE NO DNS//
   //////////////////////
-  MgmtInt doc_in_cache_skip_dns;
+  MgmtByte doc_in_cache_skip_dns;
 
   MgmtInt default_buffer_size_index;
   MgmtInt default_buffer_water_mark;
-  MgmtInt enable_http_info;
+  MgmtByte enable_http_info;
 
   //////////////////////
   //  Breaking Specs  //
@@ -782,7 +782,7 @@ public:
   MgmtInt srv_enabled;          /* added by: ebalsa */
 
   //##############################################################################
-//#
+  //#
   //# Redirection
   //#
   //# 1. redirection_enabled: if set to 1, redirection is enabled.
@@ -791,7 +791,7 @@ public:
   //#
   //##############################################################################
 
-  MgmtInt redirection_enabled;
+  MgmtByte redirection_enabled;
   MgmtInt number_of_redirections;
   MgmtInt post_copy_size;
 
@@ -799,15 +799,15 @@ public:
   // Allow special handling of Accept* headers to be disabled to  //
   // avoid unnecessary creation of alternates                     //
   //////////////////////////////////////////////////////////////////
-  MgmtInt ignore_accept_mismatch;
-  MgmtInt ignore_accept_language_mismatch;
-  MgmtInt ignore_accept_encoding_mismatch;
-  MgmtInt ignore_accept_charset_mismatch;
+  MgmtByte ignore_accept_mismatch;
+  MgmtByte ignore_accept_language_mismatch;
+  MgmtByte ignore_accept_encoding_mismatch;
+  MgmtByte ignore_accept_charset_mismatch;
 
   ////////////////////////////////
   // Optimize gzip alternates   //
   ////////////////////////////////
-  MgmtInt normalize_ae_gzip;
+  MgmtByte normalize_ae_gzip;
 
   OverridableHttpConfigParams oride;
 
@@ -907,21 +907,21 @@ HttpConfigParams::HttpConfigParams()
     outgoing_ip_to_bind(0),
     server_max_connections(0),
     origin_min_keep_alive_connections(0),
-    parent_proxy_routing_enable(false),
+    parent_proxy_routing_enable(0),
     disable_ssl_parenting(0),
     enable_url_expandomatic(0),
     no_dns_forward_to_parent(0),
     uncacheable_requests_bypass_parent(1),
     no_origin_server_dns(0),
     use_client_target_addr(0),
-    //snarf_username_from_authorization(0),
+    snarf_username_from_authorization(0),
     verbose_via_string(0),
     proxy_request_via_string(0),
     proxy_request_via_string_len(0),
     proxy_response_via_string(0),
     proxy_response_via_string_len(0),
-    wuts_enabled(false),
-    log_spider_codes(false),
+    wuts_enabled(0),
+    log_spider_codes(0),
     url_expansions_string(0),
     url_expansions(0),
     num_url_expansions(0),
@@ -951,7 +951,7 @@ HttpConfigParams::HttpConfigParams()
     cache_vary_default_images(0),
     cache_vary_default_other(0),
     max_cache_open_write_retries(0),
-    cache_enable_default_vary_headers(false),
+    cache_enable_default_vary_headers(0),
     cache_when_to_add_no_cache_to_msie_requests(0),
     connect_ports_string(0),
     connect_ports(0),
@@ -976,7 +976,7 @@ HttpConfigParams::HttpConfigParams()
     fwd_proxy_auth_to_parent(0),
     cluster_time_delta(0),
     srv_enabled(0),
-    redirection_enabled(true),
+    redirection_enabled(1),
     number_of_redirections(0),
     post_copy_size(2048),
     ignore_accept_mismatch(0),
@@ -984,8 +984,7 @@ HttpConfigParams::HttpConfigParams()
     ignore_accept_encoding_mismatch(0),
     ignore_accept_charset_mismatch(0),
     normalize_ae_gzip(1)
-{
-}
+{ }
 
 inline
 HttpConfigParams::~HttpConfigParams()

Modified: trafficserver/traffic/trunk/proxy/http/HttpTransact.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/HttpTransact.cc?rev=1079662&r1=1079661&r2=1079662&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/HttpTransact.cc (original)
+++ trafficserver/traffic/trunk/proxy/http/HttpTransact.cc Wed Mar  9 04:35:21 2011
@@ -2558,9 +2558,8 @@ HttpTransact::HandleCacheOpenReadHit(Sta
     Debug("http_seq", "[HttpTransact::HandleCacheOpenReadHit] " "Revalidate document with server");
 
 #ifndef INK_NO_ICP
-    if (s->http_config_param->icp_enabled && icp_dynamic_enabled
-        && s->http_config_param->stale_icp_enabled
-        && needs_authenticate == false && needs_cache_auth == false &&
+    if (s->http_config_param->icp_enabled && icp_dynamic_enabled && s->http_config_param->stale_icp_enabled &&
+        needs_authenticate == false && needs_cache_auth == false &&
         !s->hdr_info.client_request.is_pragma_no_cache_set() &&
         !s->hdr_info.client_request.is_cache_control_set(HTTP_VALUE_NO_CACHE)) {
       Debug("http_trans", "[HandleCacheOpenReadHit] ICP is configured" " and no no-cache in request; checking ICP for a STALE hit");



Mime
View raw message