|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Comment:
Changes (8)
View page history... *Back to [[Book|Administrator's Configuration File Reference#cfr]] [[Topic|Administrator's Configuration File Reference#chap7]]* h2. {{ObjectType}} The {{ObjectType}} directives determine the MIME type of the file that has to be sent to the client in response to a request. For more information, see [{{ObjectType}}|Flow of Control in obj.conf#object]. The following {{ObjectType}}-class functions are described in detail in this section: ||B ||F ||H, S & T || |* [#{{block-auth-cert}}] * [#{{block-cache-info}}] * [#{{block-cipher}}] * [#{{block-ip}}] * [#{{block-issuer-dn}}] * [#{{block-jroute}}] * [#{{block-keysize}}] * [#{{block-proxy-agent}}] * [#{{block-proxy-auth}}] * [#{{block-secret-keysize}}] * [#{{block-ssl-id}}] * [#{{block-user-dn}}] * [#{{block-via}}] |* [#{{force-type}}] * [#{{forward-auth-cert}}] * [#{{forward-cache-info}}] * [#{{forward-cipher}}] * [#{{forward-ip}}] * [#{{forward-issuer-dn}}] * [#{{forward-jroute}}] * [#{{forward-keysize}}] * [#{{forward-proxy-agent}}] * [#{{forward-proxy-auth}}] * [#{{forward-secret-keysize}}] * [#{{forward-ssl-id}}] * [#{{forward-user-dn}}] * [#{{forward-via}}] |* [#{{http-client-config}}] * [#{{set-basic-auth}}] * [#{{set-cache-control}}] * [#{{set-cookie}}] * [#{{set-default-type}}] * [#{{shtml-hacktype}}] * [#{{ssl-client-config}}] * [#{{type-by-exp}}] * [#{{type-by-extension}}] * [#{{type-j2ee}}] | |
In addition, the following common SAFs are valid for the {{ObjectType}} directive: |
| * [#{{match-browser}}] * [#{{set-variable}}] |
| * [{{match-browser}}|Common SAFs across Multiple Directives#saf2] * [{{set-variable}}|Common SAFs across Multiple Directives#saf8] |
h3. {{block-auth-cert}} {anchor:obj1} |
... The {{block-auth-cert}} function instructs the server not to forward the client’s SSL/TLS certificate to remote servers. h4. Parameters The following table describes parameter for the {{block-auth-cert}} function. Table 7-33 {{block-auth-cert}} Parameter ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="block-auth-cert" {code} h4. See Also [#{{forward-auth-cert}}] h3. {{block-cache-info}} {anchor:obj2} The {{block-cache-info}} function instructs the server not to forward information about local cache hits to remote servers. h4. Parameters The following table describes parameter for the {{block-cache-info}} function. Table 7-34 {{block-cache-info}} Parameter ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="block-cache-info" {code} \\ h4. See Also [#{{forward-cache-info}}] h3. {{block-cipher}} {anchor:obj3} The {{block-cipher}} function instructs the server to forward the name of the client’s SSL/TLS cipher suite to remote servers. h4. Parameters The following table describes parameter for the {{block-cipher}} function. Table 7-35 {{block-cipher}} Parameter ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="block-cipher" {code} h4. See Also [#{{forward-cipher}}] h3. {{block-ip}} {anchor:obj4} The {{block-ip}} function instructs the server not to forward the client’s IP address to remote servers. h4. Parameters The following table describes parameter for the {{block-ip}} function. Table 7-36 {{block-ip}} Parameter ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="block-ip" {code} h4. See Also [#{{forward-ip}}] h3. {{block-issuer-dn}} {anchor:obj5} The {{block-issuer-dn}} function instructs the server not to forward the distinguished name of the issuer of the client’s SSL/TLS certificate to remote servers. h4. Parameters The following table describes parameter for the {{block-issuer-dn}} function. Table 7-37 {{block-issuer-dn}} Parameter ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="block-auth-cert" {code} h4. See Also [#{{forward-issuer-dn}}] h3. {{block-jroute}} {anchor:obj6} The {{block-jroute}} function instructs the server not to forward information about request routing to remote servers using the proprietary {{Proxy-jroute}} format. h4. Parameters The following table describes parameter for the {{block-jroute}} function. Table 7-38 {{block-jroute}} Parameter ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="block-jroute" {code} h4. See Also [#{{forward-jroute}}] h3. {{block-keysize}} {anchor:obj7} The {{block-keysize}} function instructs the server not to forward the size of the client’s SSL/TLS key to remote servers. h4. Parameters The following table describes parameter for the {{block-keysize}} function. Table 7-39 {{block-keysize}} Parameter ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="block-keysize" {code} h4. See Also [#{{forward-keysize}}] h3. {{block-proxy-agent}} {anchor:obj8} The {{block-proxy-agent}} function instructs the server not to forward its version information to remote servers. h4. Parameters The following table describes parameter for the {{block-proxy-agent}} function. Table 7-40 {{block-proxy-agent}} Parameter ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="block-proxy-agent" {code} h4. See Also [#{{forward-proxy-agent}}] h3. {{block-proxy-auth}} {anchor:obj9} The {{block-proxy-auth}} function instructs the server not to forward the client’s proxy authentication credentials, that is, the client’s Proxy-authorization HTTP request header, to remote servers. h4. Parameter The following table describes parameter for the {{block-proxy-auth}} function. Table 7-41 {{block-proxy-auth}} Parameter ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="block-proxy-auth" {code} h4. See Also [#{{forward-proxy-auth}}] h3. {{block-secret-keysize}} {anchor:obj10} The {{block-secret-keysize}} function instructs the server not to forward the size of the client’s SSL/TLS secret key to remote servers. h4. Parameters The following table describes parameter for the {{block-secret-keysize}} function. Table 7-42 {{block-secret-keysize}} Parameter ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="block-secret-keysize" {code} h4. See Also [#{{forward-secret-keysize}}] h3. {{block-ssl-id}} {anchor:obj11} The {{block-ssl-id}} function instructs the server not to forward the client’s SSL/TLS session ID to remote servers. h4. Parameters The following table describes parameter for the {{block-ssl-id}} function. Table 7-43 {{block-ssl-id}} Parameter ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="block-ssl-id" {code} h4. See Also [#{{forward-ssl-id}}] h3. {{block-user-dn}} {anchor:obj12} The {{block-user-dn}} function instructs the server not to forward the distinguished name of the subject of the client’s SSL/TLS certificate to remote servers. h4. Parameters The following table describes parameter for the {{block-user-dn}} function. Table 7-44 {{block-user-dn}} Parameter ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="block-user-dn" {code} h4. See Also [#{{forward-user-dn}}] h3. {{block-via}} {anchor:obj13} The {{block-via}} function instructs the server not to forward information about request routing to remote servers using the HTTP/1.1 {{Via}} format. h4. Parameters The following table describes parameter for the {{block-via}} function. Table 7-45 {{block-via}} Parameter ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="block-via" {code} h4. See Also [#{{forward-via}}] h3. {{force-type}} {anchor:obj14} The {{force-type}} function assigns a type to requests that do not already have a MIME type. This function is used to specify a default object type. Ensure that the directive that calls this function comes last in the list of {{ObjectType}} directives, so that all other {{ObjectType}} directives have a chance to set the MIME type. If a directive sets an attribute and later directives try to set that attribute to something else, the first setting is used and the subsequent settings are ignored. h4. Parameters The following table describes parameters for the {{force-type}} function. Table 7-46 {{force-type}} Parameters ||Parameter ||Description || |{{type}} |(Optional) Type assigned to a matching request (the {{Content-Type}} header). | |{{enc}} |(Optional) Encoding assigned to a matching request (the {{Content-Encoding}} header). | |{{lang}} |(Optional) Language assigned to a matching request (the {{Content-Language}} header). | |{{charset}} |(Optional) Character set for the {{magnus-charset}} parameter in {{rq->srvhdrs}}. If a browser sends the {{Accept-Charset}} header or its {{User-Agent}} is Mozilla/1.1 or newer, then append “{{; charset=}}_charset_” to {{Content-Type}}, where _charset_ is the value of the {{magnus-charset}} parameter in {{rq->srvhdrs}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="force-type" type="text/plain" ObjectType fn="force-type" lang="en_US" {code} h4. See Also * [#{{type-by-exp}}] * [#{{type-by-extension}}] h3. {{forward-auth-cert}} {anchor:obj15} The {{forward-auth-cert}} function instructs the server to forward the client’s SSL/TLS certificate to remote servers. h4. Parameters The following table describes parameters for the {{forward-auth-cert}} function. Table 7-47 {{forward-auth-cert}} Parameters ||Parameter ||Description || |{{hdr}} |(Optional) Name of the HTTP request header used to communicate the client’s DER-encoded SSL/TLS certificate in Base 64 encoding. The default value is {{Proxy-auth-cert}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. See Also [#{{block-auth-cert}}] h3. {{forward-cache-info}} {anchor:obj16} The {{forward-cache-info}} function instructs the server to forward information about local cache hits to remote servers. h4. Parameter The following table describes parameters for the {{forward-cache-info}} function. Table 7-48 {{forward-cache-info}} Parameters ||Parameter ||Description || |{{hdr}} |(Optional) Name of the HTTP request header used to communicate information about local cache hits. The default value is {{Cache-info}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. See Also [#{{block-cache-info}}] h3. {{forward-cipher}} {anchor:obj17} The {{forward-cipher}} function instructs the server to forward the name of the client’s SSL/TLS cipher suite to remote servers. h4. Parameters The following table describes parameters for the {{forward-cipher}} function. Table 7-49 {{forward-cipher}} Parameters ||Parameter ||Description || |{{hdr}} |(Optional) Name of the HTTP request header used to communicate the name of the client’s SSL/TLS cipher suite. The default value is {{Proxy-cipher}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. See Also [#{{block-cipher}}] h3. {{forward-ip}} {anchor:obj18} The {{forward-ip}} function instructs the server to forward the client’s IP address to remote servers. h4. Parameters The following table describes parameters for the {{forward-ip}} function. Table 7-50 {{forward-ip}} Parameters ||Parameter ||Description || |{{hdr}} |(Optional) Name of the HTTP request header used to communicate the client’s IP address. The default value is {{Client-ip}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. See Also [#{{block-ip}}] h3. {{forward-issuer-dn}} {anchor:obj19} The {{forward-issuer-dn}} function instructs the server to forward the distinguished name of the issuer of the client’s SSL/TLS certificate to remote servers. h4. Parameters The following table describes parameters for the {{forward-issuer-dn}} function. Table 7-51 {{forward-issuer-dn}} Parameters ||Parameter ||Description || |{{hdr}} |(Optional) Name of the HTTP request header used to communicate the distinguished name of the issuer of the client’s SSL/TLS certificate. The default value is {{Proxy-issuer-dn}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. See Also [#{{block-issuer-dn}}] h3. {{forward-jroute}} {anchor:obj20} The {{forward-jroute}} function instructs the server to forward information about request routing using the proprietary {{Proxy-jroute}} format. The {{Proxy-jroute}} header field is used by the {{set-origin-server function}} and some Servlet containers to implement session stickiness. h4. Parameters The following table describes parameters for the {{forward-jroute}} function. Table 7-52 {{forward-jroute}} Parameters ||Parameter ||Description || |{{hdr}} |(Optional) Name of the HTTP request header used to communicate the request routing information. The default value is {{Proxy-jrout}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | |
| h4. See Also * [#{{block-jroute}}] |
| * [#{{set-origin-server}}] |
| * [{{set-origin-server}}|Route#rout1] |
h3. {{forward-keysize}} {anchor:obj21} |
... The {{forward-keysize}} function instructs the server to forward the size of the client’s SSL/TLS key to remote servers. h4. Parameters The following table describes parameters for the {{forward-keysize}} function. Table 7-53 {{forward-keysize}} Parameters ||Parameter ||Description || |{{hdr}} |(Optional) Name of the HTTP request header used to communicate the size of the client’s SSL/TLS key. The default value is {{Proxy-keysize}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. See Also [#{{block-keysize}}] h3. {{forward-proxy-agent}} {anchor:obj22} The {{forward-proxy-agent}} function instructs the server to forward its version information to remote servers. h4. Parameters The following table describes parameters for the {{forward-proxy-agent}} function. Table 7-54 {{forward-proxy-agent}} Parameters ||Parameter ||Description || |{{hdr}} |(Optional) Name of the HTTP request header used to communicate server version. The default value is {{Proxy-agent}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. See Also * [#{{block-proxy-agent}}] * [#{{http-client-config}}] h3. {{forward-proxy-auth}} {anchor:obj23} The {{forward-proxy-auth}} instructs the server to forward the client’s proxy authentication credentials, that is, the client’s Proxy-authorization HTTP request header to remote servers. h4. Parameters The following table describes parameter for the {{forward-proxy-auth}} function. Table 7-55 {{forward-proxy-auth}} Parameter ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="forward-proxy-auth" {code} h4. See Also [#{{block-proxy-auth}}] h3. {{forward-secret-keysize}} {anchor:obj24} The {{forward-secret-keysize}} function instructs the server to forward the size of the client’s SSL/TLS secret key to remote servers. h4. Parameters The following table describes parameters for the {{forward-secret-keysize}} function. Table 7-56 {{forward-secret-keysize}} Parameters ||Parameter ||Description || |{{hdr}} |(Optional) Name of the HTTP request header used to communicate the size of the client’s SSL/TLS secret key. The default value is {{Proxy-secret-keysize}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. See Also [#{{block-secret-keysize}}] h3. {{forward-ssl-id}} {anchor:obj25} The {{forward-ssl-id}} function instructs the server to forward the client’s SSL/TLS session ID to remote servers. h4. Parameter The following table describes parameters for the {{forward-ssl-id}} function. Table 7-57 {{forward-ssl-id}} Parameters ||Parameter ||Description || |{{hdr}} |(Optional) Name of the HTTP request header used to communicate the client’s SSL/TLS session ID. The default value is {{Proxy-ssl-id}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. See Also [#{{block-ssl-id}}] h3. {{forward-user-dn}} {anchor:obj26} The {{forward-user-dn}} function instructs the server to forward the distinguished name of the subject of the client’s SSL/TLS certificate to remote servers. h4. Parameters The following table describes parameters for the {{forward-user-dn}} function. Table 7-58 {{forward-user-dn}} Parameters ||Parameter ||Description || |{{hdr}} |(Optional) Name of the HTTP request header used to communicate the distinguished name of the subject of the client’s SSL/TLS certificate. The default value is {{Proxy-user-dn}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. See Also [#{{block-user-dn}}] h3. {{forward-via}} {anchor:obj27} The {{forward-via}} function instructs the server to forward information about request routing to remote servers using the HTTP/1.1 {{Via}} format. The HTTP/1.1 {{Via}} header field records the proxy servers and protocol versions that were involved in routing a request. h4. Parameters The following table describes parameters for the {{forward-via}} function. Table 7-59 {{forward-via}} Parameters ||Parameter ||Description || |{{hdr}} |(Optional) Name of the HTTP request header used to communicate routing information. The default value is {{Via}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. See Also [#{{block-via}}] h3. {{http-client-config}} {anchor:obj28} The {{http-client-config}} function configures the server’s HTTP client. h4. Parameters The following table describes parameters for the {{http-client-config}} function. Table 7-60 {{http-client-config}} Parameters ||Parameter ||Description || |{{keep-alive}} |(Optional) Indicates whether the HTTP client should attempt to use persistent connections. The default value is {{true}}. | |{{keep-alive-timeout}} |(Optional) The maximum number of seconds to keep a persistent connection open. The default is value is {{29}}. | |{{always-use-keep-alive}} |(Optional) Indicates whether the HTTP client can reuse existing persistent connections for all types of requests. The default value is {{false}} indicating that persistent connections will not be reused for non-GET requests or for requests with a body. | |{{protocol}} |(Optional) HTTP protocol version string. By default, the HTTP client uses either {{HTTP/1.0}} or {{HTTP/1.1}} based on the contents of the HTTP request. In general, you should not use the protocol parameter unless you encounter specific protocol interoperability problems. | |{{proxy-agent}} |(Optional) Value of the proxy-agent HTTP request header. The default is a string that contains the web server product name and version. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="http-client-config" keep-alive="false" {code} h3. {{set-basic-auth}} {anchor:obj29} The {{set-basic-auth}} function sets the HTTP basic authentication credentials used by the server when it sends an HTTP request. Use {{set-basic-auth}} to authenticate to a remote origin server or proxy server. h4. Parameters The following table describes parameters for the {{set-basic-auth}} function. Table 7-61 {{set-basic-auth}} Parameters ||Parameter ||Description || |{{user}} |Name of the user to authenticate. | |{{password}} |Password of the user to authenticate. | |{{hdr}} |(Optional) Name of the HTTP request header used to communicate the credentials. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="set-basic-auth" user="admin" password="secret" hdr="proxy-authorization" {code} h4. See Also * [#{{ssl-client-config}}] * [#{{block-auth-cert}}] * [#{{forward-auth-cert}}] * [#{{block-proxy-auth}}] * [#{{forward-proxy-auth}}] h3. {{set-cache-control}} {anchor:obj30} The {{set-cache-control}} function allows you to specify the HTTP caching policy for the response being sent back to the client. h4. Parameters The following table describes parameters for the {{set-cache-control}} function. Table 7-62 {{set-cache-control}} Parameters ||Parameter ||Description || |{{control}} |HTTP cache control directives. Separate multiple directives by commas. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | The following table describes some of the useful cache control directives defined by the HTTP/1.1 protocol. Table 7-63 Cache Control Directives ||Directive ||Description || |{{public}} |The response may be cached by any cache. | |{{private}} |The response must not be cached by a shared cache (for example, a proxy server). | |{{no-cache}} |Clients must ask the server for updated content on each access. | |{{max-age=}}_n_ |The response should not be cached for more than _n_ seconds. | h4. Example {code} ObjectType fn="set-cache-control" control="private,max-age=60" {code} h3. {{set-cookie}} {anchor:obj31} The {{set-cookie}} function allows you to set a cookie in the response being sent back to the client. h4. Parameters The following table describes parameters for the {{set-cookie}} function. Table 7-64 {{set-cookie}} Parameters ||Parameter ||Description || |{{name}} |Name of the cookie. | |{{value}} |(Optional) Value of the cookie. The default value is {{null}}. | |{{path}} |(Optional) Base URI to which the cookie applies. The default value is {{/}} (slash). | |{{domain}} |(Optional) The domain name of servers to which the cookie must be sent. If no domain is specified, web browsers send the cookie only to the server that sets the cookie. | |{{max-age}} |(Optional) Maximum time (in seconds) after which the cookie expires. If {{max-age}} is not specified, web browsers delete the cookie when the user closes the web browser. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} <If not defined $cookie{'FIRSTVISITTIME'}> ObjectType fn="set-cookie" name="FIRSTVISITTIME" value="$time" max-age="31536000" </If> {code} h3. {{set-default-type}} {anchor:obj32} The {{set-default-type}} function allows you to define a default {{charset}}, {{content-encoding}}, and {{content-language}} for the response being sent back to the client. If the {{charset}}, {{content-encoding}}, and {{content-language}} are not set for a response, then just before the headers are sent the defaults defined by {{set-default-type}} are used. By placing this function in different objects in {{obj.conf}}, you can define different defaults for different parts of the document tree. h4. Parameters The following table describes parameters for the {{set-default-type}} function. Table 7-65 {{set-default-type}} Parameters ||Parameter ||Description || |{{enc}} |(Optional) Encoding assigned to a matching request (the {{Content-Encoding}} header). | |{{lang}} |(Optional) Language assigned to a matching request (the {{Content-Language}} header). | |{{charset}} |(Optional) Character set for the {{magnus-charset}} parameter in {{rq->srvhdrs}}. If a browser sends the {{Accept-Charset}} header or its {{User-Agent}} is Mozilla/1.1 or newer, then append “{{; charset=}}_charset_” to {{Content-Type}}, where _charset_ is the value of the {{magnus-charset}} parameter in {{rq->srvhdrs}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="set-default-type" charset="iso_8859-1" {code} h3. {{shtml-hacktype}} {anchor:obj33} The {{shtml-hacktype}} function changes the {{Content-Type}} of any {{.htm}} or {{.html}} file to {{magnus-internal/parsed-html}} and returns {{REQ_PROCEED}}. This provides backward compatibility with server-side includes for files with {{.htm}} or {{.html}} extensions. The function may also check the execute bit for the file on UNIX systems. The use of this function is not recommended. h4. Parameters The following table describes parameters for the {{shtml-hacktype}} function. Table 7-66 {{shtml-hacktype}} Parameters ||Parameter ||Description || |{{exec-hack}} |(Optional, UNIX only) Instructs the function to change the {{Content-Type}} only if the execute bit is enabled. The value of the parameter is not important, but the parameter should be provided. The value can be {{true}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="shtml-hacktyp"e exec-hack="true" {code} h3. {{ssl-client-config}} {anchor:obj34} The {{ssl-client-config}} function configures options used when the server connects to a remote server using SSL/TLS. h4. Parameter The following table describes parameters for the {{ssl-client-config}} function. Table 7-67 {{ssl-client-config}} Parameters ||Parameter ||Description || |{{client-cert-nickname}} |(Optional) Nickname of the client certificate to present to the remote server. The default is not to present a client certificate. | |{{validate-server-cert}} |(Optional) Boolean that indicates whether the server validates the certificate presented by the remote server. The default value is {{true}}, indicating that remote servers must present valid certificates that were issued by a trusted certificate authority. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="ssl-client-config" validate-server-cert="false" {code} h4. See Also * [#{{set-basic-auth}}] * [#{{block-auth-cert}}] * [#{{forward-auth-cert}}] * [#{{block-proxy-auth}}] * [#{{forward-proxy-auth}}] h3. {{type-by-exp}} {anchor:obj35} The {{type-by-exp}} function matches the current path with a wildcard expression. If they match, the {{type}} parameter information is applied to the file. This is the same as {{type-by-extension}}, except that you use wildcard patterns for the files or directories specified in the URLs. h4. Parameters The following table describes parameters for the {{type-by-exp}} function. Table 7-68 {{type-by-exp}} Parameters ||Parameter ||Description || |{{exp}} |Wildcard pattern of paths for which this function is applied. | |{{type}} |(Optional) Type assigned to a matching request (the {{Content-Type}} header). | |{{enc}} |(Optional) Encoding assigned to a matching request (the {{Content-Encoding}} header). | |{{lang}} |(Optional) Language assigned to a matching request (the {{Content-Language}} header). | |{{charset}} |(Optional) The character set for the {{magnus-charset}} parameter in {{rq->srvhdrs}}. If a browser sends the {{Accept-Charset}} header or its {{User-Agent}} is Mozilla/1.1 or newer, then append “{{; charset=}}_charset_” to {{Content-Type}}, where _charset_ is the value of the {{magnus-charset}} parameter in {{rq->srvhdrs}}. | |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="type-by-exp" exp="*.test" type="application/html" {code} h4. See Also * [#{{type-by-extension}}] * [#{{force-type}}] h3. {{type-by-extension}} {anchor:obj36} The {{type-by-extension}} function instructs the server to look in a table of MIME type mappings to find the MIME type of the requested resource. The MIME type is added to the {{Content-Type}} header that is sent back to the client. The table of MIME type mappings is created by a {{mime-file}} element in the {{server.xml}} file, which loads a MIME types file or list and creates the mappings. For example, the following two lines are part of a MIME types file: {code} type=text/html exts=htm,html type=text/plain exts=txt {code} If the extension of the requested resource is {{htm}} or {{html}}, the {{type-by-extension}} file sets the type to {{text/html}}. If the extension is {{.txt}}, the function sets the type to {{text/plain}}. h4. Parameters The following table describes parameters for the {{type-by-extension}} function. Table 7-69 {{type-by-extension}} Parameters ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="type-by-extension" {code} |
| h4. See Also * [#{{type-by-exp}}] |
| * [#{{mime-file}}] |
| * [{{mime-file}}|M#m2] |
| * [#{{force-type}}] |
... h3. {{type-j2ee}} {anchor:obj37} The {{type-j2ee}} function sets the {{Content-Type}} for requests that map to resources in a Java web application. When configuring the server to host Servlet or JSP-based web applications, {{type-j2ee}} must be the first {{ObjectType}} SAF in {{obj.conf}}. This is to ensure that {{web.xml}} MIME type mappings take precedence over the default MIME type mappings. h4. Parameters The following table describes parameter for the {{type-j2ee}} function. Table 7-70 {{type-j2ee}} Parameter ||Parameter ||Description || |{{bucket}} |(Optional) Common to all {{obj.conf}} functions. Adds a bucket to monitor performance. For more information, see [The {{bucket}} Parameter|The bucket Parameter#b1]. | h4. Example {code} ObjectType fn="type-j2ee" {code} |
h4. See Also |
| * [#{{ntrans-j2ee}}] * [#{{service-j2ee}}] * [#{{error-j2ee}}] * [#{{find-index-j2ee}}] |
| * [{{ntrans-j2ee}}|NameTrans#name6] * [{{service-j2ee}}|Service#serv21] * [{{error-j2ee}}|Error#err1] * [{{find-index-j2ee}}|PathCheck#path6] |