ObjectType Stage
Chapter
3
Predefined SAFs and the Request Handling Process
75
•
set-default-type
allows you to define a default
charset
,
content-encoding
, and
content-language
for the response being sent back
to the client.
•
shtml-hacktype
requests that
.htm
and
.html
files are parsed for
server-parsed html commands.
•
type-by-exp
sets the content-type header for the response based on the
requested path.
•
type-by-extension
sets the content-type header for the response based on the
files extension and the MIME types database.
force-type
Applicable in
ObjectType
-class directives.
The
force-type
function assigns a type to requests that do not already have a
MIME type. This is used to specify a default object type.
Make sure 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 first. If there is more than one
ObjectType
directive in an object, all
the directives are applied in the order they appear. 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 ones ignored.
Parameters
type
(optional) is the type assigned to a matching request (the
content-type
header).
enc
(optional) is the encoding assigned to a matching request (the
content-encoding
header).
lang
(optional) is the language assigned to a matching request (the
content-language
header).
charset
(optional) is the character set for the
magnus-charset
parameter in
rq->srvhdrs
. If the browser sent 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
Summary of Contents for ENTERPRISE SERVER 6.0
Page 1: ...NSAPI Programmer s Guide Netscape Enterprise Server Version6 0 November 2001...
Page 134: ...CGI to NSAPI Conversion 134 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...
Page 306: ...cinfo 306 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...
Page 312: ...Sample MIME Types File 312 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...
Page 324: ...Buffered Streams 324 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...
Page 332: ...332 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...
Page 340: ...340 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...
Page 346: ...346 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...
Page 352: ...352 Netscape Enterprise Server NSAPI Programmer s Guide November 2001...