TSHttpOverridableConfig

Synopsis

include <ts/ts.h>

TSReturnCode TSHttpTxnConfigIntSet(TSHttpTxn txnp, TSOverridableConfigKey key, TSMgmtInt value)

TSReturnCode TSHttpTxnConfigIntGet(TSHttpTxn txnp, TSOverridableConfigKey key, TSMgmtInt* value)

TSReturnCode TSHttpTxnConfigFloatSet(TSHttpTxn txnp, TSOverridableConfigKey key, TSMgmtFloat value)

TSReturnCode TSHttpTxnConfigFloatGet(TSHttpTxn txnp, TSOverridableConfigKey key, TSMgmtFloat* value)

TSReturnCode TSHttpTxnConfigStringSet(TSHttpTxn txnp, TSOverridableConfigKey key, const char* value, int length)

TSReturnCode TSHttpTxnConfigStringGet(TSHttpTxn txnp, TSOverridableConfigKey key, const char** value, int* length)

TSReturnCode TSHttpTxnConfigFind(const char* name, int length, TSOverridableConfigKey* key, TSRecordDataType* type)

Description

Some of the values that are set in records.config can be changed for a specific transaction. It is important to note that these functions change the configuration values stored for the transation, which is not quite the same as changing the actual operating values of the transaction. The critical effect is the value must be changed before it is used by the transaction - after that, changes will not have any effect.

All of the ...Get functions store the internal value in the storage indicated by the value argument. For strings length* will receive the length of the string.

The values are identified by the enumeration TSOverridableConfigKey. String values can be used indirectly by first passing them to TSHttpTxnConfigFind() which, if the string matches an overridable value, return the key and data type.

Configurations

The following configurations (from records.config) are overridable:

