[hunchentoot-devel] Hard to catch errors below process-request

AVS lispercat at gmail.com
Thu Jan 20 19:48:27 UTC 2011


The easiest I can think of is to put some garbage inside start-output
function (headers.lisp) and execute a request from any server running
on hunchentoot.
Let's say right after
    (when (stringp content)
      ;; if the content is a string, convert it to the proper external format
      (setf content (string-to-octets content :external-format
(reply-external-format*))))

put something like (/ 1 0) or (crazy-function a b).
I wonder if I can write a test case to isolate it more so you wouldn't
have to use your server code.

Thank you,
Andrei

On Thu, Jan 20, 2011 at 2:38 PM, Hans Hübner <hans.huebner at gmail.com> wrote:
> Andrei,
>
> can you provide us with a simple test case that exposes the unwanted
> behavior?  That'd make it easier for us to diagnose and maybe fix.
>
> Thanks,
> Hans
>
> On Thu, Jan 20, 2011 at 8:08 PM, AVS <lispercat at gmail.com> wrote:
>> Hi
>>
>> Recently I was trying to find out why the client received an empty response.
>> The problem was inside function start-output. Function call to
>> (string-to-octets content :external-format (reply-external-format*)
>> was throwing an exception (it was a non-latin character for latin
>> external-format) which I couldn't catch in debugger by setting
>> (setf hunchentoot:*handle-http-errors-p* nil)
>> (setf hunchentoot:*handle-http-errors-p* t)
>> (setf *catch-errors-p* nil)
>>
>> Actually inside start-output I can write any crazy code that would
>> fail to compile or throw an exception, but for some reason this error
>> never gets shown at any level.
>> Maybe I am just missing something that I can specify, or maybe it only
>> happens on my end (I am using hunchentoot 1.1.1 on Ubuntu) please let
>> me know.
>>
>> Thank you,
>> Andrei
>>
>> _______________________________________________
>> tbnl-devel site list
>> tbnl-devel at common-lisp.net
>> http://common-lisp.net/mailman/listinfo/tbnl-devel
>>
>
> _______________________________________________
> 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