Re: [spr26453] internal server error

John Foderaro <[email protected]> Mon, 29 Jul 2002 07:50:50 -0700
Newsgroups gmane.lisp.open-source.franz
Message-ID <[email protected]>
 When an error occurs it's not known what has already been sent 
through the socket to the browser.   
Errors in response functions often occur inside
a with-http-body which means that the response value and headers
have already been sent to the client.  Once you've sent one response
code you can't undo it and sent another instead.

 Web site authors should be aware of which response functions 
could signal errors rather than complete.  For example if a 
response function uses a database then there's a chance 
that that database will be unreachable or will return an 
error for some query.  In that case
it's good design to access the database before doing with-http-body.  
That way if a database error occurs your code can catch it and set 
the appropriate http response code before the with-http-body starts.