HTTPserver 2.1

Category / Domain : CommTools
SCOL Voy@ger Compatibility : V 3.0 or above
Update : 1999/03

Function

The HTTPSERVER module is a simple HTTP server used to share HTML documents on the World Wide Web ; it allows to access directly from a browser or from a link inside a Scol site using the IN/OUT module (either using fix IP adresses or obtaining them through the HTTP_SERVER which is very useful when changing IP for example).

A basic CGI application will soon be available via DMS queries. The server's configuration requires the following :

- A TCP port : 80 (by default) or 8080 (WWW server), however, it may be the case that either the server cannot be started, or users cannot connect :
ports lower than 1023 are often blocked by firewalls and/or the systems.
- A root directory for HTML documents : the server is referenced as ‘http://x.x.x.x’, where x.x.x.x represents the IP (the name of the machine can be used
if it is registered in the DNS directory) and each URL will be annexed in the document's root directory.
For example:‘http://x.x.x.x/my_documents/mondoc.html’ represents the file [root_directory]\my_documents\mondoc.html in the SCOL partition.

To process HTTP errors, the server can provide specific HTML pages referenced in the root directory in ‘/error/codexxx.html’. The most common HTTP error codes are :
* 400 Bad query
* 404 Page not found
* 501 Not implemented

The HTTPSERVER module includes a special filter used to create a valid URL from a simple HTTP path ; an action (url_in) and an event (url_out) are available. For example :
A client want to access to the "site/news.html" page but it does not know either the server IP nor its port number.
By linking a event to the url_in action with the HTTP path as parameter (for example "site/news.html"), the event will be triggered avec the full URL as parameter (for example "http://x.x.x.x[:port]/site/news.html"). Thus this event will be link to the openURL action of the InOut module.
Attention : the port number is added to the URL only if different from 80.

Configuration


Figure 1 : HTTPserver module Interface

(1) : Port => Used to specify the port (80 by default).

(2) : Root => Used to declare the HTTP root directory (sub-folder of the scol partition

Implementation

 

Action Function
module.event à HTTPserver.url_in

Gets an HTML file path from the server in the Root folder of the module (‘http://x.x.x.x’) and change it in URL (http:\\myIP\myfile.htm, for example)


Event Function
httpServer.url_out à module Action

Event giving the full URL (full path) (see above)


Zone Function Interface Assignment
None