[tbnl-devel] recompute-request-parameters

Mac Chan emailmac at gmail.com
Fri Oct 28 01:26:02 UTC 2005


Hi,

I'm looking at parameter-test in the test.lisp examples. One thing I
don't understand is, why do we have to recompute it in user code,
instead of determining the correct content-type in initialize-instance
:after and do the right thing there?

Maybe there's a reason behind this?

Thanks,
-- Mac


(defun parameter-test (&key (method :get) (charset :iso-8859-1))
.......
  (recompute-request-parameters :external-format (case charset
                                                   (:iso-8859-1 +latin-1+)
                                                   (:utf-8 +utf-8+)))


(defmethod initialize-instance :after ((request request) &rest init-args)
........
      (setq post-parameters
........
                          (form-url-encoded-list-to-alist ;; *** we
can examine headers here and pass the correct content type to
form-url-encoded-list-to-alist

(defun form-url-encoded-list-to-alist (form-url-encoded-list &optional
(external-format *tbnl-default-external-format*))



More information about the Tbnl-devel mailing list