Re: [spr26405] publish-multi proposal

John Foderaro <[email protected]> Wed, 17 Jul 2002 10:14:20 -0700
Newsgroups gmane.lisp.open-source.franz
Message-ID <[email protected]>



 The response functions for a request sends not only content
but also http headers back to the client.

 The macros with-http-response and with-http-body do
the work of sending the headers at the right time.

  with-http-response and with-http-body must be called *exactly once*
in any function that responds to a request.   This means that it's
wrong to include one response function inside another response
function as that will cause with-http-response and with-http-body
to be called more than once.

In this case you propose:

    (publish
        :path "/respath"
        :function ...)

    (publish-multi
        :path "/multipath"
        :items (list "somefile.html"
                           '(:path "/respath")
                            "somefile2.html"))


what you should do is extract the part of the "/resppath" responder
function that just sends the data to the html stream and share
that code in the "/respath" function and in the "/multipath" function.



>> I have also noticed that publish-multi doesn't work with files.  

If you think you've got a bug, then please send a test case that 
demonstrates the bug.  That's much easier than my trying
to figure out what you mean from an English description.