Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Well this thing has came to my head now, and can't find any info. I would like to know if it's possible to create custom HTTP errors, no custom pages, like 404 pages, I mean error codes. The idea came when I saw Slackware's Connie server although that may be a simple index page. Well that was my question, thanks :)

share|improve this question
add comment

3 Answers

up vote 0 down vote accepted

RFC 2616 describes all possible status and error codes. Everything else is not defined. And if it is not defined in the documentation how should a server and client react when they see such errors?

share|improve this answer
    
Thanks for the response! –  pmerino Aug 13 '11 at 10:06
    
Even if it is wrong. Read the paragraph after the status codes in the RFC. –  BillThor Aug 13 '11 at 16:31
add comment

Well, that page is just returning an error page with a 200 OK response, so it's nothing exciting. But there's nothing stopping you from returning a customer error code if you want, although it's not a particularly good idea unless you're only ever going to be returning it to your own custom clients that know what it means and how to deal with it. I also wouldn't be violating the standard conventions (2xx for success, 4xx for per-request errors, 5xx for server-side problems, etc)

share|improve this answer
    
Thanks to you as well! –  pmerino Aug 13 '11 at 10:06
add comment

The RFC clearly states the list of codes is extensible. The Value of the first digit is important. Unknown status codes are supposed to be treated as X00 where X is the first digit of the status code.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.