WASD Hypertext Services - Environment Overview

[next] [previous] [contents] [full-page]

3 - Document Access and Specification

Arbitrary documents may not be accessed.

The server can only access files where the path is allowed according to a specified set of rules specified within the hypertext environment.

Documents must be read-accessable.

The server can only access files that are world readable, or that have an ACL specifically controlling access for "HTTP$SERVER", the server account.


3.1 - Document Content Type

Document (file) retrieval is initiated by providing the server with the file specification as a URL path. Server configuration determines the format in which the file is returned to the client. It may contain text or images immediately diplayable by the browser, or by a viewer external to the browser may be spawned. The server may automatically activate a script to provide a gateway to non-native information (see 2.1 - Auto-Scripting). The file type (extension) determines the content type by which the server returns (and/or interprets) the file.

The following table lists some of the current file types (as examples) and their associated MIME-style content type. HTML documents are presented layed-up according to the full HTML-capabilities of the browser. Plain-text documents are presented in a fixed-font format. Other types require an external viewer to be activated.

  .BKB        Bookreader document (BNU)   text/html, gateway script activated
  .BKS        Bookreader shelf (BNU)      text/html, gateway script activated
  .C          C source                    text/plain
  .COM        DCL procedure               text/plain
  .CONF       configuration file          text/plain
  .CPP        C++ source                  text/plain
  .DECW$BOOK  Bookreader document         text/html, gateway script activated
  .FOR        Fortran source              text/plain
  .GIF        GIF image                   image/gif
  .H          C header                    text/plain
  .HLB        VMS Help library            text/html, gateway script activated
  .HTML       HyperText Markup Language   text/html
  .HTM        HyperText Markup Language   text/html
  .JPG        JPEG image                  image/jpeg
  .LIS        Listing                     text/plain
  .MAR        Macro source                text/plain
  .MENU       Menu                        text/x-menu
  .MNU        Menu                        text/x-menu
  .PAS        Pascal source               text/plain
  .PRO        IDL source                  text/plain
  .PS         PostScript                  application/PostScript
  .TEXT       Text                        text/plain
  .TLB        VMS text library            text/html, gateway script activated
  .TXT        Text                        text/plain
  .SHTML      HyperText Markup Language   pre-processed text/html
  .SHT        HyperText Markup Language   pre-processed text/html
  .XBM        X bitmap                    image/x-xbitmap
  .ZIP        zipped file                 application/binary

If other file types are required to be defined contact the Web administrator.


3.2 - Explicitly Specifying Content-Type

When accessing files it is possible to explicitly specify the identifying content-type to be returned to the browser in the HTTP response header. Of course this does not change the actual content of the file, just the header content-type! This is primarily provided to allow access to plain-text documents that have obscure, non-"standard" or non-configured file extensions.

It could also be used for other purposes, "forcing" the browser to accept a particular file as a particular content-type. This can be useful if the extension is not configured (as mentioned above) or in the case where the file contains data of a known content-type but with an extension conflicting with an already configured extension specifying data of a different content-type.

Enter the file path into the browser's URL specification field ("Location:", "Address:"). Then, for plain-text, append the following query string:

  ?httpd=content&type=text/plain

For another content-type substitute it appropriately. For example, to retrieve a text file in binary (why I can't imagine :^) use

  ?httpd=content&type=application/octet-stream

This is an example:

  file.unknown

  file.unknown?httpd=content&type=text/plain

It is also posssible to "force" the content-type for all files in a particular directory. See 4.3.8 - Specifying Content-Type.


3.3 - Document Specification

For the "http:" protocol, file and directory locations are specified using URL path syntax where slash-separated ("/") elements delineate a hierarchy leading to a data item. Anyone familiar with the syntax of the Unix file system, or the MS-DOS file system (where back-slashes are hierarchy delimiters), will feel at home with URL syntax. Specifications under VMS are not case-sensitive.

A VMS directory specification

  WEB:[TECHNICAL.HTML-PRIMER]
would be represented in URL syntax as
  /web/technical/html-primer/
and a VMS file specification
  WEB:[TECHNICAL.HTML-PRIMER]HTML-PRIMER.HTML
represented as
  /web/technical/html-primer/html-primer.html
NOTE

It is not required (although not forbidden) to supply a VMS master file directory component ("[000000]", "[000000.", etc.) in a URL specification. Hence the file specification
  WEB:[000000]HOME.HTML
should be represented as
  /web/home.html


3.3.1 - Absolute File Path

A file may be specified using an absolute, or full path. This must specify the location of the file exactly. Absolute paths always begin with a forward-slash ("/"). For example:

  /web/committee/minutes/1994/1994-09-27.txt
  /web/committee/constitution.txt
  /web/committee/membership/fred-bloggs.txt


3.3.2 - Partial (or Relative) File Path

(Strictly speaking, it is a function of the client to construct a full URL from such a relative URL before sending the request to the server.)

A file may be specified relative to its current location. That is, a current document (or menu) may specify another document file relative to itself. This may be at the current level, a subdirectory, or in another part of the directory tree related to the current. Relative paths never begin with forward-slash ("/").

For example, documents at the same level as the current may be specified without any hierachy being indicated:

  1994-07-22.txt
  1994-08-24.txt
  1994-09-27.txt

Documents at an inferior point in the hierarchy may be specified as in the following example:

  1993/1993-02-17.txt
  1993/reports/membership.txt
  other/etc.txt

Documents in a related part of the hierarchy may be referenced using the "../" construct. As with MS-DOS and Unix this syntax indicates the immediately superior directory.

  ../other_committee/1993/1993-02-17.txt
  ../other_committee/1993/reports/balance-sheet.txt
  ../../other_section/committee/constitution.txt


[next] [previous] [contents] [full-page]