John Hampton wrote:

>> ===
>>   if error code is not 200:
>>     if error_handler for error_code:
>>        use error_handler
>>     else
>>        if CGI provide an error msg:
>>               use CGI error
>>        else
>>            use standard error response
>> ===
>>
>>   Does everybody agree?
>
> Looks correct to me.

  Ok, we agreed on that.. but I have change my mind O:-)

  I realized it would mess up the handler code, so I have chosen a new
  approach.  Now, you can use the ErrorHandler option inside a CGI
  handler to define you want it to manage the error codes by itself.
  It is clean, simple enough and self-explaining..

  For example:

===
  Directory /projects {
      Handler cgi {
          ErrorHandler on
      }
  }
===

  It is now committed and working:

  http://svn.0x50.org/change/89

  .. and here is the QA test to ensure it works:

  http://svn.0x50.org/file/cherokee/qa/112-NiceError-CGI.py


  Enjoy! :-)

--
Greetings, alo.
http://www.alobbs.com
_______________________________________________
Cherokee mailing list
Cherokee@lists.alobbs.com
http://www.alobbs.com/cgi-bin/mailman/listinfo/cherokee

Reply via email to