dantebronto / picard

A Micro-framework for node.js
216 stars 12 forks source link

no response when status set to 500 #13

Closed danieldkim closed 14 years ago

danieldkim commented 14 years ago

when i call request.on_screen() with a scope that has a template and a status of 500, the browser hangs and never receives a response from the server. problem seems to have to do with these lines in the on_screen() method:

if ( scope.status == 500 )
  req.send_data(scope) 

looking at the send_data() method, the first line is this:

if( !scope.body ) return

which implies that the body must be set manually and templates cannot be used with a 500 response?