Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
Python and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Lua, etc
 
3 digit HTTP status codes - what are they, which are most common, which should be a concern?

We often talk during web related course / course modules about the status codes that are returned by servers - but I don't think I've ever written up a (near?) complete list. They are all three digit codes, and they're grouped by hundreds - so 200 series code are success, 400 codes are requests that can't be met, etc. Here's the list:

Informational - 100 series
Continue - 100
Switch Protocol - 101

Success - 200 series
OK - 200
Created - 201
Accepted - 202
NonAuthoritative Information - 203
No Content - 204
Reset Content - 205
Partial Content - 206

Redirection - 300 series
Multiple Choice - 300
Moved Permanently - 301
Found - 302
See Other - 303
Not Modified - 304
Use Proxy - 305
Temporary Redirect - 307

Client Error - 400 series
Bad Request - 400
Unauthorized - 401
Payment Required - 402
Forbidden - 403
Not Found - 404
Method Not Allowed - 405
Not Acceptable - 406
Proxy Authentication Required - 407
Request TimeOut - 408
Conflict - 409
Gone - 410
Length Required - 411
Precondition Failed - 412
Request Entity Too Large - 413
Request URI Too Long - 414
Unsupported Media Type - 415
Requested Range Not Satisfiable - 416
Expectation Failed - 417

Server Error - 500 series
Internal Server Error - 500
Not Implemented - 501
Bad Gateway - 502
Service Unavailable - 503
Gateway TimeOut - 504
Version Not Supported - 505

other extension / non standard / no longer used codes listed at the end of this article

So - which are the important codes? As a web site provider, you want to take a very careful look at the 500 series codes as they indicate something potentially wrong with your web server. Anything more that 0.5% in the 400 series would worry me too, as that indcates that you may have users being (mis)lead into asking for pages that don't exist, or knocking on locked doors.

How can we analyse the relative number of access codes? I've written a ruby program (source code [here]) to look through server log files - defaulting to 100 days of data, and here are my results starting 1st June 2011:

  wizard:sep11 graham$ ./ruby_100
  200 - 96.04% 10750468
  206 -  0.06% 7033
  226 -  0.00% 8
  250 -  0.01% 1015
  301 -  0.12% 13330
  302 -  0.07% 7554
  304 -  1.70% 190774
  400 -  0.01% 965
  403 -  0.60% 67093
  404 -  1.38% 154432
  405 -  0.00% 17
  408 -  0.01% 759
  416 -  0.00% 8
  500 -  0.01% 642
  111941 accesses per day
  4664.2 accesses per hour
  77.74 accesses per minute
  wizard:sep11 graham$


Studious readers will note that we have very many code 403 and 404 codes than I said were acceptable just up above. This is because our web server is actually programmed to return these codes to certain intrusion attempts in the (perhaps vain) hope that those intrusion attempts will think there's nothing there and give up. Easy enough to do, but it does mean that my figures here need a little more careful reading than you might have expected.

Status codes covered in the web sections of many courses. They're particularly mentioned and used on the Deploying LAMP, Deploying Apache / Tomcat and PHP courses. A little ironically, the sample program that I've used here comes as a follow up from last week's Ruby course.





The following extra codes may be seen very occasioanlly. Most of them are module / vendor specific extensions, and / or no longer used. Code 418 was an April Fool's joke ... RFC 2324, the Hyper Text Coffee Pot Control Protocol - [see here].

Processing - 102
Checkpoint - 103
Request URI too long - 122
Multi-Status - 207
IM Used - 226
Switch Proxy - 306
Resume Incomplete - 308
I'm a Teapot - 418
Unprocessable Entity - 422
Locked - 423
Faild dependency - 424
Unordered Collection - 425
Upgrade Required - 426
No Response - 444
Retry With - 449
Blocked by Windows Parental Control - 450
Client Closed Request - 499
Varient also negotiates - 506
Insufficient storage - 507
Bandwidth limit exceeded - 509
Not extended - 510
(written 2011-09-11)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
A207 - Web Application Deployment - HTTP
  [2918] Downloading a report from the web for further local analysis - (2010-08-13)
  [2738] What is all this SESSION stuff about? (PHP) - (2010-04-25)
  [2596] Http protocol - what does a web server send - (2010-01-24)
  [2321] Uploading and Downloading files - changing names (Perl and PHP) - (2009-08-04)
  [1549] http, https and ajp - comparison and choice - (2008-02-22)
  [1503] Web page (http) error status 405 - (2008-01-12)
  [1378] Etag in http headers - what is it? - (2007-10-03)
  [484] Setting the file name for a downloaded document - (2005-11-03)

