Example

See Also

force-type

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.

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.

See Also

forward-jroute

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.

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.

See Also

forward-via

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.

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.

See Also

http-client-config

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 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.

Example

ObjectType fn="http-client-config" keep-alive="false"

set-basic-auth

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.

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.

Example

set-default-type

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.

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.

Example

ObjectType fn="set-default-type" charset="iso_8859-1"

shtml-hacktype

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.

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.

Example

ObjectType fn="shtml-hacktyp"e exec-hack="true"

ssl-client-config

The ssl-client-config function configures options
used when the server connects to a remote server using SSL/TLS.

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.

Example

ObjectType fn="ssl-client-config" validate-server-cert="false"

See Also

type-by-exp

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.

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.

Example

ObjectType fn="type-by-exp" exp="*.test" type="application/html"

See Also

type-by-extension

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:

type=text/html exts=htm,html
type=text/plain exts=txt

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.

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.

Example

ObjectType fn="type-by-extension"

See Also

type-j2ee

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.

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.