Writing DOS POST Scripts


Introduction

The POST method offers a way for the client browser to send data to the server. The most common use of POST is in handling the data that is entered in a Mosaic form and submitted to the server for action. For more information, see Mosaic Form Support.

When a POST query is received, the REQUEST_METHOD environment variable is set to POST, and httpd creates three environment variables that are not otherwise present:

  CONTENT_TYPE=application/x-www-form-urlencoded
  CONTENT_LENGTH=nnnn
  CONTENT_FILE=C:\TEMP\HSXXXXXX.INP
CONTENT_LENGTH is set to exactly the number of bytes in the content file. The CONTENT_TYPE is as shown for Mosaic form output. Other types may apppear in the future.

Example: Put your complaints into the space provided below, then click Submit.

As other browsers and applications that submit POST requests become available, this section will be expanded. For now, refer to the above Forms document. It contains 12 live examples of POST forms using your Windows httpd. The script(s) used on the back end are included as part of the kit.

Return to the Scripting Overview


Robert B. Denny <rdenny@netcom.com>