00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "ink_config.h"
00025 #include <ctype.h>
00026 #include <string.h>
00027 #include "HttpConfig.h"
00028 #include "HTTP.h"
00029 #include "ProcessManager.h"
00030 #include "ProxyConfig.h"
00031 #include "ICPProcessor.h"
00032 #include "P_Net.h"
00033 #include "P_RecUtils.h"
00034 #include <records/I_RecHttp.h>
00035
00036 #ifndef min
00037 #define min(a,b) ((a) < (b) ? (a) : (b))
00038 #endif
00039 #ifndef max
00040 #define max(a,b) ((a) > (b) ? (a) : (b))
00041 #endif
00042
00043 #define HttpEstablishStaticConfigStringAlloc(_ix,_n) \
00044 REC_EstablishStaticConfigStringAlloc(_ix,_n); \
00045 REC_RegisterConfigUpdateFunc(_n, http_config_cb, NULL)
00046
00047 #define HttpEstablishStaticConfigLongLong(_ix,_n) \
00048 REC_EstablishStaticConfigInteger(_ix,_n); \
00049 REC_RegisterConfigUpdateFunc(_n, http_config_cb, NULL)
00050
00051 #define HttpEstablishStaticConfigFloat(_ix,_n) \
00052 REC_EstablishStaticConfigFloat(_ix,_n); \
00053 REC_RegisterConfigUpdateFunc(_n, http_config_cb, NULL)
00054
00055 #define HttpEstablishStaticConfigByte(_ix,_n) \
00056 REC_EstablishStaticConfigByte(_ix,_n); \
00057 REC_RegisterConfigUpdateFunc(_n, http_config_cb, NULL)
00058
00059
00060 RecRawStatBlock *http_rsb;
00061 #define HTTP_CLEAR_DYN_STAT(x) \
00062 do { \
00063 RecSetRawStatSum(http_rsb, x, 0); \
00064 RecSetRawStatCount(http_rsb, x, 0); \
00065 } while (0);
00066
00067
00068 class HttpConfigCont:public Continuation
00069 {
00070 public:
00071 HttpConfigCont();
00072 int handle_event(int event, void *edata);
00073 };
00074
00075
00076 template <typename T> struct ConfigEnumPair
00077 {
00078 T _value;
00079 char const* _key;
00080 };
00081
00082
00083
00084
00085
00086 template <typename T> static bool
00087 http_config_enum_search(char const* key, ConfigEnumPair<T>* list, size_t n, MgmtByte value)
00088 {
00089
00090 for ( size_t i = 0 ; i < n ; ++i ) {
00091 if (0 == strcasecmp(list[i]._key, key)) {
00092 value = list[i]._value;
00093 return true;
00094 }
00095 }
00096 return false;
00097 }
00098
00099
00100
00101
00102
00103 template <typename T> static bool
00104 http_config_enum_read(char const* name, ConfigEnumPair<T>* list, size_t n, MgmtByte value)
00105 {
00106 char key[512];
00107 if (REC_ERR_OKAY == RecGetRecordString(name, key, sizeof(key))) {
00108 return http_config_enum_search(key, list, n, value);
00109 }
00110 return false;
00111 }
00112
00113
00114 static
00115 ConfigEnumPair<TSServerSessionSharingMatchType> SessionSharingMatchStrings[] =
00116 {
00117 { TS_SERVER_SESSION_SHARING_MATCH_NONE, "none" },
00118 { TS_SERVER_SESSION_SHARING_MATCH_IP, "ip" },
00119 { TS_SERVER_SESSION_SHARING_MATCH_HOST, "host" },
00120 { TS_SERVER_SESSION_SHARING_MATCH_BOTH, "both" }
00121 };
00122
00123 static
00124 ConfigEnumPair<TSServerSessionSharingPoolType> SessionSharingPoolStrings[] =
00125 {
00126 { TS_SERVER_SESSION_SHARING_POOL_GLOBAL, "global" },
00127 { TS_SERVER_SESSION_SHARING_POOL_THREAD, "thread" }
00128 };
00129
00130 # define ARRAY_SIZE(x) (sizeof(x)/(sizeof((x)[0])))
00131
00132
00133
00134
00135
00136
00137 int HttpConfig::m_id = 0;
00138 HttpConfigParams HttpConfig::m_master;
00139 HttpUserAgent_RegxEntry *HttpConfig::user_agent_list = NULL;
00140
00141 static volatile int http_config_changes = 1;
00142 static HttpConfigCont *http_config_cont = NULL;
00143
00144
00145 HttpConfigCont::HttpConfigCont()
00146 : Continuation(new_ProxyMutex())
00147 {
00148 SET_HANDLER(&HttpConfigCont::handle_event);
00149 }
00150
00151 int
00152 HttpConfigCont::handle_event(int , void * )
00153 {
00154 if (ink_atomic_increment((int *) &http_config_changes, -1) == 1) {
00155 HttpConfig::reconfigure();
00156 }
00157 return 0;
00158 }
00159
00160
00161 static int
00162 http_config_cb(const char * , RecDataT ,
00163 RecData , void * )
00164 {
00165 ink_atomic_increment((int *) &http_config_changes, 1);
00166
00167 INK_MEMORY_BARRIER;
00168
00169 eventProcessor.schedule_in(http_config_cont, HRTIME_SECONDS(1), ET_CALL);
00170 return 0;
00171 }
00172
00173
00174 static void
00175 http_config_share_server_sessions_bc(HttpConfigParams* c, MgmtByte v)
00176 {
00177 switch (v) {
00178 case 0:
00179 c->oride.server_session_sharing_match = TS_SERVER_SESSION_SHARING_MATCH_NONE;
00180 c->oride.server_session_sharing_pool = TS_SERVER_SESSION_SHARING_POOL_GLOBAL;
00181 break;
00182 case 1:
00183 c->oride.server_session_sharing_match = TS_SERVER_SESSION_SHARING_MATCH_BOTH;
00184 c->oride.server_session_sharing_pool = TS_SERVER_SESSION_SHARING_POOL_GLOBAL;
00185 break;
00186 case 2:
00187 c->oride.server_session_sharing_match = TS_SERVER_SESSION_SHARING_MATCH_BOTH;
00188 c->oride.server_session_sharing_pool = TS_SERVER_SESSION_SHARING_POOL_THREAD;
00189 break;
00190 }
00191 }
00192
00193 static void
00194 http_config_share_server_sessions_read_bc(HttpConfigParams* c)
00195 {
00196 MgmtByte v;
00197 if (REC_ERR_OKAY == RecGetRecordByte("proxy.config.http.share_server_sessions", &v))
00198 http_config_share_server_sessions_bc(c, v);
00199 }
00200
00201
00202
00203
00204 static int
00205 http_server_session_sharing_cb(char const* name, RecDataT dtype, RecData data, void* cookie)
00206 {
00207 bool valid_p = true;
00208 HttpConfigParams* c = static_cast<HttpConfigParams*>(cookie);
00209
00210 if (0 == strcasecmp("proxy.config.http.server_session_sharing.pool", name)) {
00211 MgmtByte& match = c->oride.server_session_sharing_match;
00212 if (RECD_INT == dtype) {
00213 match = static_cast<TSServerSessionSharingMatchType>(data.rec_int);
00214 } else if (RECD_STRING == dtype && http_config_enum_search(data.rec_string, SessionSharingMatchStrings, ARRAY_SIZE(SessionSharingMatchStrings), match)) {
00215
00216 } else {
00217 valid_p = false;
00218 }
00219 } else if (0 == strcasecmp("proxy.config.http.server_session_sharing.match", name)) {
00220 MgmtByte& match = c->oride.server_session_sharing_pool;
00221 if (RECD_INT == dtype) {
00222 match = static_cast<TSServerSessionSharingPoolType>(data.rec_int);
00223 } else if (RECD_STRING == dtype && http_config_enum_search(data.rec_string, SessionSharingPoolStrings, ARRAY_SIZE(SessionSharingPoolStrings), match)) {
00224
00225 } else {
00226 valid_p = false;
00227 }
00228 } else if (0 == strcasecmp("proxy.config.http.share_server_sessions", name) && RECD_INT == dtype) {
00229 http_config_share_server_sessions_bc(c, data.rec_int);
00230 } else {
00231 valid_p = false;
00232 }
00233
00234
00235 if (valid_p)
00236 http_config_cb(name, dtype, data, cookie);
00237
00238 return REC_ERR_OKAY;
00239 }
00240
00241 void
00242 register_configs()
00243 {
00244 }
00245
00246 void
00247 register_stat_callbacks()
00248 {
00249
00250
00251
00252 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00253 "proxy.process.http.background_fill_current_count",
00254 RECD_INT, RECP_NON_PERSISTENT, (int) http_background_fill_current_count_stat, RecRawStatSyncSum);
00255 HTTP_CLEAR_DYN_STAT(http_background_fill_current_count_stat);
00256 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00257 "proxy.process.http.current_client_connections",
00258 RECD_INT, RECP_NON_PERSISTENT, (int) http_current_client_connections_stat, RecRawStatSyncSum);
00259 HTTP_CLEAR_DYN_STAT(http_current_client_connections_stat);
00260 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00261 "proxy.process.http.current_active_client_connections",
00262 RECD_INT, RECP_NON_PERSISTENT,
00263 (int) http_current_active_client_connections_stat, RecRawStatSyncSum);
00264 HTTP_CLEAR_DYN_STAT(http_current_active_client_connections_stat);
00265 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00266 "proxy.process.http.websocket.current_active_client_connections",
00267 RECD_INT, RECP_NON_PERSISTENT,
00268 (int) http_websocket_current_active_client_connections_stat, RecRawStatSyncSum);
00269 HTTP_CLEAR_DYN_STAT(http_websocket_current_active_client_connections_stat);
00270
00271 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00272 "proxy.process.http.current_client_transactions",
00273 RECD_INT, RECP_NON_PERSISTENT, (int) http_current_client_transactions_stat, RecRawStatSyncSum);
00274 HTTP_CLEAR_DYN_STAT(http_current_client_transactions_stat);
00275 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00276 "proxy.process.http.current_parent_proxy_transactions",
00277 RECD_INT, RECP_NON_PERSISTENT,
00278 (int) http_current_parent_proxy_transactions_stat, RecRawStatSyncSum);
00279 HTTP_CLEAR_DYN_STAT(http_current_parent_proxy_transactions_stat);
00280 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00281 "proxy.process.http.current_icp_transactions",
00282 RECD_INT, RECP_NON_PERSISTENT, (int) http_current_icp_transactions_stat, RecRawStatSyncSum);
00283 HTTP_CLEAR_DYN_STAT(http_current_icp_transactions_stat);
00284 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00285 "proxy.process.http.current_server_transactions",
00286 RECD_INT, RECP_NON_PERSISTENT, (int) http_current_server_transactions_stat, RecRawStatSyncSum);
00287 HTTP_CLEAR_DYN_STAT(http_current_server_transactions_stat);
00288
00289 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00290 "proxy.process.http.current_parent_proxy_raw_transactions",
00291 RECD_INT, RECP_NON_PERSISTENT,
00292 (int) http_current_parent_proxy_raw_transactions_stat, RecRawStatSyncSum);
00293 HTTP_CLEAR_DYN_STAT(http_current_parent_proxy_raw_transactions_stat);
00294 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00295 "proxy.process.http.current_icp_raw_transactions",
00296 RECD_INT, RECP_NON_PERSISTENT, (int) http_current_icp_raw_transactions_stat, RecRawStatSyncSum);
00297 HTTP_CLEAR_DYN_STAT(http_current_icp_raw_transactions_stat);
00298 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00299 "proxy.process.http.current_server_raw_transactions",
00300 RECD_INT, RECP_NON_PERSISTENT, (int) http_current_server_raw_transactions_stat, RecRawStatSyncSum);
00301 HTTP_CLEAR_DYN_STAT(http_current_server_raw_transactions_stat);
00302
00303
00304 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00305 "proxy.process.http.completed_requests",
00306 RECD_COUNTER, RECP_PERSISTENT, (int) http_completed_requests_stat, RecRawStatSyncCount);
00307
00308 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00309 "proxy.process.http.total_incoming_connections",
00310 RECD_COUNTER, RECP_PERSISTENT, (int) http_total_incoming_connections_stat, RecRawStatSyncCount);
00311
00312 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00313 "proxy.process.http.total_client_connections",
00314 RECD_COUNTER, RECP_PERSISTENT, (int) http_total_client_connections_stat, RecRawStatSyncCount);
00315
00316 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00317 "proxy.process.http.total_client_connections_ipv4",
00318 RECD_COUNTER, RECP_PERSISTENT, (int) http_total_client_connections_ipv4_stat, RecRawStatSyncCount);
00319
00320 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00321 "proxy.process.http.total_client_connections_ipv6",
00322 RECD_COUNTER, RECP_PERSISTENT, (int) http_total_client_connections_ipv6_stat, RecRawStatSyncCount);
00323
00324 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00325 "proxy.process.http.total_server_connections",
00326 RECD_COUNTER, RECP_PERSISTENT, (int) http_total_server_connections_stat, RecRawStatSyncCount);
00327
00328 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00329 "proxy.process.http.total_parent_proxy_connections",
00330 RECD_COUNTER, RECP_PERSISTENT, (int) http_total_parent_proxy_connections_stat, RecRawStatSyncCount);
00331
00332
00333 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00334 "proxy.process.http.current_parent_proxy_connections",
00335 RECD_INT, RECP_NON_PERSISTENT,
00336 (int) http_current_parent_proxy_connections_stat, RecRawStatSyncSum);
00337 HTTP_CLEAR_DYN_STAT(http_current_parent_proxy_connections_stat);
00338 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00339 "proxy.process.http.current_server_connections",
00340 RECD_INT, RECP_NON_PERSISTENT, (int) http_current_server_connections_stat, RecRawStatSyncSum);
00341 HTTP_CLEAR_DYN_STAT(http_current_server_connections_stat);
00342 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00343 "proxy.process.http.current_cache_connections",
00344 RECD_INT, RECP_NON_PERSISTENT, (int) http_current_cache_connections_stat, RecRawStatSyncSum);
00345 HTTP_CLEAR_DYN_STAT(http_current_cache_connections_stat);
00346 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00347 "proxy.process.http.avg_transactions_per_client_connection",
00348 RECD_FLOAT, RECP_PERSISTENT, (int) http_transactions_per_client_con, RecRawStatSyncAvg);
00349
00350 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00351 "proxy.process.http.avg_transactions_per_server_connection",
00352 RECD_FLOAT, RECP_PERSISTENT, (int) http_transactions_per_server_con, RecRawStatSyncAvg);
00353
00354 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00355 "proxy.process.http.avg_transactions_per_parent_connection",
00356 RECD_FLOAT, RECP_PERSISTENT, (int) http_transactions_per_parent_con, RecRawStatSyncAvg);
00357
00358 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00359 "proxy.process.http.client_connection_time",
00360 RECD_INT, RECP_PERSISTENT, (int) http_client_connection_time_stat, RecRawStatSyncSum);
00361
00362 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00363 "proxy.process.http.parent_proxy_connection_time",
00364 RECD_INT, RECP_PERSISTENT, (int) http_parent_proxy_connection_time_stat, RecRawStatSyncSum);
00365
00366 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00367 "proxy.process.http.server_connection_time",
00368 RECD_INT, RECP_PERSISTENT, (int) http_server_connection_time_stat, RecRawStatSyncSum);
00369
00370 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00371 "proxy.process.http.cache_connection_time",
00372 RECD_INT, RECP_PERSISTENT, (int) http_cache_connection_time_stat, RecRawStatSyncSum);
00373
00374 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00375 "proxy.process.http.transaction_counts.errors.pre_accept_hangups",
00376 RECD_COUNTER, RECP_PERSISTENT,
00377 (int) http_ua_msecs_counts_errors_pre_accept_hangups_stat, RecRawStatSyncCount);
00378
00379 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00380 "proxy.process.http.transaction_totaltime.errors.pre_accept_hangups",
00381 RECD_FLOAT, RECP_PERSISTENT,
00382 (int) http_ua_msecs_counts_errors_pre_accept_hangups_stat, RecRawStatSyncIntMsecsToFloatSeconds);
00383
00384 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00385 "proxy.process.http.transaction_counts.errors.empty_hangups",
00386 RECD_COUNTER, RECP_PERSISTENT,
00387 (int) http_ua_msecs_counts_errors_empty_hangups_stat, RecRawStatSyncCount);
00388
00389 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00390 "proxy.process.http.transaction_totaltime.errors.empty_hangups",
00391 RECD_FLOAT, RECP_PERSISTENT, (int) http_ua_msecs_counts_errors_empty_hangups_stat, RecRawStatSyncCount);
00392
00393 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00394 "proxy.process.http.transaction_counts.errors.early_hangups",
00395 RECD_COUNTER, RECP_PERSISTENT,
00396 (int) http_ua_msecs_counts_errors_early_hangups_stat, RecRawStatSyncCount);
00397
00398 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00399 "proxy.process.http.transaction_totaltime.errors.early_hangups",
00400 RECD_FLOAT, RECP_PERSISTENT, (int) http_ua_msecs_counts_errors_early_hangups_stat, RecRawStatSyncCount);
00401
00402
00403
00404
00405
00406 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00407 "proxy.process.http.incoming_requests",
00408 RECD_COUNTER, RECP_PERSISTENT, (int) http_incoming_requests_stat, RecRawStatSyncCount);
00409
00410 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00411 "proxy.process.http.outgoing_requests",
00412 RECD_COUNTER, RECP_PERSISTENT, (int) http_outgoing_requests_stat, RecRawStatSyncCount);
00413
00414 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00415 "proxy.process.http.incoming_responses",
00416 RECD_COUNTER, RECP_PERSISTENT, (int) http_incoming_responses_stat, RecRawStatSyncCount);
00417
00418 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00419 "proxy.process.http.invalid_client_requests",
00420 RECD_COUNTER, RECP_PERSISTENT, (int) http_invalid_client_requests_stat, RecRawStatSyncCount);
00421
00422 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00423 "proxy.process.http.missing_host_hdr",
00424 RECD_COUNTER, RECP_PERSISTENT, (int) http_missing_host_hdr_stat, RecRawStatSyncCount);
00425
00426 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00427 "proxy.process.http.get_requests",
00428 RECD_COUNTER, RECP_PERSISTENT, (int) http_get_requests_stat, RecRawStatSyncCount);
00429
00430 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00431 "proxy.process.http.head_requests",
00432 RECD_COUNTER, RECP_PERSISTENT, (int) http_head_requests_stat, RecRawStatSyncCount);
00433
00434 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00435 "proxy.process.http.trace_requests",
00436 RECD_COUNTER, RECP_PERSISTENT, (int) http_trace_requests_stat, RecRawStatSyncCount);
00437
00438 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00439 "proxy.process.http.options_requests",
00440 RECD_COUNTER, RECP_PERSISTENT, (int) http_options_requests_stat, RecRawStatSyncCount);
00441
00442 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00443 "proxy.process.http.post_requests",
00444 RECD_COUNTER, RECP_PERSISTENT, (int) http_post_requests_stat, RecRawStatSyncCount);
00445
00446 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00447 "proxy.process.http.put_requests",
00448 RECD_COUNTER, RECP_PERSISTENT, (int) http_put_requests_stat, RecRawStatSyncCount);
00449
00450 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00451 "proxy.process.http.push_requests",
00452 RECD_COUNTER, RECP_PERSISTENT, (int) http_push_requests_stat, RecRawStatSyncCount);
00453
00454 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00455 "proxy.process.http.delete_requests",
00456 RECD_COUNTER, RECP_PERSISTENT, (int) http_delete_requests_stat, RecRawStatSyncCount);
00457
00458 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00459 "proxy.process.http.purge_requests",
00460 RECD_COUNTER, RECP_PERSISTENT, (int) http_purge_requests_stat, RecRawStatSyncCount);
00461
00462 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00463 "proxy.process.http.connect_requests",
00464 RECD_COUNTER, RECP_PERSISTENT, (int) http_connect_requests_stat, RecRawStatSyncCount);
00465
00466 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00467 "proxy.process.http.extension_method_requests",
00468 RECD_COUNTER, RECP_PERSISTENT, (int) http_extension_method_requests_stat, RecRawStatSyncCount);
00469
00470 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00471 "proxy.process.http.client_no_cache_requests",
00472 RECD_COUNTER, RECP_PERSISTENT, (int) http_client_no_cache_requests_stat, RecRawStatSyncCount);
00473
00474 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00475 "proxy.process.http.broken_server_connections",
00476 RECD_COUNTER, RECP_PERSISTENT, (int) http_broken_server_connections_stat, RecRawStatSyncCount);
00477
00478 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00479 "proxy.process.http.cache_lookups",
00480 RECD_COUNTER, RECP_PERSISTENT, (int) http_cache_lookups_stat, RecRawStatSyncCount);
00481
00482 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00483 "proxy.process.http.cache_writes",
00484 RECD_COUNTER, RECP_PERSISTENT, (int) http_cache_writes_stat, RecRawStatSyncCount);
00485
00486 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00487 "proxy.process.http.cache_updates",
00488 RECD_COUNTER, RECP_PERSISTENT, (int) http_cache_updates_stat, RecRawStatSyncCount);
00489
00490 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00491 "proxy.process.http.cache_deletes",
00492 RECD_COUNTER, RECP_PERSISTENT, (int) http_cache_deletes_stat, RecRawStatSyncCount);
00493
00494 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00495 "proxy.process.http.tunnels",
00496 RECD_COUNTER, RECP_PERSISTENT, (int) http_tunnels_stat, RecRawStatSyncCount);
00497
00498 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00499 "proxy.process.http.throttled_proxy_only",
00500 RECD_COUNTER, RECP_PERSISTENT, (int) http_throttled_proxy_only_stat, RecRawStatSyncCount);
00501
00502 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00503 "proxy.process.http.icp_suggested_lookups",
00504 RECD_COUNTER, RECP_PERSISTENT, (int) http_icp_suggested_lookups_stat, RecRawStatSyncCount);
00505
00506 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00507 "proxy.process.http.client_transaction_time",
00508 RECD_INT, RECP_PERSISTENT, (int) http_client_transaction_time_stat, RecRawStatSyncSum);
00509
00510 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00511 "proxy.process.http.client_write_time",
00512 RECD_INT, RECP_PERSISTENT, (int) http_client_write_time_stat, RecRawStatSyncSum);
00513
00514 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00515 "proxy.process.http.server_read_time",
00516 RECD_INT, RECP_PERSISTENT, (int) http_server_read_time_stat, RecRawStatSyncSum);
00517
00518 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00519 "proxy.process.http.icp_transaction_time",
00520 RECD_INT, RECP_PERSISTENT, (int) http_icp_transaction_time_stat, RecRawStatSyncSum);
00521
00522 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00523 "proxy.process.http.icp_raw_transaction_time",
00524 RECD_INT, RECP_PERSISTENT, (int) http_icp_raw_transaction_time_stat, RecRawStatSyncSum);
00525
00526 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00527 "proxy.process.http.parent_proxy_transaction_time",
00528 RECD_INT, RECP_PERSISTENT, (int) http_parent_proxy_transaction_time_stat, RecRawStatSyncSum);
00529
00530 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00531 "proxy.process.http.parent_proxy_raw_transaction_time",
00532 RECD_INT, RECP_PERSISTENT, (int) http_parent_proxy_raw_transaction_time_stat, RecRawStatSyncSum);
00533
00534 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00535 "proxy.process.http.server_transaction_time",
00536 RECD_INT, RECP_PERSISTENT, (int) http_server_transaction_time_stat, RecRawStatSyncSum);
00537
00538 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00539 "proxy.process.http.server_raw_transaction_time",
00540 RECD_INT, RECP_PERSISTENT, (int) http_server_raw_transaction_time_stat, RecRawStatSyncSum);
00541
00542 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00543 "proxy.process.http.user_agent_request_header_total_size",
00544 RECD_INT, RECP_PERSISTENT, (int) http_user_agent_request_header_total_size_stat, RecRawStatSyncSum);
00545
00546 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00547 "proxy.process.http.user_agent_response_header_total_size",
00548 RECD_INT, RECP_PERSISTENT, (int) http_user_agent_response_header_total_size_stat, RecRawStatSyncSum);
00549
00550 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00551 "proxy.process.http.user_agent_request_document_total_size",
00552 RECD_INT, RECP_PERSISTENT, (int) http_user_agent_request_document_total_size_stat, RecRawStatSyncSum);
00553
00554 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00555 "proxy.process.http.user_agent_response_document_total_size",
00556 RECD_INT, RECP_PERSISTENT, (int) http_user_agent_response_document_total_size_stat, RecRawStatSyncSum);
00557
00558 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00559 "proxy.process.http.origin_server_request_header_total_size",
00560 RECD_INT, RECP_PERSISTENT, (int) http_origin_server_request_header_total_size_stat, RecRawStatSyncSum);
00561
00562 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00563 "proxy.process.http.origin_server_response_header_total_size",
00564 RECD_INT, RECP_PERSISTENT, (int) http_origin_server_response_header_total_size_stat, RecRawStatSyncSum);
00565
00566 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00567 "proxy.process.http.origin_server_request_document_total_size",
00568 RECD_INT, RECP_PERSISTENT, (int) http_origin_server_request_document_total_size_stat, RecRawStatSyncSum);
00569
00570 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00571 "proxy.process.http.origin_server_response_document_total_size",
00572 RECD_INT, RECP_PERSISTENT,
00573 (int) http_origin_server_response_document_total_size_stat, RecRawStatSyncSum);
00574
00575 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00576 "proxy.process.http.parent_proxy_request_total_bytes",
00577 RECD_INT, RECP_PERSISTENT, (int) http_parent_proxy_request_total_bytes_stat, RecRawStatSyncSum);
00578
00579 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00580 "proxy.process.http.parent_proxy_response_total_bytes",
00581 RECD_INT, RECP_PERSISTENT, (int) http_parent_proxy_response_total_bytes_stat, RecRawStatSyncSum);
00582
00583 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00584 "proxy.process.http.pushed_response_header_total_size",
00585 RECD_INT, RECP_PERSISTENT, (int) http_pushed_response_header_total_size_stat, RecRawStatSyncSum);
00586
00587 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00588 "proxy.process.http.pushed_document_total_size",
00589 RECD_INT, RECP_PERSISTENT, (int) http_pushed_document_total_size_stat, RecRawStatSyncSum);
00590
00591 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00592 "proxy.process.http.response_document_size_100",
00593 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_document_size_100_stat, RecRawStatSyncCount);
00594
00595 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00596 "proxy.process.http.response_document_size_1K",
00597 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_document_size_1K_stat, RecRawStatSyncCount);
00598
00599 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00600 "proxy.process.http.response_document_size_3K",
00601 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_document_size_3K_stat, RecRawStatSyncCount);
00602
00603 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00604 "proxy.process.http.response_document_size_5K",
00605 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_document_size_5K_stat, RecRawStatSyncCount);
00606
00607 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00608 "proxy.process.http.response_document_size_10K",
00609 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_document_size_10K_stat, RecRawStatSyncCount);
00610
00611 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00612 "proxy.process.http.response_document_size_1M",
00613 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_document_size_1M_stat, RecRawStatSyncCount);
00614
00615 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00616 "proxy.process.http.response_document_size_inf",
00617 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_document_size_inf_stat, RecRawStatSyncCount);
00618
00619 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00620 "proxy.process.http.request_document_size_100",
00621 RECD_COUNTER, RECP_PERSISTENT, (int) http_request_document_size_100_stat, RecRawStatSyncCount);
00622
00623 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00624 "proxy.process.http.request_document_size_1K",
00625 RECD_COUNTER, RECP_PERSISTENT, (int) http_request_document_size_1K_stat, RecRawStatSyncCount);
00626
00627 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00628 "proxy.process.http.request_document_size_3K",
00629 RECD_COUNTER, RECP_PERSISTENT, (int) http_request_document_size_3K_stat, RecRawStatSyncCount);
00630
00631 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00632 "proxy.process.http.request_document_size_5K",
00633 RECD_COUNTER, RECP_PERSISTENT, (int) http_request_document_size_5K_stat, RecRawStatSyncCount);
00634
00635 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00636 "proxy.process.http.request_document_size_10K",
00637 RECD_COUNTER, RECP_PERSISTENT, (int) http_request_document_size_10K_stat, RecRawStatSyncCount);
00638
00639 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00640 "proxy.process.http.request_document_size_1M",
00641 RECD_COUNTER, RECP_PERSISTENT, (int) http_request_document_size_1M_stat, RecRawStatSyncCount);
00642
00643 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00644 "proxy.process.http.request_document_size_inf",
00645 RECD_COUNTER, RECP_PERSISTENT, (int) http_request_document_size_inf_stat, RecRawStatSyncCount);
00646
00647 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00648 "proxy.process.http.user_agent_speed_bytes_per_sec_100",
00649 RECD_COUNTER, RECP_PERSISTENT, (int) http_user_agent_speed_bytes_per_sec_100_stat, RecRawStatSyncCount);
00650
00651 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00652 "proxy.process.http.user_agent_speed_bytes_per_sec_1K",
00653 RECD_COUNTER, RECP_PERSISTENT, (int) http_user_agent_speed_bytes_per_sec_1K_stat, RecRawStatSyncCount);
00654
00655 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00656 "proxy.process.http.user_agent_speed_bytes_per_sec_10K",
00657 RECD_COUNTER, RECP_PERSISTENT, (int) http_user_agent_speed_bytes_per_sec_10K_stat, RecRawStatSyncCount);
00658
00659 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00660 "proxy.process.http.user_agent_speed_bytes_per_sec_100K",
00661 RECD_COUNTER, RECP_PERSISTENT, (int) http_user_agent_speed_bytes_per_sec_100K_stat, RecRawStatSyncCount);
00662
00663 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00664 "proxy.process.http.user_agent_speed_bytes_per_sec_1M",
00665 RECD_COUNTER, RECP_PERSISTENT, (int) http_user_agent_speed_bytes_per_sec_1M_stat, RecRawStatSyncCount);
00666
00667 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00668 "proxy.process.http.user_agent_speed_bytes_per_sec_10M",
00669 RECD_COUNTER, RECP_PERSISTENT, (int) http_user_agent_speed_bytes_per_sec_10M_stat, RecRawStatSyncCount);
00670
00671 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00672 "proxy.process.http.user_agent_speed_bytes_per_sec_100M",
00673 RECD_COUNTER, RECP_PERSISTENT, (int) http_user_agent_speed_bytes_per_sec_100M_stat, RecRawStatSyncCount);
00674
00675 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00676 "proxy.process.http.origin_server_speed_bytes_per_sec_100",
00677 RECD_COUNTER, RECP_PERSISTENT,
00678 (int) http_origin_server_speed_bytes_per_sec_100_stat, RecRawStatSyncCount);
00679
00680 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00681 "proxy.process.http.origin_server_speed_bytes_per_sec_1K",
00682 RECD_COUNTER, RECP_PERSISTENT,
00683 (int) http_origin_server_speed_bytes_per_sec_1K_stat, RecRawStatSyncCount);
00684
00685 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00686 "proxy.process.http.origin_server_speed_bytes_per_sec_10K",
00687 RECD_COUNTER, RECP_PERSISTENT,
00688 (int) http_origin_server_speed_bytes_per_sec_10K_stat, RecRawStatSyncCount);
00689
00690 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00691 "proxy.process.http.origin_server_speed_bytes_per_sec_100K",
00692 RECD_COUNTER, RECP_PERSISTENT,
00693 (int) http_origin_server_speed_bytes_per_sec_100K_stat, RecRawStatSyncCount);
00694
00695 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00696 "proxy.process.http.origin_server_speed_bytes_per_sec_1M",
00697 RECD_COUNTER, RECP_PERSISTENT,
00698 (int) http_origin_server_speed_bytes_per_sec_1M_stat, RecRawStatSyncCount);
00699
00700 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00701 "proxy.process.http.origin_server_speed_bytes_per_sec_10M",
00702 RECD_COUNTER, RECP_PERSISTENT,
00703 (int) http_origin_server_speed_bytes_per_sec_10M_stat, RecRawStatSyncCount);
00704
00705 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00706 "proxy.process.http.origin_server_speed_bytes_per_sec_100M",
00707 RECD_COUNTER, RECP_PERSISTENT,
00708 (int) http_origin_server_speed_bytes_per_sec_100M_stat, RecRawStatSyncCount);
00709
00710 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00711 "proxy.process.http.total_transactions_time",
00712 RECD_INT, RECP_PERSISTENT, (int) http_total_transactions_time_stat, RecRawStatSyncSum);
00713
00714 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00715 "proxy.process.http.total_transactions_think_time",
00716 RECD_INT, RECP_PERSISTENT, (int) http_total_transactions_think_time_stat, RecRawStatSyncSum);
00717
00718 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00719 "proxy.process.http.cache_hit_fresh",
00720 RECD_COUNTER, RECP_PERSISTENT, (int) http_cache_hit_fresh_stat, RecRawStatSyncCount);
00721
00722 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00723 "proxy.process.http.cache_hit_mem_fresh",
00724 RECD_COUNTER, RECP_PERSISTENT, (int) http_cache_hit_mem_fresh_stat, RecRawStatSyncCount);
00725
00726 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00727 "proxy.process.http.cache_hit_revalidated",
00728 RECD_COUNTER, RECP_PERSISTENT, (int) http_cache_hit_reval_stat, RecRawStatSyncCount);
00729
00730 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00731 "proxy.process.http.cache_hit_ims",
00732 RECD_COUNTER, RECP_PERSISTENT, (int) http_cache_hit_ims_stat, RecRawStatSyncCount);
00733
00734 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00735 "proxy.process.http.cache_hit_stale_served",
00736 RECD_COUNTER, RECP_PERSISTENT, (int) http_cache_hit_stale_served_stat, RecRawStatSyncCount);
00737
00738 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00739 "proxy.process.http.cache_miss_cold",
00740 RECD_COUNTER, RECP_PERSISTENT, (int) http_cache_miss_cold_stat, RecRawStatSyncCount);
00741
00742 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00743 "proxy.process.http.cache_miss_changed",
00744 RECD_COUNTER, RECP_PERSISTENT, (int) http_cache_miss_changed_stat, RecRawStatSyncCount);
00745
00746 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00747 "proxy.process.http.cache_miss_client_no_cache",
00748 RECD_COUNTER, RECP_PERSISTENT, (int) http_cache_miss_client_no_cache_stat, RecRawStatSyncCount);
00749
00750 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00751 "proxy.process.http.cache_miss_client_not_cacheable",
00752 RECD_COUNTER, RECP_PERSISTENT, (int) http_cache_miss_uncacheable_stat, RecRawStatSyncCount);
00753
00754 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00755 "proxy.process.http.cache_miss_ims",
00756 RECD_COUNTER, RECP_PERSISTENT, (int) http_cache_miss_ims_stat, RecRawStatSyncCount);
00757
00758 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00759 "proxy.process.http.cache_read_error",
00760 RECD_COUNTER, RECP_PERSISTENT, (int) http_cache_read_error_stat, RecRawStatSyncCount);
00761
00762
00763
00764
00765
00766 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00767 "proxy.process.http.tcp_hit_count_stat",
00768 RECD_COUNTER, RECP_PERSISTENT, (int) http_tcp_hit_count_stat, RecRawStatSyncCount);
00769
00770 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00771 "proxy.process.http.tcp_hit_user_agent_bytes_stat",
00772 RECD_INT, RECP_PERSISTENT, (int) http_tcp_hit_user_agent_bytes_stat, RecRawStatSyncSum);
00773
00774 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00775 "proxy.process.http.tcp_hit_origin_server_bytes_stat",
00776 RECD_INT, RECP_PERSISTENT, (int) http_tcp_hit_origin_server_bytes_stat, RecRawStatSyncSum);
00777
00778 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00779 "proxy.process.http.tcp_miss_count_stat",
00780 RECD_COUNTER, RECP_PERSISTENT, (int) http_tcp_miss_count_stat, RecRawStatSyncCount);
00781
00782 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00783 "proxy.process.http.tcp_miss_user_agent_bytes_stat",
00784 RECD_INT, RECP_PERSISTENT, (int) http_tcp_miss_user_agent_bytes_stat, RecRawStatSyncSum);
00785
00786 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00787 "proxy.process.http.tcp_miss_origin_server_bytes_stat",
00788 RECD_INT, RECP_PERSISTENT, (int) http_tcp_miss_origin_server_bytes_stat, RecRawStatSyncSum);
00789
00790 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00791 "proxy.process.http.tcp_expired_miss_count_stat",
00792 RECD_COUNTER, RECP_PERSISTENT, (int) http_tcp_expired_miss_count_stat, RecRawStatSyncCount);
00793
00794 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00795 "proxy.process.http.tcp_expired_miss_user_agent_bytes_stat",
00796 RECD_INT, RECP_PERSISTENT, (int) http_tcp_expired_miss_user_agent_bytes_stat, RecRawStatSyncSum);
00797
00798 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00799 "proxy.process.http.tcp_expired_miss_origin_server_bytes_stat",
00800 RECD_INT, RECP_PERSISTENT, (int) http_tcp_expired_miss_origin_server_bytes_stat, RecRawStatSyncSum);
00801
00802 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00803 "proxy.process.http.tcp_refresh_hit_count_stat",
00804 RECD_COUNTER, RECP_PERSISTENT, (int) http_tcp_refresh_hit_count_stat, RecRawStatSyncCount);
00805
00806 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00807 "proxy.process.http.tcp_refresh_hit_user_agent_bytes_stat",
00808 RECD_INT, RECP_PERSISTENT, (int) http_tcp_refresh_hit_user_agent_bytes_stat, RecRawStatSyncSum);
00809
00810 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00811 "proxy.process.http.tcp_refresh_hit_origin_server_bytes_stat",
00812 RECD_INT, RECP_PERSISTENT, (int) http_tcp_refresh_hit_origin_server_bytes_stat, RecRawStatSyncSum);
00813
00814 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00815 "proxy.process.http.tcp_refresh_miss_count_stat",
00816 RECD_COUNTER, RECP_PERSISTENT, (int) http_tcp_refresh_miss_count_stat, RecRawStatSyncCount);
00817
00818 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00819 "proxy.process.http.tcp_refresh_miss_user_agent_bytes_stat",
00820 RECD_INT, RECP_PERSISTENT, (int) http_tcp_refresh_miss_user_agent_bytes_stat, RecRawStatSyncSum);
00821
00822 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00823 "proxy.process.http.tcp_refresh_miss_origin_server_bytes_stat",
00824 RECD_INT, RECP_PERSISTENT, (int) http_tcp_refresh_miss_origin_server_bytes_stat, RecRawStatSyncSum);
00825
00826 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00827 "proxy.process.http.tcp_client_refresh_count_stat",
00828 RECD_COUNTER, RECP_PERSISTENT, (int) http_tcp_client_refresh_count_stat, RecRawStatSyncCount);
00829
00830 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00831 "proxy.process.http.tcp_client_refresh_user_agent_bytes_stat",
00832 RECD_INT, RECP_PERSISTENT, (int) http_tcp_client_refresh_user_agent_bytes_stat, RecRawStatSyncSum);
00833
00834 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00835 "proxy.process.http.tcp_client_refresh_origin_server_bytes_stat",
00836 RECD_INT, RECP_PERSISTENT, (int) http_tcp_client_refresh_origin_server_bytes_stat, RecRawStatSyncSum);
00837
00838 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00839 "proxy.process.http.tcp_ims_hit_count_stat",
00840 RECD_COUNTER, RECP_PERSISTENT, (int) http_tcp_ims_hit_count_stat, RecRawStatSyncCount);
00841
00842 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00843 "proxy.process.http.tcp_ims_hit_user_agent_bytes_stat",
00844 RECD_INT, RECP_PERSISTENT, (int) http_tcp_ims_hit_user_agent_bytes_stat, RecRawStatSyncSum);
00845
00846 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00847 "proxy.process.http.tcp_ims_hit_origin_server_bytes_stat",
00848 RECD_INT, RECP_PERSISTENT, (int) http_tcp_ims_hit_origin_server_bytes_stat, RecRawStatSyncSum);
00849
00850 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00851 "proxy.process.http.tcp_ims_miss_count_stat",
00852 RECD_COUNTER, RECP_PERSISTENT, (int) http_tcp_ims_miss_count_stat, RecRawStatSyncCount);
00853
00854 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00855 "proxy.process.http.tcp_ims_miss_user_agent_bytes_stat",
00856 RECD_INT, RECP_PERSISTENT, (int) http_tcp_ims_miss_user_agent_bytes_stat, RecRawStatSyncSum);
00857
00858 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00859 "proxy.process.http.tcp_ims_miss_origin_server_bytes_stat",
00860 RECD_INT, RECP_PERSISTENT, (int) http_tcp_ims_miss_origin_server_bytes_stat, RecRawStatSyncSum);
00861
00862 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00863 "proxy.process.http.err_client_abort_count_stat",
00864 RECD_COUNTER, RECP_PERSISTENT, (int) http_err_client_abort_count_stat, RecRawStatSyncCount);
00865
00866 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00867 "proxy.process.http.err_client_abort_user_agent_bytes_stat",
00868 RECD_INT, RECP_PERSISTENT, (int) http_err_client_abort_user_agent_bytes_stat, RecRawStatSyncSum);
00869
00870 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00871 "proxy.process.http.err_client_abort_origin_server_bytes_stat",
00872 RECD_INT, RECP_PERSISTENT, (int) http_err_client_abort_origin_server_bytes_stat, RecRawStatSyncSum);
00873
00874 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00875 "proxy.process.http.err_connect_fail_count_stat",
00876 RECD_COUNTER, RECP_PERSISTENT, (int) http_err_connect_fail_count_stat, RecRawStatSyncCount);
00877
00878 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00879 "proxy.process.http.err_connect_fail_user_agent_bytes_stat",
00880 RECD_INT, RECP_PERSISTENT, (int) http_err_connect_fail_user_agent_bytes_stat, RecRawStatSyncSum);
00881
00882 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00883 "proxy.process.http.err_connect_fail_origin_server_bytes_stat",
00884 RECD_INT, RECP_PERSISTENT, (int) http_err_connect_fail_origin_server_bytes_stat, RecRawStatSyncSum);
00885
00886 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00887 "proxy.process.http.misc_count_stat",
00888 RECD_COUNTER, RECP_PERSISTENT, (int) http_misc_count_stat, RecRawStatSyncCount);
00889
00890 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00891 "proxy.process.http.misc_user_agent_bytes_stat",
00892 RECD_INT, RECP_PERSISTENT, (int) http_misc_user_agent_bytes_stat, RecRawStatSyncSum);
00893
00894 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00895 "proxy.process.http.background_fill_bytes_aborted_stat",
00896 RECD_INT, RECP_PERSISTENT, (int) http_background_fill_bytes_aborted_stat, RecRawStatSyncSum);
00897
00898 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00899 "proxy.process.http.background_fill_bytes_completed_stat",
00900 RECD_INT, RECP_PERSISTENT, (int) http_background_fill_bytes_completed_stat, RecRawStatSyncSum);
00901
00902 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00903 "proxy.process.http.cache_write_errors",
00904 RECD_INT, RECP_PERSISTENT, (int) http_cache_write_errors, RecRawStatSyncSum);
00905
00906 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00907 "proxy.process.http.cache_read_errors",
00908 RECD_INT, RECP_PERSISTENT, (int) http_cache_read_errors, RecRawStatSyncSum);
00909
00910
00911
00912
00913
00914 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00915 "proxy.process.http.100_responses",
00916 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_100_count_stat, RecRawStatSyncCount);
00917
00918 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00919 "proxy.process.http.101_responses",
00920 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_101_count_stat, RecRawStatSyncCount);
00921
00922 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00923 "proxy.process.http.1xx_responses",
00924 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_1xx_count_stat, RecRawStatSyncCount);
00925
00926 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00927 "proxy.process.http.200_responses",
00928 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_200_count_stat, RecRawStatSyncCount);
00929
00930 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00931 "proxy.process.http.201_responses",
00932 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_201_count_stat, RecRawStatSyncCount);
00933
00934 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00935 "proxy.process.http.202_responses",
00936 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_202_count_stat, RecRawStatSyncCount);
00937
00938 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00939 "proxy.process.http.203_responses",
00940 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_203_count_stat, RecRawStatSyncCount);
00941
00942 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00943 "proxy.process.http.204_responses",
00944 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_204_count_stat, RecRawStatSyncCount);
00945
00946 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00947 "proxy.process.http.205_responses",
00948 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_205_count_stat, RecRawStatSyncCount);
00949
00950 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00951 "proxy.process.http.206_responses",
00952 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_206_count_stat, RecRawStatSyncCount);
00953
00954 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00955 "proxy.process.http.2xx_responses",
00956 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_2xx_count_stat, RecRawStatSyncCount);
00957
00958 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00959 "proxy.process.http.300_responses",
00960 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_300_count_stat, RecRawStatSyncCount);
00961
00962 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00963 "proxy.process.http.301_responses",
00964 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_301_count_stat, RecRawStatSyncCount);
00965
00966 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00967 "proxy.process.http.302_responses",
00968 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_302_count_stat, RecRawStatSyncCount);
00969
00970 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00971 "proxy.process.http.303_responses",
00972 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_303_count_stat, RecRawStatSyncCount);
00973
00974 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00975 "proxy.process.http.304_responses",
00976 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_304_count_stat, RecRawStatSyncCount);
00977
00978 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00979 "proxy.process.http.305_responses",
00980 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_305_count_stat, RecRawStatSyncCount);
00981
00982 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00983 "proxy.process.http.307_responses",
00984 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_307_count_stat, RecRawStatSyncCount);
00985
00986 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00987 "proxy.process.http.3xx_responses",
00988 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_3xx_count_stat, RecRawStatSyncCount);
00989
00990 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00991 "proxy.process.http.400_responses",
00992 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_400_count_stat, RecRawStatSyncCount);
00993
00994 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00995 "proxy.process.http.401_responses",
00996 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_401_count_stat, RecRawStatSyncCount);
00997
00998 RecRegisterRawStat(http_rsb, RECT_PROCESS,
00999 "proxy.process.http.402_responses",
01000 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_402_count_stat, RecRawStatSyncCount);
01001
01002 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01003 "proxy.process.http.403_responses",
01004 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_403_count_stat, RecRawStatSyncCount);
01005
01006 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01007 "proxy.process.http.404_responses",
01008 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_404_count_stat, RecRawStatSyncCount);
01009
01010 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01011 "proxy.process.http.405_responses",
01012 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_405_count_stat, RecRawStatSyncCount);
01013
01014 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01015 "proxy.process.http.406_responses",
01016 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_406_count_stat, RecRawStatSyncCount);
01017
01018 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01019 "proxy.process.http.407_responses",
01020 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_407_count_stat, RecRawStatSyncCount);
01021
01022 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01023 "proxy.process.http.408_responses",
01024 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_408_count_stat, RecRawStatSyncCount);
01025
01026 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01027 "proxy.process.http.409_responses",
01028 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_409_count_stat, RecRawStatSyncCount);
01029
01030 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01031 "proxy.process.http.410_responses",
01032 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_410_count_stat, RecRawStatSyncCount);
01033
01034 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01035 "proxy.process.http.411_responses",
01036 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_411_count_stat, RecRawStatSyncCount);
01037
01038 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01039 "proxy.process.http.412_responses",
01040 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_412_count_stat, RecRawStatSyncCount);
01041
01042 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01043 "proxy.process.http.413_responses",
01044 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_413_count_stat, RecRawStatSyncCount);
01045
01046 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01047 "proxy.process.http.414_responses",
01048 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_414_count_stat, RecRawStatSyncCount);
01049
01050 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01051 "proxy.process.http.415_responses",
01052 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_415_count_stat, RecRawStatSyncCount);
01053
01054 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01055 "proxy.process.http.416_responses",
01056 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_416_count_stat, RecRawStatSyncCount);
01057
01058 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01059 "proxy.process.http.4xx_responses",
01060 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_4xx_count_stat, RecRawStatSyncCount);
01061
01062 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01063 "proxy.process.http.500_responses",
01064 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_500_count_stat, RecRawStatSyncCount);
01065
01066 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01067 "proxy.process.http.501_responses",
01068 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_501_count_stat, RecRawStatSyncCount);
01069
01070 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01071 "proxy.process.http.502_responses",
01072 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_502_count_stat, RecRawStatSyncCount);
01073
01074 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01075 "proxy.process.http.503_responses",
01076 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_503_count_stat, RecRawStatSyncCount);
01077
01078 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01079 "proxy.process.http.504_responses",
01080 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_504_count_stat, RecRawStatSyncCount);
01081
01082 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01083 "proxy.process.http.505_responses",
01084 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_505_count_stat, RecRawStatSyncCount);
01085
01086 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01087 "proxy.process.http.5xx_responses",
01088 RECD_COUNTER, RECP_PERSISTENT, (int) http_response_status_5xx_count_stat, RecRawStatSyncCount);
01089
01090
01091
01092
01093
01094
01095
01096 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01097 "proxy.process.http.transaction_counts.hit_fresh",
01098 RECD_COUNTER, RECP_PERSISTENT, (int) http_ua_msecs_counts_hit_fresh_stat, RecRawStatSyncCount);
01099 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01100 "proxy.process.http.transaction_totaltime.hit_fresh",
01101 RECD_FLOAT, RECP_PERSISTENT,
01102 (int) http_ua_msecs_counts_hit_fresh_stat, RecRawStatSyncIntMsecsToFloatSeconds);
01103
01104 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01105 "proxy.process.http.transaction_counts.hit_fresh.process",
01106 RECD_COUNTER, RECP_PERSISTENT, (int) http_ua_msecs_counts_hit_fresh_process_stat, RecRawStatSyncCount);
01107 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01108 "proxy.process.http.transaction_totaltime.hit_fresh.process",
01109 RECD_FLOAT, RECP_PERSISTENT,
01110 (int) http_ua_msecs_counts_hit_fresh_process_stat, RecRawStatSyncIntMsecsToFloatSeconds);
01111
01112 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01113 "proxy.process.http.transaction_counts.hit_revalidated",
01114 RECD_COUNTER, RECP_PERSISTENT, (int) http_ua_msecs_counts_hit_reval_stat, RecRawStatSyncCount);
01115 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01116 "proxy.process.http.transaction_totaltime.hit_revalidated",
01117 RECD_FLOAT, RECP_PERSISTENT,
01118 (int) http_ua_msecs_counts_hit_reval_stat, RecRawStatSyncIntMsecsToFloatSeconds);
01119
01120 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01121 "proxy.process.http.transaction_counts.miss_cold",
01122 RECD_COUNTER, RECP_PERSISTENT, (int) http_ua_msecs_counts_miss_cold_stat, RecRawStatSyncCount);
01123 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01124 "proxy.process.http.transaction_totaltime.miss_cold",
01125 RECD_FLOAT, RECP_PERSISTENT,
01126 (int) http_ua_msecs_counts_miss_cold_stat, RecRawStatSyncIntMsecsToFloatSeconds);
01127
01128 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01129 "proxy.process.http.transaction_counts.miss_not_cacheable",
01130 RECD_COUNTER, RECP_PERSISTENT, (int) http_ua_msecs_counts_miss_uncacheable_stat, RecRawStatSyncCount);
01131 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01132 "proxy.process.http.transaction_totaltime.miss_not_cacheable",
01133 RECD_FLOAT, RECP_PERSISTENT,
01134 (int) http_ua_msecs_counts_miss_uncacheable_stat, RecRawStatSyncIntMsecsToFloatSeconds);
01135
01136 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01137 "proxy.process.http.transaction_counts.miss_changed",
01138 RECD_COUNTER, RECP_PERSISTENT, (int) http_ua_msecs_counts_miss_changed_stat, RecRawStatSyncCount);
01139 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01140 "proxy.process.http.transaction_totaltime.miss_changed",
01141 RECD_FLOAT, RECP_PERSISTENT,
01142 (int) http_ua_msecs_counts_miss_changed_stat, RecRawStatSyncIntMsecsToFloatSeconds);
01143
01144
01145 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01146 "proxy.process.http.transaction_counts.miss_client_no_cache",
01147 RECD_COUNTER, RECP_PERSISTENT,
01148 (int) http_ua_msecs_counts_miss_client_no_cache_stat, RecRawStatSyncCount);
01149 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01150 "proxy.process.http.transaction_totaltime.miss_client_no_cache",
01151 RECD_FLOAT, RECP_PERSISTENT,
01152 (int) http_ua_msecs_counts_miss_client_no_cache_stat, RecRawStatSyncIntMsecsToFloatSeconds);
01153
01154 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01155 "proxy.process.http.transaction_counts.errors.aborts",
01156 RECD_COUNTER, RECP_PERSISTENT, (int) http_ua_msecs_counts_errors_aborts_stat, RecRawStatSyncCount);
01157 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01158 "proxy.process.http.transaction_totaltime.errors.aborts",
01159 RECD_FLOAT, RECP_PERSISTENT,
01160 (int) http_ua_msecs_counts_errors_aborts_stat, RecRawStatSyncIntMsecsToFloatSeconds);
01161
01162 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01163 "proxy.process.http.transaction_counts.errors.possible_aborts",
01164 RECD_COUNTER, RECP_PERSISTENT,
01165 (int) http_ua_msecs_counts_errors_possible_aborts_stat, RecRawStatSyncCount);
01166 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01167 "proxy.process.http.transaction_totaltime.errors.possible_aborts",
01168 RECD_FLOAT, RECP_PERSISTENT,
01169 (int) http_ua_msecs_counts_errors_possible_aborts_stat, RecRawStatSyncIntMsecsToFloatSeconds);
01170
01171 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01172 "proxy.process.http.transaction_counts.errors.connect_failed",
01173 RECD_COUNTER, RECP_PERSISTENT,
01174 (int) http_ua_msecs_counts_errors_connect_failed_stat, RecRawStatSyncCount);
01175 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01176 "proxy.process.http.transaction_totaltime.errors.connect_failed",
01177 RECD_FLOAT, RECP_PERSISTENT,
01178 (int) http_ua_msecs_counts_errors_connect_failed_stat, RecRawStatSyncIntMsecsToFloatSeconds);
01179
01180 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01181 "proxy.process.http.transaction_counts.errors.other",
01182 RECD_COUNTER, RECP_PERSISTENT, (int) http_ua_msecs_counts_errors_other_stat, RecRawStatSyncCount);
01183 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01184 "proxy.process.http.transaction_totaltime.errors.other",
01185 RECD_FLOAT, RECP_PERSISTENT,
01186 (int) http_ua_msecs_counts_errors_other_stat, RecRawStatSyncIntMsecsToFloatSeconds);
01187
01188 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01189 "proxy.process.http.transaction_counts.other.unclassified",
01190 RECD_COUNTER, RECP_PERSISTENT, (int) http_ua_msecs_counts_other_unclassified_stat, RecRawStatSyncCount);
01191 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01192 "proxy.process.http.transaction_totaltime.other.unclassified",
01193 RECD_FLOAT, RECP_PERSISTENT,
01194 (int) http_ua_msecs_counts_other_unclassified_stat, RecRawStatSyncIntMsecsToFloatSeconds);
01195
01196 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01197 "proxy.process.http.total_x_redirect_count",
01198 RECD_COUNTER, RECP_PERSISTENT,
01199 (int) http_total_x_redirect_stat, RecRawStatSyncCount);
01200
01201 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01202 "proxy.process.https.incoming_requests",
01203 RECD_COUNTER, RECP_PERSISTENT, (int) https_incoming_requests_stat, RecRawStatSyncCount);
01204 RecRegisterRawStat(http_rsb, RECT_PROCESS,
01205 "proxy.process.https.total_client_connections",
01206 RECD_COUNTER, RECP_PERSISTENT, (int) https_total_client_connections_stat, RecRawStatSyncCount);
01207 }
01208
01209
01210
01211
01212
01213
01214
01215 void
01216 HttpConfig::startup()
01217 {
01218
01219 http_rsb = RecAllocateRawStatBlock((int) http_stat_count);
01220 register_configs();
01221 register_stat_callbacks();
01222
01223 HttpConfigParams &c = m_master;
01224
01225 http_config_cont = new HttpConfigCont;
01226
01227 HttpEstablishStaticConfigStringAlloc(c.proxy_hostname, "proxy.config.proxy_name");
01228 c.proxy_hostname_len = -1;
01229
01230 if (c.proxy_hostname == NULL) {
01231 c.proxy_hostname = (char *)ats_malloc(sizeof(char));
01232 c.proxy_hostname[0] = '\0';
01233 }
01234
01235 RecHttpLoadIp("proxy.local.incoming_ip_to_bind", c.inbound_ip4, c.inbound_ip6);
01236 RecHttpLoadIp("proxy.local.outgoing_ip_to_bind", c.outbound_ip4, c.outbound_ip6);
01237
01238 #if TS_USE_RECLAIMABLE_FREELIST
01239 HttpEstablishStaticConfigLongLong(cfg_debug_filter, "proxy.config.allocator.debug_filter");
01240 HttpEstablishStaticConfigLongLong(cfg_enable_reclaim, "proxy.config.allocator.enable_reclaim");
01241 HttpEstablishStaticConfigLongLong(cfg_max_overage, "proxy.config.allocator.max_overage");
01242 HttpEstablishStaticConfigFloat(cfg_reclaim_factor, "proxy.config.allocator.reclaim_factor");
01243 #endif
01244
01245 HttpEstablishStaticConfigLongLong(c.server_max_connections, "proxy.config.http.server_max_connections");
01246 HttpEstablishStaticConfigLongLong(c.oride.server_tcp_init_cwnd, "proxy.config.http.server_tcp_init_cwnd");
01247 HttpEstablishStaticConfigLongLong(c.oride.origin_max_connections, "proxy.config.http.origin_max_connections");
01248 HttpEstablishStaticConfigLongLong(c.origin_min_keep_alive_connections, "proxy.config.http.origin_min_keep_alive_connections");
01249 HttpEstablishStaticConfigLongLong(c.attach_server_session_to_client, "proxy.config.http.attach_server_session_to_client");
01250
01251 HttpEstablishStaticConfigByte(c.parent_proxy_routing_enable, "proxy.config.http.parent_proxy_routing_enable");
01252
01253
01254 HttpEstablishStaticConfigByte(c.disable_ssl_parenting, "proxy.local.http.parent_proxy.disable_connect_tunneling");
01255 HttpEstablishStaticConfigByte(c.no_dns_forward_to_parent, "proxy.config.http.no_dns_just_forward_to_parent");
01256 HttpEstablishStaticConfigByte(c.uncacheable_requests_bypass_parent, "proxy.config.http.uncacheable_requests_bypass_parent");
01257 HttpEstablishStaticConfigByte(c.oride.doc_in_cache_skip_dns, "proxy.config.http.doc_in_cache_skip_dns");
01258
01259 HttpEstablishStaticConfigByte(c.no_origin_server_dns, "proxy.config.http.no_origin_server_dns");
01260 HttpEstablishStaticConfigByte(c.use_client_target_addr, "proxy.config.http.use_client_target_addr");
01261 HttpEstablishStaticConfigByte(c.use_client_source_port, "proxy.config.http.use_client_source_port");
01262 HttpEstablishStaticConfigByte(c.oride.maintain_pristine_host_hdr, "proxy.config.url_remap.pristine_host_hdr");
01263
01264 HttpEstablishStaticConfigByte(c.enable_url_expandomatic, "proxy.config.http.enable_url_expandomatic");
01265
01266 HttpEstablishStaticConfigByte(c.oride.insert_request_via_string, "proxy.config.http.insert_request_via_str");
01267 HttpEstablishStaticConfigByte(c.oride.insert_response_via_string, "proxy.config.http.insert_response_via_str");
01268 HttpEstablishStaticConfigLongLong(c.oride.proxy_response_hsts_max_age, "proxy.config.ssl.hsts_max_age");
01269 HttpEstablishStaticConfigByte(c.oride.proxy_response_hsts_include_subdomains, "proxy.config.ssl.hsts_include_subdomains");
01270
01271 HttpEstablishStaticConfigStringAlloc(c.proxy_request_via_string, "proxy.config.http.request_via_str");
01272 c.proxy_request_via_string_len = -1;
01273 HttpEstablishStaticConfigStringAlloc(c.proxy_response_via_string, "proxy.config.http.response_via_str");
01274 c.proxy_response_via_string_len = -1;
01275
01276 HttpEstablishStaticConfigStringAlloc(c.url_expansions_string, "proxy.config.dns.url_expansions");
01277 HttpEstablishStaticConfigByte(c.oride.keep_alive_enabled_in, "proxy.config.http.keep_alive_enabled_in");
01278 HttpEstablishStaticConfigByte(c.oride.keep_alive_enabled_out, "proxy.config.http.keep_alive_enabled_out");
01279 HttpEstablishStaticConfigByte(c.oride.chunking_enabled, "proxy.config.http.chunking_enabled");
01280 HttpEstablishStaticConfigLongLong(c.oride.http_chunking_size, "proxy.config.http.chunking.size");
01281 HttpEstablishStaticConfigByte(c.oride.flow_control_enabled, "proxy.config.http.flow_control.enabled");
01282 HttpEstablishStaticConfigLongLong(c.oride.flow_high_water_mark, "proxy.config.http.flow_control.high_water");
01283 HttpEstablishStaticConfigLongLong(c.oride.flow_low_water_mark, "proxy.config.http.flow_control.low_water");
01284 HttpEstablishStaticConfigByte(c.oride.post_check_content_length_enabled, "proxy.config.http.post.check.content_length.enabled");
01285
01286
01287
01288 RecRegisterConfigUpdateCb("proxy.config.http.share_server_sessions", &http_server_session_sharing_cb, &c);
01289 http_config_share_server_sessions_read_bc(&c);
01290
01291
01292
01293 RecRegisterConfigUpdateCb("proxy.config.http.server_session_sharing.pool", &http_server_session_sharing_cb, &c);
01294 http_config_enum_read("proxy.config.http.server_session_sharing.pool", SessionSharingPoolStrings, ARRAY_SIZE(SessionSharingPoolStrings), c.oride.server_session_sharing_pool);
01295 RecRegisterConfigUpdateCb("proxy.config.http.server_session_sharing.match", &http_server_session_sharing_cb, &c);
01296 http_config_enum_read("proxy.config.http.server_session_sharing.match", SessionSharingMatchStrings, ARRAY_SIZE(SessionSharingMatchStrings), c.oride.server_session_sharing_match);
01297
01298 HttpEstablishStaticConfigByte(c.oride.keep_alive_post_out, "proxy.config.http.keep_alive_post_out");
01299
01300 HttpEstablishStaticConfigLongLong(c.oride.keep_alive_no_activity_timeout_in,
01301 "proxy.config.http.keep_alive_no_activity_timeout_in");
01302 HttpEstablishStaticConfigLongLong(c.oride.keep_alive_no_activity_timeout_out,
01303 "proxy.config.http.keep_alive_no_activity_timeout_out");
01304 HttpEstablishStaticConfigLongLong(c.oride.transaction_no_activity_timeout_in,
01305 "proxy.config.http.transaction_no_activity_timeout_in");
01306 HttpEstablishStaticConfigLongLong(c.oride.transaction_no_activity_timeout_out,
01307 "proxy.config.http.transaction_no_activity_timeout_out");
01308 HttpEstablishStaticConfigLongLong(c.transaction_active_timeout_in, "proxy.config.http.transaction_active_timeout_in");
01309 HttpEstablishStaticConfigLongLong(c.oride.transaction_active_timeout_out, "proxy.config.http.transaction_active_timeout_out");
01310 HttpEstablishStaticConfigLongLong(c.accept_no_activity_timeout, "proxy.config.http.accept_no_activity_timeout");
01311
01312 HttpEstablishStaticConfigLongLong(c.oride.background_fill_active_timeout, "proxy.config.http.background_fill_active_timeout");
01313 HttpEstablishStaticConfigFloat(c.oride.background_fill_threshold, "proxy.config.http.background_fill_completed_threshold");
01314
01315 HttpEstablishStaticConfigLongLong(c.oride.connect_attempts_max_retries, "proxy.config.http.connect_attempts_max_retries");
01316 HttpEstablishStaticConfigLongLong(c.oride.connect_attempts_max_retries_dead_server,
01317 "proxy.config.http.connect_attempts_max_retries_dead_server");
01318
01319 HttpEstablishStaticConfigLongLong(c.oride.connect_attempts_rr_retries, "proxy.config.http.connect_attempts_rr_retries");
01320 HttpEstablishStaticConfigLongLong(c.oride.connect_attempts_timeout, "proxy.config.http.connect_attempts_timeout");
01321 HttpEstablishStaticConfigLongLong(c.oride.post_connect_attempts_timeout, "proxy.config.http.post_connect_attempts_timeout");
01322 HttpEstablishStaticConfigLongLong(c.parent_connect_attempts, "proxy.config.http.parent_proxy.total_connect_attempts");
01323 HttpEstablishStaticConfigLongLong(c.per_parent_connect_attempts, "proxy.config.http.parent_proxy.per_parent_connect_attempts");
01324 HttpEstablishStaticConfigLongLong(c.parent_connect_timeout, "proxy.config.http.parent_proxy.connect_attempts_timeout");
01325
01326 HttpEstablishStaticConfigLongLong(c.oride.sock_recv_buffer_size_out, "proxy.config.net.sock_recv_buffer_size_out");
01327 HttpEstablishStaticConfigLongLong(c.oride.sock_send_buffer_size_out, "proxy.config.net.sock_send_buffer_size_out");
01328 HttpEstablishStaticConfigLongLong(c.oride.sock_option_flag_out, "proxy.config.net.sock_option_flag_out");
01329 HttpEstablishStaticConfigLongLong(c.oride.sock_packet_mark_out, "proxy.config.net.sock_packet_mark_out");
01330 HttpEstablishStaticConfigLongLong(c.oride.sock_packet_tos_out, "proxy.config.net.sock_packet_tos_out");
01331
01332
01333 HttpEstablishStaticConfigByte(c.oride.fwd_proxy_auth_to_parent, "proxy.config.http.forward.proxy_auth_to_parent");
01334
01335 HttpEstablishStaticConfigByte(c.oride.anonymize_remove_from, "proxy.config.http.anonymize_remove_from");
01336 HttpEstablishStaticConfigByte(c.oride.anonymize_remove_referer, "proxy.config.http.anonymize_remove_referer");
01337 HttpEstablishStaticConfigByte(c.oride.anonymize_remove_user_agent, "proxy.config.http.anonymize_remove_user_agent");
01338 HttpEstablishStaticConfigByte(c.oride.anonymize_remove_cookie, "proxy.config.http.anonymize_remove_cookie");
01339 HttpEstablishStaticConfigByte(c.oride.anonymize_remove_client_ip, "proxy.config.http.anonymize_remove_client_ip");
01340 HttpEstablishStaticConfigByte(c.oride.anonymize_insert_client_ip, "proxy.config.http.anonymize_insert_client_ip");
01341 HttpEstablishStaticConfigStringAlloc(c.anonymize_other_header_list, "proxy.config.http.anonymize_other_header_list");
01342
01343 HttpEstablishStaticConfigStringAlloc(c.oride.global_user_agent_header, "proxy.config.http.global_user_agent_header");
01344 c.oride.global_user_agent_header_size = c.oride.global_user_agent_header ?
01345 strlen(c.oride.global_user_agent_header) : 0;
01346
01347 HttpEstablishStaticConfigByte(c.oride.proxy_response_server_enabled, "proxy.config.http.response_server_enabled");
01348 HttpEstablishStaticConfigStringAlloc(c.oride.proxy_response_server_string, "proxy.config.http.response_server_str");
01349 c.oride.proxy_response_server_string_len = c.oride.proxy_response_server_string ?
01350 strlen(c.oride.proxy_response_server_string) : 0;
01351
01352 HttpEstablishStaticConfigByte(c.oride.insert_squid_x_forwarded_for, "proxy.config.http.insert_squid_x_forwarded_for");
01353
01354
01355 HttpEstablishStaticConfigByte(c.oride.insert_age_in_response, "proxy.config.http.insert_age_in_response");
01356 HttpEstablishStaticConfigByte(c.enable_http_stats, "proxy.config.http.enable_http_stats");
01357 HttpEstablishStaticConfigByte(c.oride.normalize_ae_gzip, "proxy.config.http.normalize_ae_gzip");
01358
01359 HttpEstablishStaticConfigByte(c.icp_enabled, "proxy.config.icp.enabled");
01360 HttpEstablishStaticConfigByte(c.stale_icp_enabled, "proxy.config.icp.stale_icp_enabled");
01361
01362 HttpEstablishStaticConfigLongLong(c.oride.cache_heuristic_min_lifetime, "proxy.config.http.cache.heuristic_min_lifetime");
01363 HttpEstablishStaticConfigLongLong(c.oride.cache_heuristic_max_lifetime, "proxy.config.http.cache.heuristic_max_lifetime");
01364 HttpEstablishStaticConfigFloat(c.oride.cache_heuristic_lm_factor, "proxy.config.http.cache.heuristic_lm_factor");
01365
01366 HttpEstablishStaticConfigLongLong(c.oride.cache_guaranteed_min_lifetime, "proxy.config.http.cache.guaranteed_min_lifetime");
01367 HttpEstablishStaticConfigLongLong(c.oride.cache_guaranteed_max_lifetime, "proxy.config.http.cache.guaranteed_max_lifetime");
01368
01369 HttpEstablishStaticConfigLongLong(c.oride.cache_max_stale_age, "proxy.config.http.cache.max_stale_age");
01370
01371 HttpEstablishStaticConfigLongLong(c.oride.freshness_fuzz_time, "proxy.config.http.cache.fuzz.time");
01372 HttpEstablishStaticConfigLongLong(c.oride.freshness_fuzz_min_time, "proxy.config.http.cache.fuzz.min_time");
01373 HttpEstablishStaticConfigFloat(c.oride.freshness_fuzz_prob, "proxy.config.http.cache.fuzz.probability");
01374
01375 HttpEstablishStaticConfigStringAlloc(c.cache_vary_default_text, "proxy.config.http.cache.vary_default_text");
01376 HttpEstablishStaticConfigStringAlloc(c.cache_vary_default_images, "proxy.config.http.cache.vary_default_images");
01377 HttpEstablishStaticConfigStringAlloc(c.cache_vary_default_other, "proxy.config.http.cache.vary_default_other");
01378
01379
01380 HttpEstablishStaticConfigLongLong(c.oride.max_cache_open_read_retries, "proxy.config.http.cache.max_open_read_retries");
01381 HttpEstablishStaticConfigLongLong(c.oride.cache_open_read_retry_time, "proxy.config.http.cache.open_read_retry_time");
01382
01383
01384 HttpEstablishStaticConfigLongLong(c.max_cache_open_write_retries, "proxy.config.http.cache.max_open_write_retries");
01385
01386 HttpEstablishStaticConfigByte(c.oride.cache_http, "proxy.config.http.cache.http");
01387 HttpEstablishStaticConfigByte(c.oride.cache_cluster_cache_local, "proxy.config.http.cache.cluster_cache_local");
01388 HttpEstablishStaticConfigByte(c.oride.cache_ignore_client_no_cache, "proxy.config.http.cache.ignore_client_no_cache");
01389 HttpEstablishStaticConfigByte(c.oride.cache_ignore_client_cc_max_age, "proxy.config.http.cache.ignore_client_cc_max_age");
01390 HttpEstablishStaticConfigByte(c.oride.cache_ims_on_client_no_cache, "proxy.config.http.cache.ims_on_client_no_cache");
01391 HttpEstablishStaticConfigByte(c.oride.cache_ignore_server_no_cache, "proxy.config.http.cache.ignore_server_no_cache");
01392 HttpEstablishStaticConfigByte(c.oride.cache_responses_to_cookies, "proxy.config.http.cache.cache_responses_to_cookies");
01393
01394 HttpEstablishStaticConfigByte(c.oride.cache_ignore_auth, "proxy.config.http.cache.ignore_authentication");
01395 HttpEstablishStaticConfigByte(c.oride.cache_urls_that_look_dynamic, "proxy.config.http.cache.cache_urls_that_look_dynamic");
01396 HttpEstablishStaticConfigByte(c.cache_enable_default_vary_headers, "proxy.config.http.cache.enable_default_vary_headers");
01397 HttpEstablishStaticConfigByte(c.cache_post_method, "proxy.config.http.cache.post_method");
01398
01399 HttpEstablishStaticConfigByte(c.ignore_accept_mismatch, "proxy.config.http.cache.ignore_accept_mismatch");
01400 HttpEstablishStaticConfigByte(c.ignore_accept_language_mismatch, "proxy.config.http.cache.ignore_accept_language_mismatch");
01401 HttpEstablishStaticConfigByte(c.ignore_accept_encoding_mismatch, "proxy.config.http.cache.ignore_accept_encoding_mismatch");
01402 HttpEstablishStaticConfigByte(c.ignore_accept_charset_mismatch, "proxy.config.http.cache.ignore_accept_charset_mismatch");
01403
01404 HttpEstablishStaticConfigByte(c.send_100_continue_response, "proxy.config.http.send_100_continue_response");
01405
01406 HttpEstablishStaticConfigByte(c.oride.cache_when_to_revalidate, "proxy.config.http.cache.when_to_revalidate");
01407 HttpEstablishStaticConfigByte(c.oride.cache_required_headers, "proxy.config.http.cache.required_headers");
01408 HttpEstablishStaticConfigByte(c.oride.cache_range_lookup, "proxy.config.http.cache.range.lookup");
01409 HttpEstablishStaticConfigByte(c.oride.cache_range_write, "proxy.config.http.cache.range.write");
01410
01411 HttpEstablishStaticConfigStringAlloc(c.connect_ports_string, "proxy.config.http.connect_ports");
01412
01413 HttpEstablishStaticConfigLongLong(c.oride.request_hdr_max_size, "proxy.config.http.request_header_max_size");
01414 HttpEstablishStaticConfigLongLong(c.oride.response_hdr_max_size, "proxy.config.http.response_header_max_size");
01415
01416 HttpEstablishStaticConfigByte(c.push_method_enabled, "proxy.config.http.push_method_enabled");
01417
01418 HttpEstablishStaticConfigByte(c.reverse_proxy_enabled, "proxy.config.reverse_proxy.enabled");
01419 HttpEstablishStaticConfigByte(c.url_remap_required, "proxy.config.url_remap.remap_required");
01420
01421 HttpEstablishStaticConfigStringAlloc(c.reverse_proxy_no_host_redirect, "proxy.config.header.parse.no_host_url_redirect");
01422 c.reverse_proxy_no_host_redirect_len = -1;
01423
01424 HttpEstablishStaticConfigByte(c.errors_log_error_pages, "proxy.config.http.errors.log_error_pages");
01425
01426 HttpEstablishStaticConfigLongLong(c.slow_log_threshold, "proxy.config.http.slow.log.threshold");
01427
01428 HttpEstablishStaticConfigByte(c.record_cop_page, "proxy.config.http.record_heartbeat");
01429
01430 HttpEstablishStaticConfigByte(c.oride.send_http11_requests, "proxy.config.http.send_http11_requests");
01431
01432
01433 HttpEstablishStaticConfigByte(c.referer_filter_enabled, "proxy.config.http.referer_filter");
01434 HttpEstablishStaticConfigByte(c.referer_format_redirect, "proxy.config.http.referer_format_redirect");
01435
01436 HttpEstablishStaticConfigLongLong(c.oride.down_server_timeout, "proxy.config.http.down_server.cache_time");
01437 HttpEstablishStaticConfigLongLong(c.oride.client_abort_threshold, "proxy.config.http.down_server.abort_threshold");
01438
01439
01440 HttpEstablishStaticConfigByte(c.oride.negative_caching_enabled, "proxy.config.http.negative_caching_enabled");
01441 HttpEstablishStaticConfigLongLong(c.oride.negative_caching_lifetime, "proxy.config.http.negative_caching_lifetime");
01442 HttpEstablishStaticConfigByte(c.oride.negative_revalidating_enabled, "proxy.config.http.negative_revalidating_enabled");
01443 HttpEstablishStaticConfigLongLong(c.oride.negative_revalidating_lifetime,
01444 "proxy.config.http.negative_revalidating_lifetime");
01445
01446
01447 HttpEstablishStaticConfigLongLong(c.oride.default_buffer_size_index, "proxy.config.http.default_buffer_size");
01448 HttpEstablishStaticConfigLongLong(c.oride.default_buffer_water_mark, "proxy.config.http.default_buffer_water_mark");
01449
01450
01451 HttpEstablishStaticConfigByte(c.enable_http_info, "proxy.config.http.enable_http_info");
01452
01453
01454
01455
01456
01457
01458
01459
01460
01461
01462
01463 HttpEstablishStaticConfigByte(c.redirection_enabled, "proxy.config.http.redirection_enabled");
01464 HttpEstablishStaticConfigByte(c.redirection_host_no_port, "proxy.config.http.redirect_host_no_port");
01465 HttpEstablishStaticConfigLongLong(c.number_of_redirections, "proxy.config.http.number_of_redirections");
01466 HttpEstablishStaticConfigLongLong(c.post_copy_size, "proxy.config.http.post_copy_size");
01467
01468
01469 HttpEstablishStaticConfigLongLong(c.autoconf_port, "proxy.config.admin.autoconf_port");
01470 HttpEstablishStaticConfigByte(c.autoconf_localhost_only, "proxy.config.admin.autoconf.localhost_only");
01471
01472
01473
01474 c.cluster_time_delta = 0;
01475 RegisterMgmtCallback(MGMT_EVENT_HTTP_CLUSTER_DELTA, cluster_delta_cb, NULL);
01476
01477 http_config_cont->handleEvent(EVENT_NONE, NULL);
01478
01479 return;
01480 }
01481
01482
01483
01484
01485
01486
01487 void
01488 HttpConfig::reconfigure()
01489 {
01490 #define INT_TO_BOOL(i) ((i) ? 1 : 0);
01491
01492 HttpConfigParams *params;
01493
01494 params = new HttpConfigParams;
01495
01496 params->inbound_ip4 = m_master.inbound_ip4;
01497 params->inbound_ip6 = m_master.inbound_ip6;
01498
01499 params->outbound_ip4 = m_master.outbound_ip4;
01500 params->outbound_ip6 = m_master.outbound_ip6;
01501
01502 params->proxy_hostname = ats_strdup(m_master.proxy_hostname);
01503 params->proxy_hostname_len = (params->proxy_hostname) ? strlen(params->proxy_hostname) : 0;
01504 params->no_dns_forward_to_parent = INT_TO_BOOL(m_master.no_dns_forward_to_parent);
01505 params->uncacheable_requests_bypass_parent = INT_TO_BOOL(m_master.uncacheable_requests_bypass_parent);
01506 params->no_origin_server_dns = INT_TO_BOOL(m_master.no_origin_server_dns);
01507 params->use_client_target_addr = m_master.use_client_target_addr;
01508 params->use_client_source_port = INT_TO_BOOL(m_master.use_client_source_port);
01509 params->oride.maintain_pristine_host_hdr = INT_TO_BOOL(m_master.oride.maintain_pristine_host_hdr);
01510
01511 params->disable_ssl_parenting = INT_TO_BOOL(m_master.disable_ssl_parenting);
01512
01513 params->server_max_connections = m_master.server_max_connections;
01514 params->oride.server_tcp_init_cwnd = m_master.oride.server_tcp_init_cwnd;
01515 params->oride.origin_max_connections = m_master.oride.origin_max_connections;
01516 params->origin_min_keep_alive_connections = m_master.origin_min_keep_alive_connections;
01517 params->attach_server_session_to_client = m_master.attach_server_session_to_client;
01518
01519 if (params->oride.origin_max_connections &&
01520 params->oride.origin_max_connections < params->origin_min_keep_alive_connections ) {
01521 Warning("origin_max_connections < origin_min_keep_alive_connections, setting min=max , please correct your records.config");
01522 params->origin_min_keep_alive_connections = params->oride.origin_max_connections;
01523 }
01524
01525 params->parent_proxy_routing_enable = INT_TO_BOOL(m_master.parent_proxy_routing_enable);
01526 params->enable_url_expandomatic = INT_TO_BOOL(m_master.enable_url_expandomatic);
01527
01528 params->oride.insert_request_via_string = m_master.oride.insert_request_via_string;
01529 params->oride.insert_response_via_string = m_master.oride.insert_response_via_string;
01530 params->proxy_request_via_string = ats_strdup(m_master.proxy_request_via_string);
01531 params->proxy_request_via_string_len = (params->proxy_request_via_string) ? strlen(params->proxy_request_via_string) : 0;
01532 params->proxy_response_via_string = ats_strdup(m_master.proxy_response_via_string);
01533 params->proxy_response_via_string_len = (params->proxy_response_via_string) ? strlen(params->proxy_response_via_string) : 0;
01534 params->oride.proxy_response_hsts_max_age = m_master.oride.proxy_response_hsts_max_age;
01535 params->oride.proxy_response_hsts_include_subdomains = m_master.oride.proxy_response_hsts_include_subdomains;
01536
01537 params->url_expansions_string = ats_strdup(m_master.url_expansions_string);
01538 params->url_expansions = parse_url_expansions(params->url_expansions_string, ¶ms->num_url_expansions);
01539
01540 params->oride.keep_alive_enabled_in = INT_TO_BOOL(m_master.oride.keep_alive_enabled_in);
01541 params->oride.keep_alive_enabled_out = INT_TO_BOOL(m_master.oride.keep_alive_enabled_out);
01542 params->oride.chunking_enabled = INT_TO_BOOL(m_master.oride.chunking_enabled);
01543 params->oride.http_chunking_size = m_master.oride.http_chunking_size;
01544
01545 params->oride.post_check_content_length_enabled = INT_TO_BOOL(m_master.oride.post_check_content_length_enabled);
01546
01547 params->oride.flow_control_enabled = INT_TO_BOOL(m_master.oride.flow_control_enabled);
01548 params->oride.flow_high_water_mark = m_master.oride.flow_high_water_mark;
01549 params->oride.flow_low_water_mark = m_master.oride.flow_low_water_mark;
01550
01551 if (params->oride.flow_low_water_mark <= 0)
01552 params->oride.flow_low_water_mark = params->oride.flow_high_water_mark;
01553 if (params->oride.flow_high_water_mark <= 0)
01554 params->oride.flow_high_water_mark = params->oride.flow_low_water_mark;
01555 if (params->oride.flow_high_water_mark < params->oride.flow_low_water_mark) {
01556 Warning("Flow control low water mark is greater than high water mark, flow control disabled");
01557 params->oride.flow_control_enabled = 0;
01558
01559 params->oride.flow_high_water_mark = params->oride.flow_low_water_mark = 0;
01560 }
01561
01562
01563 params->oride.server_session_sharing_pool = m_master.oride.server_session_sharing_pool;
01564 params->oride.server_session_sharing_match = m_master.oride.server_session_sharing_match;
01565
01566 params->oride.keep_alive_no_activity_timeout_in = m_master.oride.keep_alive_no_activity_timeout_in;
01567 params->oride.keep_alive_no_activity_timeout_out = m_master.oride.keep_alive_no_activity_timeout_out;
01568 params->oride.transaction_no_activity_timeout_in = m_master.oride.transaction_no_activity_timeout_in;
01569 params->oride.transaction_no_activity_timeout_out = m_master.oride.transaction_no_activity_timeout_out;
01570 params->transaction_active_timeout_in = m_master.transaction_active_timeout_in;
01571 params->oride.transaction_active_timeout_out = m_master.oride.transaction_active_timeout_out;
01572 params->accept_no_activity_timeout = m_master.accept_no_activity_timeout;
01573 params->oride.background_fill_active_timeout = m_master.oride.background_fill_active_timeout;
01574 params->oride.background_fill_threshold = m_master.oride.background_fill_threshold;
01575
01576 params->oride.connect_attempts_max_retries = m_master.oride.connect_attempts_max_retries;
01577 params->oride.connect_attempts_max_retries_dead_server = m_master.oride.connect_attempts_max_retries_dead_server;
01578 params->oride.connect_attempts_rr_retries = m_master.oride.connect_attempts_rr_retries;
01579 params->oride.connect_attempts_timeout = m_master.oride.connect_attempts_timeout;
01580 params->oride.post_connect_attempts_timeout = m_master.oride.post_connect_attempts_timeout;
01581 params->parent_connect_attempts = m_master.parent_connect_attempts;
01582 params->per_parent_connect_attempts = m_master.per_parent_connect_attempts;
01583 params->parent_connect_timeout = m_master.parent_connect_timeout;
01584
01585 params->oride.sock_recv_buffer_size_out = m_master.oride.sock_recv_buffer_size_out;
01586 params->oride.sock_send_buffer_size_out = m_master.oride.sock_send_buffer_size_out;
01587 params->oride.sock_option_flag_out = m_master.oride.sock_option_flag_out;
01588 params->oride.sock_packet_mark_out = m_master.oride.sock_packet_mark_out;
01589 params->oride.sock_packet_tos_out = m_master.oride.sock_packet_tos_out;
01590
01591
01592 params->oride.fwd_proxy_auth_to_parent = INT_TO_BOOL(m_master.oride.fwd_proxy_auth_to_parent);
01593
01594 params->oride.anonymize_remove_from = INT_TO_BOOL(m_master.oride.anonymize_remove_from);
01595 params->oride.anonymize_remove_referer = INT_TO_BOOL(m_master.oride.anonymize_remove_referer);
01596 params->oride.anonymize_remove_user_agent = INT_TO_BOOL(m_master.oride.anonymize_remove_user_agent);
01597 params->oride.anonymize_remove_cookie = INT_TO_BOOL(m_master.oride.anonymize_remove_cookie);
01598 params->oride.anonymize_remove_client_ip = INT_TO_BOOL(m_master.oride.anonymize_remove_client_ip);
01599 params->oride.anonymize_insert_client_ip = INT_TO_BOOL(m_master.oride.anonymize_insert_client_ip);
01600 params->anonymize_other_header_list = ats_strdup(m_master.anonymize_other_header_list);
01601
01602 params->oride.global_user_agent_header = ats_strdup(m_master.oride.global_user_agent_header);
01603 params->oride.global_user_agent_header_size = params->oride.global_user_agent_header ?
01604 strlen(params->oride.global_user_agent_header) : 0;
01605
01606 params->oride.proxy_response_server_string = ats_strdup(m_master.oride.proxy_response_server_string);
01607 params->oride.proxy_response_server_string_len = params->oride.proxy_response_server_string ?
01608 strlen(params->oride.proxy_response_server_string) : 0;
01609 params->oride.proxy_response_server_enabled = m_master.oride.proxy_response_server_enabled;
01610
01611 params->oride.insert_squid_x_forwarded_for = INT_TO_BOOL(m_master.oride.insert_squid_x_forwarded_for);
01612 params->oride.insert_age_in_response = INT_TO_BOOL(m_master.oride.insert_age_in_response);
01613 params->enable_http_stats = INT_TO_BOOL(m_master.enable_http_stats);
01614 params->oride.normalize_ae_gzip = INT_TO_BOOL(m_master.oride.normalize_ae_gzip);
01615
01616 params->icp_enabled = (m_master.icp_enabled == ICP_MODE_SEND_RECEIVE ? 1 : 0);
01617 params->stale_icp_enabled = INT_TO_BOOL(m_master.stale_icp_enabled);
01618
01619 params->oride.cache_heuristic_min_lifetime = m_master.oride.cache_heuristic_min_lifetime;
01620 params->oride.cache_heuristic_max_lifetime = m_master.oride.cache_heuristic_max_lifetime;
01621 params->oride.cache_heuristic_lm_factor = min(max(m_master.oride.cache_heuristic_lm_factor, 0), 1);
01622
01623 params->oride.cache_guaranteed_min_lifetime = m_master.oride.cache_guaranteed_min_lifetime;
01624 params->oride.cache_guaranteed_max_lifetime = m_master.oride.cache_guaranteed_max_lifetime;
01625
01626 params->oride.cache_max_stale_age = m_master.oride.cache_max_stale_age;
01627 params->oride.freshness_fuzz_time = m_master.oride.freshness_fuzz_time;
01628 params->oride.freshness_fuzz_min_time = m_master.oride.freshness_fuzz_min_time;
01629 params->oride.freshness_fuzz_prob = m_master.oride.freshness_fuzz_prob;
01630
01631 params->cache_vary_default_text = ats_strdup(m_master.cache_vary_default_text);
01632 params->cache_vary_default_images = ats_strdup(m_master.cache_vary_default_images);
01633 params->cache_vary_default_other = ats_strdup(m_master.cache_vary_default_other);
01634
01635
01636 params->oride.max_cache_open_read_retries = m_master.oride.max_cache_open_read_retries;
01637 params->oride.cache_open_read_retry_time = m_master.oride.cache_open_read_retry_time;
01638
01639
01640 params->max_cache_open_write_retries = m_master.max_cache_open_write_retries;
01641
01642 params->oride.cache_http = INT_TO_BOOL(m_master.oride.cache_http);
01643 params->oride.cache_cluster_cache_local = INT_TO_BOOL(m_master.oride.cache_cluster_cache_local);
01644 params->oride.cache_ignore_client_no_cache = INT_TO_BOOL(m_master.oride.cache_ignore_client_no_cache);
01645 params->oride.cache_ignore_client_cc_max_age = INT_TO_BOOL(m_master.oride.cache_ignore_client_cc_max_age);
01646 params->oride.cache_ims_on_client_no_cache = INT_TO_BOOL(m_master.oride.cache_ims_on_client_no_cache);
01647 params->oride.cache_ignore_server_no_cache = INT_TO_BOOL(m_master.oride.cache_ignore_server_no_cache);
01648 params->oride.cache_responses_to_cookies = m_master.oride.cache_responses_to_cookies;
01649 params->oride.cache_ignore_auth = INT_TO_BOOL(m_master.oride.cache_ignore_auth);
01650 params->oride.cache_urls_that_look_dynamic = INT_TO_BOOL(m_master.oride.cache_urls_that_look_dynamic);
01651 params->cache_enable_default_vary_headers = INT_TO_BOOL(m_master.cache_enable_default_vary_headers);
01652 params->cache_post_method = INT_TO_BOOL(m_master.cache_post_method);
01653
01654 params->ignore_accept_mismatch = m_master.ignore_accept_mismatch;
01655 params->ignore_accept_language_mismatch = m_master.ignore_accept_language_mismatch;
01656 params->ignore_accept_encoding_mismatch = m_master.ignore_accept_encoding_mismatch;
01657 params->ignore_accept_charset_mismatch = m_master.ignore_accept_charset_mismatch;
01658
01659 params->send_100_continue_response = INT_TO_BOOL(m_master.send_100_continue_response);
01660
01661 params->oride.cache_when_to_revalidate = m_master.oride.cache_when_to_revalidate;
01662
01663 params->oride.cache_required_headers = m_master.oride.cache_required_headers;
01664 params->oride.cache_range_lookup = INT_TO_BOOL(m_master.oride.cache_range_lookup);
01665 params->oride.cache_range_write = INT_TO_BOOL(m_master.oride.cache_range_write);
01666
01667 params->connect_ports_string = ats_strdup(m_master.connect_ports_string);
01668 params->connect_ports = parse_ports_list(params->connect_ports_string);
01669
01670 params->oride.request_hdr_max_size = m_master.oride.request_hdr_max_size;
01671 params->oride.response_hdr_max_size = m_master.oride.response_hdr_max_size;
01672
01673 params->push_method_enabled = INT_TO_BOOL(m_master.push_method_enabled);
01674
01675 params->reverse_proxy_enabled = INT_TO_BOOL(m_master.reverse_proxy_enabled);
01676 params->url_remap_required = INT_TO_BOOL(m_master.url_remap_required);
01677 params->errors_log_error_pages = INT_TO_BOOL(m_master.errors_log_error_pages);
01678 params->slow_log_threshold = m_master.slow_log_threshold;
01679 params->record_cop_page = INT_TO_BOOL(m_master.record_cop_page);
01680 params->oride.send_http11_requests = m_master.oride.send_http11_requests;
01681 params->oride.doc_in_cache_skip_dns = INT_TO_BOOL(m_master.oride.doc_in_cache_skip_dns);
01682 params->oride.default_buffer_size_index = m_master.oride.default_buffer_size_index;
01683 params->oride.default_buffer_water_mark = m_master.oride.default_buffer_water_mark;
01684 params->enable_http_info = INT_TO_BOOL(m_master.enable_http_info);
01685 params->reverse_proxy_no_host_redirect = ats_strdup(m_master.reverse_proxy_no_host_redirect);
01686 params->reverse_proxy_no_host_redirect_len =
01687 params->reverse_proxy_no_host_redirect ? strlen(params->reverse_proxy_no_host_redirect) : 0;
01688
01689 params->referer_filter_enabled = INT_TO_BOOL(m_master.referer_filter_enabled);
01690 params->referer_format_redirect = INT_TO_BOOL(m_master.referer_format_redirect);
01691
01692 params->oride.accept_encoding_filter_enabled = INT_TO_BOOL(m_master.oride.accept_encoding_filter_enabled);
01693
01694 params->oride.down_server_timeout = m_master.oride.down_server_timeout;
01695 params->oride.client_abort_threshold = m_master.oride.client_abort_threshold;
01696
01697 params->oride.negative_caching_enabled = INT_TO_BOOL(m_master.oride.negative_caching_enabled);
01698 params->oride.negative_caching_lifetime = m_master.oride.negative_caching_lifetime;
01699 params->oride.negative_revalidating_enabled = INT_TO_BOOL(m_master.oride.negative_revalidating_enabled);
01700 params->oride.negative_revalidating_lifetime = m_master.oride.negative_revalidating_lifetime;
01701
01702
01703
01704
01705
01706
01707
01708
01709
01710
01711
01712
01713 params->redirection_enabled = INT_TO_BOOL(m_master.redirection_enabled);
01714 params->redirection_host_no_port = INT_TO_BOOL(m_master.redirection_host_no_port);
01715 params->number_of_redirections = m_master.number_of_redirections;
01716 params->post_copy_size = m_master.post_copy_size;
01717
01718
01719 params->autoconf_port = m_master.autoconf_port;
01720 params->autoconf_localhost_only = m_master.autoconf_localhost_only;
01721
01722 m_id = configProcessor.set(m_id, params);
01723
01724 #undef INT_TO_BOOL
01725 }
01726
01727
01728
01729
01730
01731
01732 HttpConfigParams *
01733 HttpConfig::acquire()
01734 {
01735 if (m_id != 0) {
01736 return (HttpConfigParams *) configProcessor.get(m_id);
01737 } else {
01738 return NULL;
01739 }
01740 }
01741
01742
01743
01744
01745
01746
01747 void
01748 HttpConfig::release(HttpConfigParams * params)
01749 {
01750 configProcessor.release(m_id, params);
01751 }
01752
01753
01754
01755
01756
01757
01758 HttpConfigPortRange *
01759 HttpConfig::parse_ports_list(char *ports_string)
01760 {
01761 HttpConfigPortRange *ports_list = 0;
01762
01763 if (!ports_string)
01764 return (0);
01765
01766 if (strchr(ports_string, '*')) {
01767 ports_list = new HttpConfigPortRange;
01768 ports_list->low = -1;
01769 ports_list->high = -1;
01770 ports_list->next = NULL;
01771 } else {
01772 HttpConfigPortRange *pr, *prev;
01773 char *start;
01774 char *end;
01775
01776 pr = NULL;
01777 prev = NULL;
01778
01779 start = ports_string;
01780
01781 while (1) {
01782 while ((start[0] != '\0') && ParseRules::is_space(start[0]))
01783 start++;
01784
01785
01786 end = start;
01787 while ((end[0] != '\0') && ParseRules::is_digit(end[0]))
01788 end++;
01789
01790
01791 if (start == end)
01792 break;
01793
01794 pr = new HttpConfigPortRange;
01795 pr->low = atoi(start);
01796 pr->high = pr->low;
01797 pr->next = NULL;
01798
01799 if (prev)
01800 prev->next = pr;
01801 else
01802 ports_list = pr;
01803 prev = pr;
01804
01805
01806
01807 if (end[0] == '-') {
01808 start = end + 1;
01809 while ((start[0] != '\0') && ParseRules::is_space(start[0]))
01810 start++;
01811
01812 end = start;
01813 while ((end[0] != '\0') && ParseRules::is_digit(end[0]))
01814 end++;
01815
01816 if (start == end)
01817 break;
01818
01819 pr->high = atoi(start);
01820 }
01821
01822 start = end;
01823
01824 ink_release_assert(pr->low <= pr->high);
01825 }
01826 }
01827 return (ports_list);
01828 }
01829
01830
01831
01832
01833
01834
01835 char **
01836 HttpConfig::parse_url_expansions(char *url_expansions_str, int *num_expansions)
01837 {
01838 char **expansions = NULL;
01839 int count = 0, i;
01840
01841 if (!url_expansions_str) {
01842 *num_expansions = count;
01843 return expansions;
01844 }
01845
01846 char *start = url_expansions_str, *end;
01847 while (1) {
01848
01849 while (isspace(*start))
01850 start++;
01851 if (*start == '\0')
01852 break;
01853 count++;
01854 end = start + 1;
01855
01856
01857 while (!isspace(*end) && *end != '\0')
01858 end++;
01859 start = end;
01860 }
01861
01862
01863 if (count) {
01864 expansions = (char **)ats_malloc(count * sizeof(char *));
01865 start = url_expansions_str;
01866 for (i = 0; i < count; i++) {
01867
01868 while (isspace(*start))
01869 start++;
01870 expansions[i] = start;
01871 end = start + 1;
01872
01873
01874 while (!isspace(*end) && *end != '\0')
01875 end++;
01876 *end = '\0';
01877 if (i < (count - 1))
01878 start = end + 1;
01879
01880 }
01881 }
01882
01883 *num_expansions = count;
01884 return expansions;
01885 }
01886
01887
01888
01889
01890
01891
01892
01893 void *
01894 HttpConfig::cluster_delta_cb(void * , char *data_raw, int )
01895 {
01896 int32_t delta32 = (int32_t) atoi(data_raw);
01897 int32_t old;
01898
01899
01900
01901
01902 old = ink_atomic_swap(&HttpConfig::m_master.cluster_time_delta, delta32);
01903 Debug("http_trans", "Cluster time delta moving from %d to %d", old, delta32);
01904
01905 return NULL;
01906
01907 }
01908
01909 volatile int32_t icp_dynamic_enabled;