How to set http status 404 ?

Posted on
  • Using response.setHead(404) :

    • response.code is set to 404
    • in response.dSnd we still see 200
  • You mean writeHead? Could it be because you wrote a response before you called it?

  • Yes, thats the reason.
    Thanks for quick answer
    time to goto bed now

  • No problem. It could probably do with an exception thrown in there. I'll file a bug for it

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

How to set http status 404 ?

Posted by Avatar for JumJum @JumJum

Actions