[Lisppaste-cvs] CVS update: lisppaste2/web-server.lisp
Brian Mastenbrook
bmastenbrook at common-lisp.net
Tue Nov 11 14:42:04 UTC 2003
Update of /project/lisppaste/cvsroot/lisppaste2
In directory common-lisp.net:/tmp/cvs-serv9594
Modified Files:
web-server.lisp
Log Message:
Use strings instead of symbols for names of form fields, and use with-slots
Date: Tue Nov 11 09:42:04 2003
Author: bmastenbrook
Index: lisppaste2/web-server.lisp
diff -u lisppaste2/web-server.lisp:1.6 lisppaste2/web-server.lisp:1.7
--- lisppaste2/web-server.lisp:1.6 Tue Nov 11 09:39:24 2003
+++ lisppaste2/web-server.lisp Tue Nov 11 09:42:03 2003
@@ -1,4 +1,4 @@
-;;;; $Id: web-server.lisp,v 1.6 2003/11/11 14:39:24 eenge Exp $
+;;;; $Id: web-server.lisp,v 1.7 2003/11/11 14:42:03 bmastenbrook Exp $
;;;; $Source: /project/lisppaste/cvsroot/lisppaste2/web-server.lisp,v $
;;;; See the LICENSE file for licensing information.
@@ -46,27 +46,25 @@
(table
(tr
(th "Enter your username:")
- (td ((input :type text :name username))))
+ (td ((input :type text :name "username"))))
(tr
(th "Enter a title:")
- (td ((input :type text :name title))))
+ (td ((input :type text :name "title"))))
(tr
((th :valign top) "Enter your paste:")
- (td ((textarea :rows 24 :cols 80 :name text))))
+ (td ((textarea :rows 24 :cols 80 :name "text"))))
(tr
((td :colspan 2) ((input :type submit))))
(tr
((td :colspan 2) ((input :type reset))))))))))
(defmethod araneida:handle-request-response ((handler submit-paste-handler) method request)
- (setf (username handler) (araneida:body-param "USERNAME" (araneida:request-body request))
- (title handler) (araneida:body-param "TITLE" (araneida:request-body request))
- (text handler) (araneida:body-param "TEXT" (araneida:request-body request)))
+ (setf (username handler) (araneida:body-param "username" (araneida:request-body request))
+ (title handler) (araneida:body-param "title" (araneida:request-body request))
+ (text handler) (araneida:body-param "text" (araneida:request-body request)))
(araneida:request-send-headers request)
- (let ((username (username handler))
- (title (title handler))
- (text (text handler)))
+ (with-slots (username title text) handler
(cond
((zerop (length username))
(new-paste-form request "Please enter your username."))
More information about the Lisppaste-cvs
mailing list