[Unetwork-cvs] CVS update: unetwork/src/http.lisp

Matthieu Villeneuve mvilleneuve at common-lisp.net
Wed Mar 24 11:32:27 UTC 2004


Update of /project/unetwork/cvsroot/unetwork/src
In directory common-lisp.net:/tmp/cvs-serv13568

Modified Files:
	http.lisp 
Log Message:
Fixed value order for HTTP-GET
Date: Wed Mar 24 06:32:26 2004
Author: mvilleneuve

Index: unetwork/src/http.lisp
diff -u unetwork/src/http.lisp:1.3 unetwork/src/http.lisp:1.4
--- unetwork/src/http.lisp:1.3	Tue Mar 23 08:02:21 2004
+++ unetwork/src/http.lisp	Wed Mar 24 06:32:25 2004
@@ -20,8 +20,8 @@
 
 (defgeneric http-get (uri)
   (:documentation "Get a resource designated by an URI. Returns two
-values: the request response code as an integer, and the resource as
-an instance of the DOCUMENT class."))
+values: the resource as an instance of the DOCUMENT class, and
+the request response code as an integer."))
 
 (defmethod http-get ((uri string))
   (http-get (parse-uri uri)))
@@ -55,10 +55,10 @@
       (http-open-connection uri method :request-headers request-headers)
     (unwind-protect
          (let ((content (http-read-content socket)))
-           (values response-code
-                   (make-instance 'document
+           (values (make-instance 'document
                                   :text content
-                                  :properties properties)))
+                                  :properties properties)
+                   response-code))
       (close-socket socket))))
 
 (defun http-read-response (socket)
@@ -96,11 +96,3 @@
 
 (defmethod close-connection ((connection http-connection))
   (close-socket (connection-socket connection)))
-
-#|
-(register-uri-input-stream-handler :http
-                                   (lambda (uri)
-                                     (http-open-connection uri "GET"))
-                                   (lambda (socket)
-                                     (socket-close socket)))
-|#
\ No newline at end of file





More information about the Unetwork-cvs mailing list