ObjectType Stage
78
Netscape Enterprise Server NSAPI Programmer’s Guide • April 2002 (Draft)
ObjectType Stage
ObjectType
directives determine the MIME type of the file to send to the client in
response to a request. MIME attributes currently sent are
type
,
encoding
, and
language
. The MIME type sent to the client as the value of the
content-type
header.
ObjectType
directives also set the
type
parameter, which is used by
Service
directives to determine how to process the request according to what kind of
content is being requested.
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.
The
obj.conf
file almost always has an
ObjectType
directive that calls the
type-by-extension
function. This function instructs the server to look in a
particular file (the MIME types file) to deduce the content type from the extension
of the requested resource.
The following
ObjectType
-class functions are described in detail in this section:
•
force-type
sets the content-type header for the response to a specific type.
•
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.
Summary of Contents for ENTERPRISE SERVER 6.1
Page 1: ...NSAPI Programmer s Guide Netscape Enterprise Server Version6 1 April 2002 Draft...
Page 290: ...Miscellaneous 290 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 318: ...cinfo 318 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 336: ...Buffered Streams 336 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 344: ...344 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 350: ...350 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 356: ...356 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...