[hunchentoot-devel] Changes in (send-headers) ?

css css at swissjabber.ch
Wed Jan 28 11:37:02 UTC 2009


Hello.

I havent used hunchentoot for a while now, so I checked out the
svn-repository on http://bknr.net/svn/ediware/ (I hope this is the
correct one) and Installed the packages. The server seems to work, but
unfortunately, the following code seems not to do:

(defun http-seite ()
  (with-html-output (out (send-headers))
    (:html (:head (:title "Hallo-Welt-Seite"))
           (:body (:h1 "Hallo Welt")))))
(setf *dispatch-table* (list (create-prefix-dispatcher "/hallo-welt"
'http-seite)))
(defvar *server* (start-server :port 8000))

When calling http://localhost:8000/hallo-welt, I only get an empty
page. For any other URL, i get a "not found" error.

When defining the function differently, returning a string, say

(defun http-seite ()
  (with-html-output-to-string (bla)
    (:html (:head (:title "Hallo-Welt-Seite"))
           (:body (:h1 "Hallo Welt")))))

the whole thing works. Also the more trivial functions

(defun http-2 () (write-char #\A (send-headers)))

and

(defun http-2 () (write-char #\A (send-headers))
                  (finish-output (send-headers)))

do not produce any output. I read the included documentation, but it
seems like (send-headers) hasnt changed its meening according to it,
and also the code doesnt say anything else.

Any Ideas what I could be doing wrong?

Greetings
Christoph




More information about the Tbnl-devel mailing list