H112 - PHP - Further Web Page and Network Handling
  [4483] Moving from mysql to mysqli - simple worked example - (2015-05-03)
  [4070] Passing variable between PHP pages - hidden fields, cookies and sessions - (2013-04-26)
  [3918] Multiple page web applications - maintaining state - PHP - (2012-11-10)
  [3568] Telling which ServerAlias your visitor used - useful during merging domains - (2012-01-04)
  [3540] Easy session example in PHP - keeping each customers data apart - (2011-12-06)
  [3036] Sending out an email containing HTML from within a PHP page - (2010-11-07)
  [2729] Uploading a document or image to its own URL via a browser - (2010-04-18)
  [2679] How to build a test harness into your PHP - (2010-03-16)
  [2632] Shipping a test harness with your class in PHP - (2010-02-12)
  [1518] Downloading data for use in Excel (from PHP / MySQL) - (2008-01-25)
  [1515] Keeping staff up to date on hotel room status - (2008-01-22)
  [1505] Script to present commonly used images - PHP - (2008-01-13)
  [1496] PHP / Web 2 logging - (2008-01-06)
  [1495] Single login and single threaded models - Java and PHP - (2008-01-04)
  [1485] Copyright and theft of images, bandwidth and members. - (2007-12-26)
  [1379] Simple page password protection - PHP - (2007-10-04)
  [1355] .php or .html extension? Morally Static Pages - (2007-09-17)
  [1210] PHP header() function - uses and new restrictions - (2007-05-30)
  [1187] Updating a page strictly every minute (PHP, Perl) - (2007-05-14)
  [1183] Improving searches - from OR to AND? - (2007-05-11)
  [1114] PHP Image upload script - (2007-03-21)
  [1009] Passing GET parameters through Apache mod_rewrite - (2006-12-27)
  [936] Global, Superglobal, Session variables - scope and persistance in PHP - (2006-11-21)
  [904] Of course I'll tell you by email - (2006-10-25)
  [847] Image maps for navigation - a straightforward example - (2006-08-28)
  [789] Hot answers in PHP - (2006-07-02)
  [767] Finding the language preference of a web site visitor - (2006-06-18)
  [675] Adding PHP tags to an old cgi program - (2006-04-08)
  [603] PHP - setting sort order with an associative array - (2006-02-13)
  [565] Using PHP to output images, XML, Style sheets, etc - (2006-01-15)
  [542] Morning image, afternoon image - (2005-12-26)
  [537] Daily Image Santafied - (2005-12-22)
  [451] Accessing a page via POST from within a PHP script - (2005-09-26)
  [443] Server side scripting of styles to suit the browser - (2005-09-12)
  [425] Caching an XML feed - (2005-08-26)
  [410] Reading a news or blog feed (RSS) in your PHP page - (2005-08-12)
  [376] What brings people to my web site? - (2005-07-13)
  [372] Time calculation in PHP - (2005-07-08)
  [356] Sudoku helper or sudoku cheat - (2005-06-23)
  [345] Spotting a denial of service attack - (2005-06-12)
  [314] What language is this written in? - (2005-05-17)
  [220] When to use Frames - (2005-02-19)

R114 - Ruby on the Web
  [4502] Reading and parsing a JSON object in Ruby - (2015-06-01)
  [4003] Web and console - same principle, same code - Ruby example - (2013-02-14)
  [3773] Ruby on the web - a simple example using CGI - (2012-06-22)
  [3623] Some TestWise examples - helping use Ruby code to check your web site operation - (2012-02-24)
  [3431] Ruby at both extremes of your website - (2011-09-10)
  [2607] Answers on Ruby on Rails - (2010-01-30)
  [2605] Ruby on Rails - a sample application to teach you how - (2010-01-30)
  [1891] Ruby to access web services - (2008-11-16)


Back to
Ruby at both extremes of your website
Previous and next
or
Horse's mouth home
Forward to
Exceptions - a fail-safe way of trapping things that may go wrong
Some other Articles
Moving from scripting to Object Orientation in Python
Sorta sorting a hash, and what if an exception is NOT thrown - Ruby
Sundays - and over eating
Exceptions - a fail-safe way of trapping things that may go wrong
3 digit HTTP status codes - what are they, which are most common, which should be a concern?
Sigils - the characters on the start of variable names in Perl, Ruby and Fortran
Searching through all the files in or below a directory - Ruby, Tcl, Perl
How many days to Christmas?
What is on the Melksham Agenda?
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

1 unpublished comment pending on this page

edit your own (not yet published) comments

© WELL HOUSE CONSULTANTS LTD., 2019: 404 The Spa • Melksham, Wiltshire • United Kingdom • SN12 6QL
PH: 01225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/3432_3-d ... cern-.html • PAGE BUILT: Sat May 27 16:49:10 2017 • BUILD SYSTEM: WomanWithCat