dantebronto / picard

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

Error: Cannot read property 'length' of undefined #15

Closed crittermike closed 13 years ago

crittermike commented 13 years ago

When running many of the example apps, and then opening up localhost:9900 in the browser, I get the following error in the console (sometimes the page in the browser works as expected, sometimes I get nothing):

mcrittenden@freshbook:~/Desktop/picard/examples/async$ node app.js 
Starting in production mode.
Picard boldly goes on port 9900...
GET / 404
This type of response MUST NOT have a body. Ignoring write() calls.
HEAD / 500
TypeError: Cannot read property 'length' of undefined
    at Object.executeCallback (/home/mcrittenden/Desktop/picard/lib/picard/routing.js:28:34)
    at IncomingMessage.pass (/home/mcrittenden/Desktop/picard/lib/picard/request.js:117:14)
    at IncomingMessage.emit (events.js:39:17)
    at HTTPParser.onMessageComplete (http.js:109:23)
    at Socket.ondata (http.js:787:22)
    at Socket._onReadable (net.js:623:27)
    at IOWatcher.onReadable [as callback] (net.js:156:10)
dantebronto commented 13 years ago

Good catch, HEAD is now supported properly.

crittermike commented 13 years ago

Thanks. Follow up issue: https://github.com/dantebronto/picard/issues#issue/16