TSOverridableConfigKey ValueConfiguration Value
c:member:TS_CONFIG_BODY_FACTORY_TEMPLATE_BASEproxy.config.body_factory.template_base
c:member:TS_CONFIG_HTTP_ANONYMIZE_INSERT_CLIENT_IPproxy.config.http.insert_client_ip
c:member:TS_CONFIG_HTTP_ANONYMIZE_REMOVE_CLIENT_IPproxy.config.http.anonymize_remove_client_ip
c:member:TS_CONFIG_HTTP_ANONYMIZE_REMOVE_COOKIEproxy.config.http.anonymize_remove_cookie
c:member:TS_CONFIG_HTTP_ANONYMIZE_REMOVE_FROMproxy.config.http.anonymize_remove_from
c:member:TS_CONFIG_HTTP_ANONYMIZE_REMOVE_REFERERproxy.config.http.anonymize_remove_referer
c:member:TS_CONFIG_HTTP_ANONYMIZE_REMOVE_USER_AGENTproxy.config.http.anonymize_remove_user_agent
c:member:TS_CONFIG_HTTP_ATTACH_SERVER_SESSION_TO_CLIENTproxy.config.http.attach_server_session_to_client
c:member:TS_CONFIG_HTTP_SAFE_REQUESTS_RETRYABLEproxy.config.http.safe_requests_retryable
c:member:TS_CONFIG_HTTP_AUTH_SERVER_SESSION_PRIVATEproxy.config.http.auth_server_session_private
c:member:TS_CONFIG_HTTP_BACKGROUND_FILL_ACTIVE_TIMEOUTproxy.config.http.background_fill_active_timeout
c:member:TS_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLDproxy.config.http.background_fill_completed_threshold
c:member:TS_CONFIG_HTTP_CACHE_CACHE_RESPONSES_TO_COOKIESproxy.config.http.cache.cache_responses_to_cookies
c:member:TS_CONFIG_HTTP_CACHE_CACHE_URLS_THAT_LOOK_DYNAMICproxy.config.http.cache.cache_urls_that_look_dynamic
c:member:TS_CONFIG_HTTP_CACHE_CLUSTER_CACHE_LOCALproxy.config.http.cache.cluster_cache_local
c:member:TS_CONFIG_HTTP_CACHE_FUZZ_MIN_TIMEproxy.config.http.cache.fuzz.min_time
c:member:TS_CONFIG_HTTP_CACHE_FUZZ_PROBABILITYproxy.config.http.cache.fuzz.probability
c:member:TS_CONFIG_HTTP_CACHE_FUZZ_TIMEproxy.config.http.cache.fuzz.time
c:member:TS_CONFIG_HTTP_CACHE_GENERATIONproxy.config.http.cache.generation
c:member:TS_CONFIG_HTTP_CACHE_GUARANTEED_MAX_LIFETIMEproxy.config.http.cache.guaranteed_max_lifetime
c:member:TS_CONFIG_HTTP_CACHE_GUARANTEED_MIN_LIFETIMEproxy.config.http.cache.guaranteed_min_lifetime
c:member:TS_CONFIG_HTTP_CACHE_HEURISTIC_LM_FACTORproxy.config.http.cache.heuristic_lm_factor
c:member:TS_CONFIG_HTTP_CACHE_HEURISTIC_MAX_LIFETIMEproxy.config.http.cache.heuristic_max_lifetime
c:member:TS_CONFIG_HTTP_CACHE_HEURISTIC_MIN_LIFETIMEproxy.config.http.cache.heuristic_min_lifetime
c:member:TS_CONFIG_HTTP_CACHE_HTTPproxy.config.http.cache.http
c:member:TS_CONFIG_HTTP_CACHE_IGNORE_AUTHENTICATIONproxy.config.http.cache.ignore_authentication
c:member:TS_CONFIG_HTTP_CACHE_IGNORE_CLIENT_CC_MAX_AGEproxy.config.http.cache.ignore_client_cc_max_age
c:member:TS_CONFIG_HTTP_CACHE_IGNORE_CLIENT_NO_CACHEproxy.config.http.cache.ignore_client_no_cache
c:member:TS_CONFIG_HTTP_CACHE_IGNORE_SERVER_NO_CACHEproxy.config.http.cache.ignore_server_no_cache
c:member:TS_CONFIG_HTTP_CACHE_IMS_ON_CLIENT_NO_CACHEproxy.config.http.cache.ims_on_client_no_cache
c:member:TS_CONFIG_HTTP_CACHE_MAX_OPEN_READ_RETRIESproxy.config.http.cache.max_open_read_retries
c:member:TS_CONFIG_HTTP_CACHE_MAX_OPEN_WRITE_RETRIESproxy.config.http.cache.max_open_write_retries
c:member:TS_CONFIG_HTTP_CACHE_MAX_STALE_AGEproxy.config.http.cache.max_stale_age
c:member:TS_CONFIG_HTTP_CACHE_OPEN_READ_RETRY_TIMEproxy.config.http.cache.open_read_retry_time
c:member:TS_CONFIG_HTTP_CACHE_OPEN_WRITE_FAIL_ACTIONproxy.config.http.cache.open_write_fail_action
c:member:TS_CONFIG_HTTP_CACHE_RANGE_LOOKUPproxy.config.http.cache.range.lookup
c:member:TS_CONFIG_HTTP_CACHE_RANGE_WRITEproxy.config.http.cache.range.write
c:member:TS_CONFIG_HTTP_CACHE_REQUIRED_HEADERSproxy.config.http.cache.required_headers
c:member:TS_CONFIG_HTTP_CACHE_WHEN_TO_REVALIDATEproxy.config.http.cache.when_to_revalidate
c:member:TS_CONFIG_HTTP_CHUNKING_ENABLEDproxy.config.http.chunking_enabled
c:member:TS_CONFIG_HTTP_CHUNKING_SIZEproxy.config.http.chunking.size
c:member:TS_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIESproxy.config.http.connect_attempts_max_retries
c:member:TS_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES_DEAD_SERVERproxy.config.http.connect_attempts_max_retries_dead_server
c:member:TS_CONFIG_HTTP_CONNECT_ATTEMPTS_RR_RETRIESproxy.config.http.connect_attempts_rr_retries
c:member:TS_CONFIG_HTTP_CONNECT_ATTEMPTS_TIMEOUTproxy.config.http.connect_attempts_timeout
c:member:TS_CONFIG_HTTP_DEFAULT_BUFFER_SIZEproxy.config.http.default_buffer_size
c:member:TS_CONFIG_HTTP_DEFAULT_BUFFER_WATER_MARKproxy.config.http.default_buffer_water_mark
c:member:TS_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNSproxy.config.http.doc_in_cache_skip_dns
c:member:TS_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLDproxy.config.http.down_server.abort_threshold
c:member:TS_CONFIG_HTTP_DOWN_SERVER_CACHE_TIMEproxy.config.http.down_server.cache_time
c:member:TS_CONFIG_HTTP_ENABLE_REDIRECTIONproxy.config.http.redirection_enabled
c:member:TS_CONFIG_HTTP_FLOW_CONTROL_ENABLEDproxy.config.http.flow_control.enabled
c:member:TS_CONFIG_HTTP_FLOW_CONTROL_HIGH_WATER_MARKproxy.config.http.flow_control.high_water
c:member:TS_CONFIG_HTTP_FLOW_CONTROL_LOW_WATER_MARKproxy.config.http.flow_control.low_water
c:member:TS_CONFIG_HTTP_FORWARD_CONNECT_METHODproxy.config.http.forward_connect_method
c:member:TS_CONFIG_HTTP_FORWARD_PROXY_AUTH_TO_PARENTproxy.config.http.forward.proxy_auth_to_parent
c:member:TS_CONFIG_HTTP_GLOBAL_USER_AGENT_HEADERproxy.config.http.global_user_agent_header
c:member:TS_CONFIG_HTTP_INSERT_AGE_IN_RESPONSEproxy.config.http.insert_age_in_response
c:member:TS_CONFIG_HTTP_INSERT_REQUEST_VIA_STRproxy.config.http.insert_request_via_str
c:member:TS_CONFIG_HTTP_INSERT_RESPONSE_VIA_STRproxy.config.http.insert_response_via_str
c:member:TS_CONFIG_HTTP_INSERT_SQUID_X_FORWARDED_FORproxy.config.http.insert_squid_x_forwarded_for
c:member:TS_CONFIG_HTTP_KEEP_ALIVE_ENABLED_INproxy.config.http.keep_alive_enabled_in
c:member:TS_CONFIG_HTTP_KEEP_ALIVE_ENABLED_OUTproxy.config.http.keep_alive_enabled_out
c:member:TS_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TlMEOUT_INproxy.config.http.keep_alive_no_activity_timeout_in
c:member:TS_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_OUTproxy.config.http.keep_alive_no_activity_timeout_out
c:member:TS_CONFIG_HTTP_KEEP_ALIVE_POST_OUTproxy.config.http.keep_alive_post_out
c:member:TS_CONFIG_HTTP_NEGATIVE_CACHING_ENABLEDproxy.config.http.negative_caching_enabled
c:member:TS_CONFIG_HTTP_NEGATIVE_CACHING_LIFETIMEproxy.config.http.negative_caching_lifetime
c:member:TS_CONFIG_HTTP_NEGATIVE_REVALIDATING_ENABLEDproxy.config.http.negative_revalidating_enabled
c:member:TS_CONFIG_HTTP_NEGATIVE_REVALIDATING_LIFETIMEproxy.config.http.negative_revalidating_lifetime
c:member:TS_CONFIG_HTTP_NORMALIZE_AE_GZIPproxy.config.http.normalize_ae_gzip
c:member:TS_CONFIG_HTTP_NUMBER_OF_REDIRECTIONSproxy.config.http.number_of_redirections
c:member:TS_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONSproxy.config.http.origin_max_connections
c:member:TS_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS_QUEUEproxy.config.http.origin_max_connections_queue
c:member:TS_CONFIG_HTTP_PARENT_PROXY_TOTAL_CONNECT_ATTEMPTSproxy.config.http.parent_proxy.total_connect_attempts
c:member:TS_CONFIG_PARENT_FAILURES_UPDATE_HOSTDBproxy.config.http.parent_proxy.mark_down_hostdb
c:member:TS_CONFIG_HTTP_POST_CHECK_CONTENT_LENGTH_ENABLEDproxy.config.http.post.check.content_length.enabled
c:member:TS_CONFIG_HTTP_POST_CONNECT_ATTEMPTS_TIMEOUTproxy.config.http.post_connect_attempts_timeout
c:member:TS_CONFIG_HTTP_REDIRECT_USE_ORIG_CACHE_KEYproxy.config.http.redirect_use_orig_cache_key
c:member:TS_CONFIG_HTTP_REQUEST_HEADER_MAX_SIZEproxy.config.http.request_header_max_size
c:member:TS_CONFIG_HTTP_RESPONSE_HEADER_MAX_SIZEproxy.config.http.response_header_max_size
c:member:TS_CONFIG_HTTP_RESPONSE_SERVER_ENABLEDproxy.config.http.response_server_enabled
c:member:TS_CONFIG_HTTP_RESPONSE_SERVER_STRproxy.config.http.response_server_str
c:member:TS_CONFIG_HTTP_SEND_HTTP11_REQUESTSproxy.config.http.send_http11_requests
c:member:TS_CONFIG_HTTP_SERVER_SESSION_SHARING_MATCHproxy.config.http.server_session_sharing.match
c:member:TS_CONFIG_HTTP_SERVER_TCP_INIT_CWNDproxy.config.http.server_tcp_init_cwnd
c:member:TS_CONFIG_HTTP_SLOW_LOG_THRESHOLDproxy.config.http.slow.log.threshold
c:member:TS_CONFIG_HTTP_TRANSACTION_ACTIVE_TIMEOUT_INproxy.config.http.transaction_active_timeout_in
c:member:TS_CONFIG_HTTP_TRANSACTION_ACTIVE_TIMEOUT_OUTproxy.config.http.transaction_active_timeout_out
c:member:TS_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_INproxy.config.http.transaction_no_activity_timeout_in
c:member:TS_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_OUTproxy.config.http.transaction_no_activity_timeout_out
c:member:TS_CONFIG_HTTP_UNCACHEABLE_REQUESTS_BYPASS_PARENTproxy.config.http.uncacheable_requests_bypass_parent
c:member:TS_CONFIG_NET_SOCK_OPTION_FLAG_OUTproxy.config.net.sock_option_flag_out
c:member:TS_CONFIG_NET_SOCK_PACKET_MARK_OUTproxy.config.net.sock_packet_mark_out
c:member:TS_CONFIG_NET_SOCK_PACKET_TOS_OUTproxy.config.net.sock_packet_tos_out
c:member:TS_CONFIG_NET_SOCK_RECV_BUFFER_SIZE_OUTproxy.config.net.sock_recv_buffer_size_out
c:member:TS_CONFIG_NET_SOCK_SEND_BUFFER_SIZE_OUTproxy.config.net.sock_send_buffer_size_out
c:member:TS_CONFIG_SRV_ENABLEDproxy.config.srv_enabled
c:member:TS_CONFIG_SSL_HSTS_INCLUDE_SUBDOMAINSproxy.config.ssl.hsts_include_subdomains
c:member:TS_CONFIG_SSL_HSTS_MAX_AGEproxy.config.ssl.hsts_max_age
c:member:TS_CONFIG_URL_REMAP_PRISTINE_HOST_HDRproxy.config.url_remap.pristine_host_hdr
c:member:TS_CONFIG_WEBSOCKET_ACTIVE_TIMEOUTproxy.config.websocket.active_timeout
c:member:TS_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUTproxy.config.websocket.no_activity_timeout
c:member:TS_CONFIG_HTTP_PARENT_PROXY_FAIL_THRESHOLDproxy.config.http.parent_proxy.fail_threshold
c:member:TS_CONFIG_HTTP_PARENT_PROXY_RETRY_TIMEproxy.config.http.parent_proxy.retry_time
c:member:TS_CONFIG_HTTP_PER_PARENT_CONNECT_ATTEMPTSproxy.config.http.parent_proxy.per_parent_connect_attempts
c:member:TS_CONFIG_HTTP_PARENT_CONNECT_ATTEMPT_TIMEOUTproxy.config.http.parent_proxy.connect_attempts_timeout
c:member:TS_CONFIG_HTTP_ALLOW_MULTI_RANGEproxy.config.http.allow_multi_range
c:member:TS_CONFIG_SSL_CERT_FILENAMEproxy.config.ssl.client.cert.filename
c:member:TS_CONFIG_SSL_CERT_FILEPATHproxy.config.ssl.client.cert.path

Examples

Enable transaction buffer control with a high water mark of 262144 and a low water mark of 65536.

  1. int callback(TSCont contp, TSEvent event, void* data)
  2. {
  3. TSHttpTxn txnp = static_cast<TSHttpTxn>(data);
  4. TSHttpTxnConfigIntSet(txnp, TS_CONFIG_HTTP_FLOW_CONTROL_ENABLED, 1);
  5. TSHttpTxnConfigIntSet(txnp, TS_CONFIG_HTTP_FLOW_CONTROL_HIGH_WATER_MARK, 262144);
  6. TSHttpTxnConfigIntSet(txnp, TS_CONFIG_HTTP_FLOW_CONTROL_LOWER_WATER_MARK, 65536);
  7. return 0;
  8. }

See Also

TSAPI(3ts)