Download HTTP Server User Manual
Transcript
HTTP Server User Manual
•
HTYPE_RAW
This type is intended for data transfer from the F-Server to a computer without being
displayed in a web browser's window. Coming from the F-Server, a web browser will see
such resources as 'application/x-raw-stuff'. Browsers receiving a file of type 'application/xraw-stuff' should open a file-save dialogue and let the user save the content to disk.
•
HTYPE_JAVA_APPLET
If a file has this attribute, the F-Server constructs a 'Content-Type' which is 'application/xJava-applet;version=1.1.' A web browser needs this to activate its JAVA virtual machine
(if it has one). The subsequent data part must be a JAVA program.
•
HTYPE_INVALID
This is only an end marker of the enumeration and will never appear in the source code.
HTMLP_FILE
typedef struct _tag_HTMLP_FILE
{
UINT8_stx PTR rname;
HTMLP_TYPE type;
UINT8_stx PTR data;
UINT32_stx datasize;
} HTMLP_FILE;
This structure is used to describe a single resource (e.g. HTML page or picture).
When the client (web browser) requests a file, the F-Server searches an internal array of
HTMLP_FILE structures (by name compare) until it finds a matching one. The structure
holds all information necessary for the F-Server to identify, change and send a resource to
the client.
A HTMLP_FILE structure has the following members:
•
name
This member points to name of the file (e.g. web page or other resources). The name
must be a regular c-string including a terminating NULL-character.
If the site should appear in a structured tree-like manner, the name must have all
components of a path name. For example: If a browser sends 'GET
/peter/ebooks/manual.sxw', the name of the resource must be the full path
'/peter/ebooks/manual.sxw'<0>' (the <0> means a single zero after ...sxw). A start page
should have the name '/' because this is what web browsers send in an GET request,
when no explicit resource is requested.
•
type
File: webserver_manual_3_1.odt
Revision No.: 3.1
Page 21 / 42
printed 15/11/06
Public