Softpanorama

May the source be with you, but remember the KISS principle ;-)
Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
(slightly skeptical) Educational society promoting "Back to basics" movement against IT overcomplexity and  bastardization of classic Unix

Return codes for proxy and HTTP server requests

The return codes indicate the status of requests made on the user behalf when the user tries to access a URL. The codes that are most useful during the log analysis are:

  • 200 -- OK (file was delivered to the user)
  • 301 -- permanently redirected HTTP 301 - Wikipedia, the free encyclopedia (often this means that it was redirected via apache mod-rewrite
  • 304 -- cached (the proxy has a file in the cache)
  • 403  -- forbidden. File was blocked either by Smartfilter (on our side) or by web server on the target side.
  • 404  -- "file not found" Those codes are often result of "constructed URLs". See Requests for non-existing web pages
  • All-in all several dozen HTTP server return codes have been defined and each uniquely describes a different condition. The codes are divided into four categories. Each category reserves a range of 100 possible values and defines a broad class of possible conditions:

  • 100-199 (informational codes). Pretty rare class of codes. They basically provide information about the request or the servers involved.
  • 200-299 ("success" codes). Though 200 is the most common of these, several others exist. For example 204 is used to indicate that the requested file is empty (no content), 202 that some request from the user was accepted.
  • 300-399 (redirects). This ranges includes code 304, which indicates that the file requested has been cached and does not need to be downloaded again.
  • 400-499 (client errors). A client (browser) may, for example, request a page from the server that doesn't exist. that produces code 404 ("not found"). One of possible cause of such an error may be a mistyped link, but the errors still referred to as a client error. Other 400 level errors include code 403 ("forbidden") .
  • 500-599 (server errors). These errors indicate that there is an internal server error or a configuration problem that is preventing the server from properly responding to the request. This type of error is most often encountered in Web sites that are considerably more complex than static HTML. Problems retrieving information from a database or interpreting Java code might be behind server errors.
  • Here's a fairly complete list that you might want to print for future reference.

    200 Series:

  • 200 - OK - Successful transmission. This is not an error code, this is acually a success code. The file you requested was found, here it is.  The length of file transmitted is recoded in the next field. 
  • 201 - Created - The request has been fulfilled and resulted in a new resource being created. The newly created resource can be referenced by the URL(s) returned in the URL-header field of the response, with the most specific URL for the resource given by a Location header field.
  • 202 - Accepted - The request has been accepted for processing, but the processing has not yet completed.
  • 203 - Non-Authoritative Information - The returned META information in the Entity-Header is not the definitive set as available from the origin server, but is gathered from a local or third-party copy.
  • 204 - No Content - The server has fulfilled the request, but there is no new information to send back.
  • 206 - Partial Content - you requested a range of bytes in the file, and here they are. This is new in HTTP/1.1
  • 300 Series:

  • 300 - Multiple Choices - The requested source is available at one or more locations and a preferred location could not be determined via content negotiation.
  • 301 - Moved Permanently - The requested resource has been assigned a new permanent URL and any future references to this resource should be done using one of the returned URLs.
  • 302 - Moved Temporarily - The requested resource resides temporarily under a new URL. Redirection to a new URL. The original page has moved. This is not an error; most browsers invisibly fetch the new page upon seeing this result.
  • 303 - See Other - The requested resource resides under a different URL and should be accessed using a Get method on that resource.
  • 304 - Not Modified - If the client has performed a conditional GET request and access is allowed, but the document has not been modified since the date and time specified in the If-Modified-Since field, the server responds with this status code and does not send an Entity-Body to the client. Use local copy. This means that the copy of the file on the web server is not newer than the copy which your web browser or proxy server has cached locally, so there's no point in sending the file again. This is not an error. The file hasn't changed since the last time you asked for it, so I'm not going to send it again.
  • 400 Series:

  • 400 - Bad Request - The request could not be understood by the server due to it having a malformed syntax. Bad request was made by the client.  For example attempt to access directories below webroot, such as http://site.com/./../../bin
  • 401 - Unauthorized - The request requires user authentication. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested source. The user asked for a document but did not provide a valid username or password.
  • 402 - Payment Required - This code is not currently supported, but is reserved for future use.
  • 403 - Forbidden - The server understood the request but is refusing to perform the request because of an unspecified reason. Access is explicitly denied to this document. (This might happen because the web server doesn't have read permission for the file you're requesting.) The server refuses to send you this file. Maybe permission has been explicitly turned off.
  • 404 - Not Found - The server has not found anything matching the requested URL. This file doesn't exist. That error often can come from a mistyped URL or from URL that is no longer valid (for example the site seized to exist). Sometimes this code is sent if the server has been told to protect the document by telling unauthorized people that it doesn't exist.
  • 405 - Method Not Allowed - The method specified in the request line is not allowed for the resource identified by the request URL.
  • 406 - None Acceptable - The server has found a resource matching the request URL, but not one that satisfies the conditions identified by the Accept and Accept-Encoding request headers.
  • 407 - Proxy Authentication Required - This code is reserved for future use. It is similar to 401 (Unauthorized) but indicates that the client must first authenticate itself with a proxy. HTTP/1.0 does not provide a means for proxy authentication.
  • 408 - Request Timeout - The client did not produce a request within the time the server was prepared to wait.
  • 409 - Conflict - The request could not be completed due to a conflict with the current state of the resource.
  • 410 - Gone - The requested resource is no longer available at the server and no forwarding address is known.
  • 411 - Authorization Refused - The request credentials provided by the client were rejected by the server or insufficient to grant authorization to access the resource.
  • 412 - Precondition Failed
  • 413 - Request Entity Too Large
  • 414 - Request URI Too Large
  • 415 - Unsupported Media Type
  • 500 Series:

  • 500 - Internal Server Error - The server encountered an unexpected condition that prevented it from filling the request. Something went wrong with the web server and it couldn't give you a meaningful response. There is usually nothing that can be done from the browser end to fix this error; the server administrator will probably need to check the server's error log to see what happened. This is often the error message for a CGI script which has not been properly coded.
  • 501 - Method Not Implemented - The server does not support the functionality required to fulfill the request. Application method (either GET or POST) is not implemented.
  • 502 - Bad Gateway - The server received an invalid response from the gateway or upstream server it accessed in attempting to fulfill the request.
  • 503 - Service Temporarily Unavailable - The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. Server is out of resources.
  • 504 - Gateway Timeout - The server did not receive a timely response from the gateway or upstream server it accessed in attempting to complete the request.
  • 505 - HTTP Version Not Supported
  • 8181 - Certificate has expired (secure server only).



    Etc

    Society

    Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers :   Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy

    Quotes

    War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotesSomerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose BierceBernard Shaw : Mark Twain Quotes

    Bulletin:

    Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 :  Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method  : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law

    History:

    Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

    Classic books:

    The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

    Most popular humor pages:

    Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

    The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D


    Copyright © 1996-2021 by Softpanorama Society. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

    FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

    This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

    You can use PayPal to to buy a cup of coffee for authors of this site

    Disclaimer:

    The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the Softpanorama society. We do not warrant the correctness of the information provided or its fitness for any purpose. The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

    Last modified: March 12, 2019