This section primarily describes server-specific characteristics of the
POST and PUT methods. Kludges
support the creation of directories, and deletion of files and directories.
3.1 - GET Method
Of course, the GET method is used to access documents supplied by the
server. There is nothing WASD server-specific about this method.
3.2 - POST, PUT Methods
The WASD HTTPd does not differentiate between POST and PUT methods, both are handled identically.
In environments where authentication and authorization are enabled these
methods can be used to upload data to both CGI scripts and the server.
The handling of POST and PUT by scripts is script-specific, see
9 - HTTPd Scripting.
3.2.1 - File Creation/Upload
The WASD HTTPd itself will accept POST and PUT data, creating a file corresponding to the specified path. The data stream may be text or binary.
Processing is according to MIME content type:
The server specially processes ``application/x-www-form-urlencoded'' POSTS (i.e. those generated by <FORM>...</FORM>, allowing files to be created directly from HTML forms. The processing eliminates any field names from the URL-encoded data stream, placing only field values into the file. This capability can be quite useful and is demonstrated in the Update HTTPd module (UPD.C).
This server can process a request body according to RFC-1867, ``Form-based File Upload in HTML''. As yet it is not a full implementation. It will not process "multipart/mixed" subsections. The implementation is basic, providing a facility to allow the upload of a file into the server administered file system. The ACTION= parameter of the <FORM> tag must specify the directory (as a URL path) in which the uploaded file will be created.
The following example HTML illustrates how a form may be used to upload a file from the browser host file system:
<FORM METHOD=POST ACTION="/web/directory/" ENCTYPE="multipart/form-data"> <INPUT TYPE=submit VALUE=" Upload document ... "> <INPUT TYPE=file SIZE=50 NAME=uploadfile> </FORM>
Again, the Update module (UPD.C) illustrates the use of this facility.
NOTE: This capability has only been tested against Netscape Navigator versions 2 and 3. VMS Netscape Navigator 3.0b5 hangs if an upload of a variable-record format file is attempted. Stick to STREAM-LF or fixed, or convert the file to STREAM-LF.
Text file created according to the path, VMS record type is STREAM-LF.
Any other MIME type is considered binary and the created file is made an UNDEFINED record type.
A directory will be created by the HTTPd if a directory path is provided with the POST or PUT methods. For example:
/dir1/dir2/dir-to-be-created/
A file will be deleted by the HTTPd if the file path ending with a wildard version specification is provided with the POST or PUT methods. For example:
/dir1/dir2/file-to-be.deleted;*
A directory will be deleted by the HTTPd if a directory path ending with a wildard version specification is provided with the POST or PUT methods. For example:
/dir1/dir2/dir-to-be-deleted/;*
The DELETE method should delete the file or directory corresponding to the supplied path.