[hunchentoot-devel] Changes in (send-headers) ?
Edi Weitz
edi at agharta.de
Wed Jan 28 16:01:11 UTC 2009
Hi,
Unfortunately, the HTML documentation isn't always up to date in the
development version and even some of the docstrings might not be fully
correct anymore. In the case of send-headers, the docstring /is/
correct, though, although the change is hard to catch. The modified
sentence there is "returns a BINARY stream" instead of "returns a
stream". This is one of many changes that we did for performance
reasons. So, if you want to send text to this stream, you'll have to
wrap it with a flexi stream first.
HTH,
Edi.
On Wed, Jan 28, 2009 at 6:37 AM, css <css at swissjabber.ch> wrote:
> 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
>
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>
>
More information about the Tbnl-devel
mailing list