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
TS_CONFIG_BODY_FACTORY_TEMPLATE_BASEproxy.config.body_factory.template_base
TS_CONFIG_HTTP_ALLOW_HALF_OPENproxy.config.http.allow_half_open
TS_CONFIG_HTTP_ALLOW_MULTI_RANGEproxy.config.http.allow_multi_range
TS_CONFIG_HTTP_ANONYMIZE_INSERT_CLIENT_IPproxy.config.http.insert_client_ip
TS_CONFIG_HTTP_ANONYMIZE_REMOVE_CLIENT_IPproxy.config.http.anonymize_remove_client_ip
TS_CONFIG_HTTP_ANONYMIZE_REMOVE_COOKIEproxy.config.http.anonymize_remove_cookie
TS_CONFIG_HTTP_ANONYMIZE_REMOVE_FROMproxy.config.http.anonymize_remove_from
TS_CONFIG_HTTP_ANONYMIZE_REMOVE_REFERERproxy.config.http.anonymize_remove_referer
TS_CONFIG_HTTP_ANONYMIZE_REMOVE_USER_AGENTproxy.config.http.anonymize_remove_user_agent
TS_CONFIG_HTTP_ATTACH_SERVER_SESSION_TO_CLIENTproxy.config.http.attach_server_session_to_client
TS_CONFIG_HTTP_AUTH_SERVER_SESSION_PRIVATEproxy.config.http.auth_server_session_private
TS_CONFIG_HTTP_BACKGROUND_FILL_ACTIVE_TIMEOUTproxy.config.http.background_fill_active_timeout
TS_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLDproxy.config.http.background_fill_completed_threshold
TS_CONFIG_HTTP_CACHE_CACHE_RESPONSES_TO_COOKIESproxy.config.http.cache.cache_responses_to_cookies
TS_CONFIG_HTTP_CACHE_CACHE_URLS_THAT_LOOK_DYNAMICproxy.config.http.cache.cache_urls_that_look_dynamic
TS_CONFIG_HTTP_CACHE_ENABLE_DEFAULT_VARY_HEADERproxy.config.http.cache.enable_default_vary_headers
TS_CONFIG_HTTP_CACHE_GENERATIONproxy.config.http.cache.generation
TS_CONFIG_HTTP_CACHE_GUARANTEED_MAX_LIFETIMEproxy.config.http.cache.guaranteed_max_lifetime
TS_CONFIG_HTTP_CACHE_GUARANTEED_MIN_LIFETIMEproxy.config.http.cache.guaranteed_min_lifetime
TS_CONFIG_HTTP_CACHE_HEURISTIC_LM_FACTORproxy.config.http.cache.heuristic_lm_factor
TS_CONFIG_HTTP_CACHE_HEURISTIC_MAX_LIFETIMEproxy.config.http.cache.heuristic_max_lifetime
TS_CONFIG_HTTP_CACHE_HEURISTIC_MIN_LIFETIMEproxy.config.http.cache.heuristic_min_lifetime
TS_CONFIG_HTTP_CACHE_HTTPproxy.config.http.cache.http
TS_CONFIG_HTTP_CACHE_IGNORE_ACCEPT_CHARSET_MISMATCHproxy.config.http.cache.ignore_accept_charset_mismatch
TS_CONFIG_HTTP_CACHE_IGNORE_ACCEPT_ENCODING_MISMATCHproxy.config.http.cache.ignore_accept_encoding_mismatch
TS_CONFIG_HTTP_CACHE_IGNORE_ACCEPT_LANGUAGE_MISMATCHproxy.config.http.cache.ignore_accept_language_mismatch
TS_CONFIG_HTTP_CACHE_IGNORE_ACCEPT_MISMATCHproxy.config.http.cache.ignore_accept_mismatch
TS_CONFIG_HTTP_CACHE_IGNORE_AUTHENTICATIONproxy.config.http.cache.ignore_authentication
TS_CONFIG_HTTP_CACHE_IGNORE_CLIENT_CC_MAX_AGEproxy.config.http.cache.ignore_client_cc_max_age
TS_CONFIG_HTTP_CACHE_IGNORE_CLIENT_NO_CACHEproxy.config.http.cache.ignore_client_no_cache
TS_CONFIG_HTTP_CACHE_IGNORE_SERVER_NO_CACHEproxy.config.http.cache.ignore_server_no_cache
TS_CONFIG_HTTP_CACHE_IMS_ON_CLIENT_NO_CACHEproxy.config.http.cache.ims_on_client_no_cache
TS_CONFIG_HTTP_CACHE_MAX_OPEN_READ_RETRIESproxy.config.http.cache.max_open_read_retries
TS_CONFIG_HTTP_CACHE_MAX_OPEN_WRITE_RETRIESproxy.config.http.cache.max_open_write_retries
TS_CONFIG_HTTP_CACHE_MAX_STALE_AGEproxy.config.http.cache.max_stale_age
TS_CONFIG_HTTP_CACHE_OPEN_READ_RETRY_TIMEproxy.config.http.cache.open_read_retry_time
TS_CONFIG_HTTP_CACHE_OPEN_WRITE_FAIL_ACTIONproxy.config.http.cache.open_write_fail_action
TS_CONFIG_HTTP_CACHE_RANGE_LOOKUPproxy.config.http.cache.range.lookup
TS_CONFIG_HTTP_CACHE_RANGE_WRITEproxy.config.http.cache.range.write
TS_CONFIG_HTTP_CACHE_REQUIRED_HEADERSproxy.config.http.cache.required_headers
TS_CONFIG_HTTP_CACHE_VARY_DEFAULT_IMAGESproxy.config.http.cache.vary_default_images
TS_CONFIG_HTTP_CACHE_VARY_DEFAULT_OTHERproxy.config.http.cache.vary_default_other
TS_CONFIG_HTTP_CACHE_VARY_DEFAULT_TEXTproxy.config.http.cache.vary_default_text
TS_CONFIG_HTTP_CACHE_WHEN_TO_REVALIDATEproxy.config.http.cache.when_to_revalidate
TS_CONFIG_HTTP_CHUNKING_ENABLEDproxy.config.http.chunking_enabled
TS_CONFIG_HTTP_CHUNKING_SIZEproxy.config.http.chunking.size
TS_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES_DEAD_SERVERproxy.config.http.connect_attempts_max_retries_dead_server
TS_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIESproxy.config.http.connect_attempts_max_retries
TS_CONFIG_HTTP_CONNECT_ATTEMPTS_RR_RETRIESproxy.config.http.connect_attempts_rr_retries
TS_CONFIG_HTTP_CONNECT_ATTEMPTS_TIMEOUTproxy.config.http.connect_attempts_timeout
TS_CONFIG_HTTP_DEFAULT_BUFFER_SIZEproxy.config.http.default_buffer_size
TS_CONFIG_HTTP_DEFAULT_BUFFER_WATER_MARKproxy.config.http.default_buffer_water_mark
TS_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNSproxy.config.http.doc_in_cache_skip_dns
TS_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLDproxy.config.http.down_server.abort_threshold
TS_CONFIG_HTTP_DOWN_SERVER_CACHE_TIMEproxy.config.http.down_server.cache_time
TS_CONFIG_HTTP_FLOW_CONTROL_ENABLEDproxy.config.http.flow_control.enabled
TS_CONFIG_HTTP_FLOW_CONTROL_HIGH_WATER_MARKproxy.config.http.flow_control.high_water
TS_CONFIG_HTTP_FLOW_CONTROL_LOW_WATER_MARKproxy.config.http.flow_control.low_water
TS_CONFIG_HTTP_FORWARD_CONNECT_METHODproxy.config.http.forward_connect_method
TS_CONFIG_HTTP_FORWARD_PROXY_AUTH_TO_PARENTproxy.config.http.forward.proxy_auth_to_parent
TS_CONFIG_HTTP_GLOBAL_USER_AGENT_HEADERproxy.config.http.global_user_agent_header
TS_CONFIG_HTTP_INSERT_AGE_IN_RESPONSEproxy.config.http.insert_age_in_response
TS_CONFIG_HTTP_INSERT_FORWARDEDproxy.config.http.insert_forwarded
TS_CONFIG_HTTP_INSERT_REQUEST_VIA_STRproxy.config.http.insert_request_via_str
TS_CONFIG_HTTP_INSERT_RESPONSE_VIA_STRproxy.config.http.insert_response_via_str
TS_CONFIG_HTTP_INSERT_SQUID_X_FORWARDED_FORproxy.config.http.insert_squid_x_forwarded_for
TS_CONFIG_HTTP_KEEP_ALIVE_ENABLED_INproxy.config.http.keep_alive_enabled_in
TS_CONFIG_HTTP_KEEP_ALIVE_ENABLED_OUTproxy.config.http.keep_alive_enabled_out
TS_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_INproxy.config.http.keep_alive_no_activity_timeout_in
TS_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_OUTproxy.config.http.keep_alive_no_activity_timeout_out
TS_CONFIG_HTTP_KEEP_ALIVE_POST_OUTproxy.config.http.keep_alive_post_out
TS_CONFIG_HTTP_NEGATIVE_CACHING_ENABLEDproxy.config.http.negative_caching_enabled
TS_CONFIG_HTTP_NEGATIVE_CACHING_LIFETIMEproxy.config.http.negative_caching_lifetime
TS_CONFIG_HTTP_NEGATIVE_REVALIDATING_ENABLEDproxy.config.http.negative_revalidating_enabled
TS_CONFIG_HTTP_NEGATIVE_REVALIDATING_LIFETIMEproxy.config.http.negative_revalidating_lifetime
TS_CONFIG_HTTP_NORMALIZE_AEproxy.config.http.normalize_ae
TS_CONFIG_HTTP_NUMBER_OF_REDIRECTIONSproxy.config.http.number_of_redirections
TS_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONSproxy.config.http.origin_max_connections
TS_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS_QUEUEproxy.config.http.origin_max_connections_queue
TS_CONFIG_HTTP_PARENT_CONNECT_ATTEMPT_TIMEOUTproxy.config.http.parent_proxy.connect_attempts_timeout
TS_CONFIG_HTTP_PARENT_PROXY_FAIL_THRESHOLDproxy.config.http.parent_proxy.fail_threshold
TS_CONFIG_HTTP_PARENT_PROXY_RETRY_TIMEproxy.config.http.parent_proxy.retry_time
TS_CONFIG_HTTP_PARENT_PROXY_TOTAL_CONNECT_ATTEMPTSproxy.config.http.parent_proxy.total_connect_attempts
TS_CONFIG_HTTP_PER_PARENT_CONNECT_ATTEMPTSproxy.config.http.parent_proxy.per_parent_connect_attempts
TS_CONFIG_HTTP_PER_SERVER_CONNECTION_MATCHproxy.config.http.per_server.connection.match
TS_CONFIG_HTTP_PER_SERVER_CONNECTION_MAXproxy.config.http.per_server.connection.max
TS_CONFIG_HTTP_POST_CHECK_CONTENT_LENGTH_ENABLEDproxy.config.http.post.check.content_length.enabled
TS_CONFIG_HTTP_POST_CONNECT_ATTEMPTS_TIMEOUTproxy.config.http.post_connect_attempts_timeout
TS_CONFIG_HTTP_REDIRECT_USE_ORIG_CACHE_KEYproxy.config.http.redirect_use_orig_cache_key
TS_CONFIG_HTTP_REQUEST_BUFFER_ENABLEDproxy.config.http.request_buffer_enabled
TS_CONFIG_HTTP_REQUEST_HEADER_MAX_SIZEproxy.config.http.request_header_max_size
TS_CONFIG_HTTP_RESPONSE_HEADER_MAX_SIZEproxy.config.http.response_header_max_size
TS_CONFIG_HTTP_RESPONSE_SERVER_ENABLEDproxy.config.http.response_server_enabled
TS_CONFIG_HTTP_RESPONSE_SERVER_STRproxy.config.http.response_server_str
TS_CONFIG_HTTP_SEND_HTTP11_REQUESTSproxy.config.http.send_http11_requests
TS_CONFIG_HTTP_SERVER_SESSION_SHARING_MATCHproxy.config.http.server_session_sharing.match
TS_CONFIG_HTTP_SERVER_TCP_INIT_CWNDproxy.config.http.server_tcp_init_cwnd
TS_CONFIG_HTTP_SLOW_LOG_THRESHOLDproxy.config.http.slow.log.threshold
TS_CONFIG_HTTP_TRANSACTION_ACTIVE_TIMEOUT_INproxy.config.http.transaction_active_timeout_in
TS_CONFIG_HTTP_TRANSACTION_ACTIVE_TIMEOUT_OUTproxy.config.http.transaction_active_timeout_out
TS_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_INproxy.config.http.transaction_no_activity_timeout_in
TS_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_OUTproxy.config.http.transaction_no_activity_timeout_out
TS_CONFIG_HTTP_UNCACHEABLE_REQUESTS_BYPASS_PARENTproxy.config.http.uncacheable_requests_bypass_parent
TS_CONFIG_NET_SOCK_OPTION_FLAG_OUTproxy.config.net.sock_option_flag_out
TS_CONFIG_NET_SOCK_PACKET_MARK_OUTproxy.config.net.sock_packet_mark_out
TS_CONFIG_NET_SOCK_PACKET_TOS_OUTproxy.config.net.sock_packet_tos_out
TS_CONFIG_NET_SOCK_RECV_BUFFER_SIZE_OUTproxy.config.net.sock_recv_buffer_size_out
TS_CONFIG_NET_SOCK_SEND_BUFFER_SIZE_OUTproxy.config.net.sock_send_buffer_size_out
TS_CONFIG_PARENT_FAILURES_UPDATE_HOSTDBproxy.config.http.parent_proxy.mark_down_hostdb
TS_CONFIG_SRV_ENABLEDproxy.config.srv_enabled
TS_CONFIG_SSL_CERT_FILENAMEproxy.config.ssl.client.cert.filename
TS_CONFIG_SSL_CERT_FILEPATHproxy.config.ssl.client.cert.path
TS_CONFIG_SSL_CLIENT_VERIFY_SERVERproxy.config.ssl.client.verify.server
TS_CONFIG_SSL_HSTS_INCLUDE_SUBDOMAINSproxy.config.ssl.hsts_include_subdomains
TS_CONFIG_SSL_HSTS_MAX_AGEproxy.config.ssl.hsts_max_age
TS_CONFIG_URL_REMAP_PRISTINE_HOST_HDRproxy.config.url_remap.pristine_host_hdr
TS_CONFIG_WEBSOCKET_ACTIVE_TIMEOUTproxy.config.websocket.active_timeout
TS_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUTproxy.config.websocket.no_activity_timeout

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)