Throwing 500 instead of 404 #5

Open
markhuge opened this Issue Aug 19, 2012 · 0 comments

Projects

None yet

1 participant

@markhuge

Versions

Installed (locally) with npm

  • node 0.8.7
  • stack 0.1.0
  • creationix 0.3.1
  • wheat 0.2.6

Issue

Requesting: localhost:8080/foo throws a 500 response code and tries to open .markdown
Requesting localhost:8080_//_foo throws a 400 response code

mark@dev:~/Build/Scratch node howtonode.org/server/server.js 
GET / 200 Content-Type=text/html; charset=utf-8 Content-Length=24463
GET /style.css 200 Content-Type=text/css Content-Length=11143
GET /logo.png 200 Content-Type=image/png Content-Length=6076
GET /groovepaper.png 200 Content-Type=image/png Content-Length=40723
GET /print.css 200 Content-Type=text/css Content-Length=248
Error: ENOENT, open '/Users/mark/Build/Scratch/howtonode.org/articles/foo.markdown'
GET /foo 500 Content-Type=text/plain
GET //foo 404 Content-Type=text/plain

Reproduced on Linux and OS X

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment