From 52036a75ade73274f59c6909c56b419afaa91f6b Mon Sep 17 00:00:00 2001 From: sperber Date: Mon, 26 Aug 2002 15:15:02 +0000 Subject: [PATCH] Revive comment section from older version. --- scheme/httpd/handlers.scm | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/scheme/httpd/handlers.scm b/scheme/httpd/handlers.scm index dac0019..e8b62cc 100644 --- a/scheme/httpd/handlers.scm +++ b/scheme/httpd/handlers.scm @@ -1,4 +1,36 @@ -;; Request-handlers for scheme web server +;;; http server in the Scheme Shell -*- Scheme -*- + +;;; This file is part of the Scheme Untergrund Networking package. + +;;; Copyright (c) 1995 by Olin Shivers. +;;; Copyright (c) 1996-2002 by Mike Sperber. +;;; Copyright (c) 2002 by Andreas Bernauer. +;;; For copyright information, see the file COPYING which comes with +;;; the distribution. + +;;; Path handlers +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Path handlers are the guys that actually perform the requested operation +;;; on the URL. The handler interface is +;;; (handler path-list request) +;;; The path-list is a URL path list that is a suffix of REQUEST's url's +;;; path-list. Path handlers can decide how to handle an operation by +;;; recursively keying off of the elements in path-list. +;;; +;;; The object-oriented view: +;;; One way to look at this is to think of the request's METHOD as a +;;; generic operation on the URL. Recursive path handlers do method +;;; lookup to determine how to implement a given operation on a particular +;;; path. +;;; +;;; The REQUEST is a request record, as defined in httpd-core.scm, containing +;;; the details of the client request. However, path handlers should *not* +;;; read the request entity from, or write the reply to the request's socket. +;;; Path-handler I/O should be done on the current i/o ports: if the handler +;;; needs to read an entity, it should read it from (CURRENT-INPUT-PORT); when +;;; the handler wishes to write a reply, it should write it to +;;; (CURRENT-OUTPUT-PORT). This makes it easy for the procedure that called +;;; the handler to establish I/O indirections or filters if it so desires. ;; general request-handler-combinator: ;; predicate: path x request --> boolean