HTTPServices are objects which are responsible for handling http requests.
They register themself at a server under a so called linkName (or multiple link names).
Typically, the linkname is the top-component of an URL path - for example "/foo".
For any incoming request, the http-server selects the service based on the requests URL
and forwards the request to the service, which has to generate a response
(typically, HTML, XML text or bitmap images).
Due to the historic evolution of the web server, there are two different schemes for service handling:
HTTPSelectorService
to support applications based in the PWS (pluggable web server) framework
which receive individual messages, based on a component in the URL
HTTPActionService
to support applications based on the Comanche framework
where a single processing method is invoked for all requests.
In order to allow for easy migration of applications based on these packages,
the ST/X webServer supports both schemes.
However, we think that the HTTPActionService scheme (single processing method)
is better and more flexible, and we therefore recommend using that for new applications.
HTTPSelectorService
HTTPSelectorServices must provide a list of allowed service selectors
and a default service selector.
For any incoming request, the URL component AFTER the linkName is extracted and taken
as a message selector. I.e. if the URL is "/foo/bar", the service registered under the
"/foo" linkName gets a "bar:" message.
If the URL is the linkName alone (i.e. no component after the linkName),
the default selector is used.
If a selector is not allowed, the server responds with an "Illegal Message" response.
HTTPActionService
HTTPActionServices will always receive a "process:" message, with the request as argument.
They are free to (and actually responsible for) interpreting the URL and dispatching to
any internal method.
Presents a list of available services (all subclasses of the HTTPService class).
Use the down arrow button to add the selected service to the server (i.e. to register).
Presents a list of all registered services for the server.
Every service has the following properties:
- Realm
Realm for authorization. If non-blank, the service can only be invoked by users which
authenticate themself as belonging to that realm (group).
If blank, everyone is allowed to invoke that service.
Be aware, that the HTTP protocol supports multiple authentication protocls which
differ in complexity and security. For critical applications, we highly recommend to
disable basic authentication, because it is *very* insecure and easy to attack.
- Allow Robots
Allow or disallow robots to access the service. If allowed, robots and crawlers
(such as google or other search engines) can access and index the pages of the service.
For highly dynamic and/or private services, we recommend to disallow robots.
The default is: disallow.
- Visible (in Home Page)
Set/Clear the visible in home page aspect of a service.
The ST/X home page service will only show links for services which have the visible attribute.
- Link Name(s)
The link name(s) under which the service is(are) registered.
Each link name has to started with a "/"-Character.
Linknames are not limited to the top in the URL hierarchy;
you can specify a deep path (such as "/foo/bar/baz") to include the service
below another service in the URL document tree.
Copyright © eXept Software AG, all rights reserved
Doc $Revision: 1.4 $ $Date: 1997/08/07 15:06:09 $