What Does the Client Do with the MIME Type?
Appendix
B
MIME Types
309
For example, if the requested resource’s file extension is
.map
, the type is mapped
to
magnus-internal/imagemap
. If the extension is
.cgi,
.exe
, or
.bat
, the type is
set to
magnus-internal/cgi
:
If the
type
starts with
magnus-internal/
, the server executes whichever
Service
directive in
obj.conf
matches the specified type. For example, if the type is
magnus-internal/imagemap
, the server uses the
imagemap
function to generate
the response to the client, as indicated by the following directive:
Service method=(GET|HEAD) type=magnus-internal/imagemap fn=imagemap
If the type is
magnus-internal/servlet
, the server uses the
NSServletService
function to generate the response to the client, as indicated by the following
directive:
Service type="magnus-internal/servlet" fn="NSServletService"
What Does the Client Do with the MIME Type?
The
Service
function generates the data and sends it to the client that made the
request. When the server sends the data to the client, it also sends headers. These
headers include whichever MIME type attributes are known (which is usually
type
).
When the client receives the data, it uses the MIME type to decide what to do with
the data. For browser clients, the usual thing is to display the data in the browser
window.
If the requested resource cannot be displayed in a browser but needs to be handled
by another application, its
type
starts with
application/
, for example
application/octet-stream
(for
.bin
file extensions) or
application/x-maker
(for
.fm
file extensions). The client has its own set of user-editable mappings that
tells it which application to use to handle which types of data.
For example, if the type is
application/x-maker
, the client usually handles it by
opening Adobe FrameMaker to display the file.
type=magnus-internal/imagemap
exts=map
type=magnus-internal/cgi
exts=cgi,exe,bat
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...