/[guile]/guile/guile-www/main.scm
ViewVC logotype

Diff of /guile/guile-www/main.scm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by ttn, Sat Nov 17 01:54:05 2001 UTC revision 1.5 by ttn, Sat Apr 27 02:01:26 2002 UTC
# Line 1  Line 1 
1  ;;;; www/main.scm: General WWW navigation aids.  ;;; www/main.scm --- General WWW navigation aids.
2    
3  ;;;;    Copyright (C) 1997,2001 Free Software Foundation, Inc.  ;;      Copyright (C) 1997,2001,2002 Free Software Foundation, Inc.
4  ;;;;  ;;
5  ;;;; This program is free software; you can redistribute it and/or modify  ;; This program is free software; you can redistribute it and/or modify
6  ;;;; it under the terms of the GNU General Public License as published by  ;; it under the terms of the GNU General Public License as published by
7  ;;;; the Free Software Foundation; either version 2, or (at your option)  ;; the Free Software Foundation; either version 2, or (at your option)
8  ;;;; any later version.  ;; any later version.
9  ;;;;  ;;
10  ;;;; This program is distributed in the hope that it will be useful,  ;; This program is distributed in the hope that it will be useful,
11  ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of  ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12  ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  ;;;; GNU General Public License for more details.  ;; GNU General Public License for more details.
14  ;;;;  ;;
15  ;;;; You should have received a copy of the GNU General Public License  ;; You should have received a copy of the GNU General Public License
16  ;;;; along with this software; see the file COPYING.  If not, write to  ;; along with this software; see the file COPYING.  If not, write to
17  ;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,  ;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18  ;;;; Boston, MA 02111-1307 USA  ;; Boston, MA 02111-1307 USA
 ;;;;  
19    
20  ;;; Commentary:  ;;; Commentary:
21    
# Line 34  Line 33 
33  (define dispatch-table  (define dispatch-table
34    (acons 'http http:get '()))    (acons 'http http:get '()))
35    
36  ;;; (www:get URL)  ;; (www:get URL)
37  ;;;   parse a URL into portions, open a connection, and retrieve  ;;   parse a URL into portions, open a connection, and retrieve
38  ;;;   selected document  ;;   selected document
39    
40  (define-public (www:set-protocol-handler! proto handler)  (define-public (www:set-protocol-handler! proto handler)
41    (set! dispatch-table    (set! dispatch-table
# Line 47  Line 46 
46      ;; get handler for this protocol      ;; get handler for this protocol
47      (case (url:scheme url)      (case (url:scheme url)
48        ((http) (let ((msg (http:get url)))        ((http) (let ((msg (http:get url)))
49                    (http:message-body msg)))                  (http:message-body msg)))
50        (else        (else
51         (let ((handle (assq-ref dispatch-table (url:scheme url))))         (let ((handle (assq-ref dispatch-table (url:scheme url))))
52           (if handle           (if handle

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26