Skip to content

Throwing 500 instead of 404 #5

@markhuge

Description

@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions