HTTP, Hypertext Transfer Protocol, is the method by which clients (i.e. you) and servers communicate. When someone clicks a link, types in a URL or submits out a form, their browser sends a request to a server for information. It might be asking for a page, or sending data, but either way, that is called an HTTP Request. When a server receives that request, it sends back an HTTP Response, with information for the client. Usually, this is invisible, though I'm sure you've seen one of the very common Response codes - 404, indicating a page was not found. There are a fair few more status codes sent by servers, and the following is a list of the current ones in HTTP 1.1, along with an explanation of their meanings.
A more technical breakdown of HTTP 1.1 status codes and their meanings is available at http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html. There are several versions of HTTP, but currently HTTP 1.1 is the most widely used.
Informational
- 100 - Continue
A status code of 100 indicates that (usually the first) part of a request has been received without any problems, and that the rest of the request should now be sent. - 101 - Switching Protocols
HTTP 1.1 is just one type of protocol for transferring data on the web, and a status code of 101 indicates that the server is changing to the protocol it defines in the "Upgrade" header it returns to the client. For example, when requesting a page, a browser might receive a statis code of 101, followed by an "Upgrade" header showing that the server is changing to a different version of HTTP.
Successful
- 200 - OK
The 200 status code is by far the most common returned. It means, simply, that the request was received and understood and is being processed. - 201 - Created
A 201 status code indicates that a request was successful and as a result, a resource has been created (for example a new page). - 202 - Accepted
The status code 202 indicates that server has received and understood the request, and that it has been accepted for processing, although it may not be processed immediately. - 203 - Non-Authoritative Information
A 203 status code means that the request was received and understood, and that information sent back about the response is from a third party, rather than the original server. This is virtually identical in meaning to a 200 status code. - 204 - No Content
The 204 status code means that the request was received and understood, but that there is no need to send any data back. - 205 - Reset Content
The 205 status code is a request from the server to the client to reset the document from which the original request was sent. For example, if a user fills out a form, and submits it, a status code of 205 means the server is asking the browser to clear the form. - 206 - Partial Content
A status code of 206 is a response to a request for part of a document. This is used by advanced caching tools, when a user agent requests only a small part of a page, and just that section is returned.
Redirection
- 300 - Multiple Choices
The 300 status code indicates that a resource has moved. The response will also include a list of locations from which the user agent can select the most appropriate. - 301 - Moved Permanently
A status code of 301 tells a client that the resource they asked for has permanently moved to a new location. The response should also include this location. It tells the client to use the new URL the next time it wants to fetch the same resource. - 302 - Found
A status code of 302 tells a client that the resource they asked for has temporarily moved to a new location. The response should also include this location. It tells the client that it should carry on using the same URL to access this resource. - 303 - See Other
A 303 status code indicates that the response to the request can be found at the specified URL, and should be retrieved from there. It does not mean that something has moved - it is simply specifying the address at which the response to the request can be found. - 304 - Not Modified
The 304 status code is sent in response to a request (for a document) that asked for the document only if it was newer than the one the client already had. Normally, when a document is cached, the date it was cached is stored. The next time the document is viewed, the client asks the server if the document has changed. If not, the client just reloads the document from the cache. - 305 - Use Proxy
A 305 status code tells the client that the requested resource has to be reached through a proxy, which will be specified in the response. - 307 - Temporary Redirect
307 is the status code that is sent when a document is temporarily available at a different URL, which is also returned. There is very little difference between a 302 status code and a 307 status code. 307 was created as another, less ambiguous, version of the 302 status code.
Client Error
- 400 - Bad Request
A status code of 400 indicates that the server did not understand the request due to bad syntax. - 401 - Unauthorized
A 401 status code indicates that before a resource can be accessed, the client must be authorised by the server. - 402 - Payment Required
The 402 status code is not currently in use, being listed as "reserved for future use". - 403 - Forbidden
A 403 status code indicates that the client cannot access the requested resource. That might mean that the wrong username and password were sent in the request, or that the permissions on the server do not allow what was being asked. - 404 - Not Found
The best known of them all, the 404 status code indicates that the requested resource was not found at the URL given, and the server has no idea how long for. - 405 - Method Not Allowed
A 405 status code is returned when the client has tried to use a request method that the server does not allow. Request methods that are allowed should be sent with the response (common request methods are POST and GET). - 406 - Not Acceptable
The 406 status code means that, although the server understood and processed the request, the response is of a form the client cannot understand. A client sends, as part of a request, headers indicating what types of data it can use, and a 406 error is returned when the response is of a type not i that list. - 407 - Proxy Authentication Required
The 407 status code is very similar to the 401 status code, and means that the client must be authorised by the proxy before the request can proceed. - 408 - Request Timeout
A 408 status code means that the client did not produce a request quickly enough. A server is set to only wait a certain amount of time for responses from clients, and a 408 status code indicates that time has passed. - 409 - Conflict
A 409 status code indicates that the server was unable to complete the request, often because a file would need to be editted, created or deleted, and that file cannot be editted, created or deleted. - 410 - Gone
A 410 status code is the 404's lesser known cousin. It indicates that a resource has permanently gone (a 404 status code gives no indication if a resource has gine permanently or temporarily), and no new address is known for it. - 411 - Length Required
The 411 status code occurs when a server refuses to process a request because a content length was not specified. - 412 - Precondition Failed
A 412 status code indicates that one of the conditions the request was made under has failed. - 413 - Request Entity Too Large
The 413 status code indicates that the request was larger than the server is able to handle, either due to physical constraints or to settings. Usually, this occurs when a file is sent using the POST method from a form, and the file is larger than the maximum size allowed in the server settings. - 414 - Request-URI Too Long
The 414 status code indicates the the URL requested by the client was longer than it can process. - 415 - Unsupported Media Type
A 415 status code is returned by a server to indicate that part of the request was in an unsupported format. - 416 - Requested Range Not Satisfiable
A 416 status code indicates that the server was unable to fulfill the request. This may be, for example, because the client asked for the 800th-900th bytes of a document, but the document was only 200 bytes long. - 417 - Expectation Failed
The 417 status code means that the server was unable to properly complete the request. One of the headers sent to the server, the "Expect" header, indicated an expectation the server could not meet.
Server Error
- 500 - Internal Server Error
A 500 status code (all too often seen by Perl programmers) indicates that the server encountered something it didn't expect and was unable to complete the request. - 501 - Not Implemented
The 501 status code indicates that the server does not support all that is needed for the request to be completed. - 502 - Bad Gateway
A 502 status code indicates that a server, while acting as a proxy, received a response from a server further upstream that it judged invalid. - 503 - Service Unavailable
A 503 status code is most often seen on extremely busy servers, and it indicates that the server was unable to complete the request due to a server overload. - 504 - Gateway Timeout
A 504 status code is returned when a server acting as a proxy has waited too long for a response from a server further upstream. - 505 - HTTP Version Not Supported
A 505 status code is returned when the HTTP version indicated in the request is no supported. The response should indicate which HTTP versions are supported.
35 Comments
Thanks for the documentation!
My question, I'm getting a 414 error, how long it too long? Where do I configure the length of allowed URIs, is it even configurable?
Thanks!
smile_joebob@yahoo.com
#1, Steve, United States, 22 December 2004. Reply to this.
Hi Steve.
Most servers have this set fairly high, usually around four thousand characters, but I don't know where you'd find a setting to change to increase of decrease this. Anything above about 2048 characters in a URL will make Internet Explorer cry.
#2, Dave Child, United Kingdom, 23 December 2004. Reply to this.
On my local server, I've been going through my logs, and have found several attempts of attack. Several were buffer overflow attempts, and the 414 error is always waiting for them. I assume they're using a script to make the HTTP request. Since they use proxy, I was wondering if how I might take action, and, should I be worried that they might succeed?
#3, Curtis, United States, 21 July 2005. Reply to this.
Is there a site where i can configure my HTTP response as per my requirement?
#4, Rahul, India, 2 April 2006. Reply to this.
Rahul, download the source of thttpd from http://www.acme.com/software/thttpd/. Then modify libhttpd.c to add whatever status titles you wish. Compile it. Create a cgi with a Status: XXX header.
Of course, this doesn't mean the server is actually behaving as it should. For example 206, should really only be returned if the request only asks for partial content, and it should actually return the bytes specified by content-range.
#5, Travis Finucane, United States, 18 July 2006. Reply to this.
I used this to generate a set of error pages for each response over 500, Thanks!
#6, sqeaky, United States, 21 July 2006. Reply to this.
Curtis if someone is just using prebuilt scripts to attack your server, simple use of best practices with thwart them every time. Patch your software in a timely fashion, have a tightly configured firewall, and make sure to use secure Remote administration tools, like SSH, and a script kiddy will be left out in the cold. However a more determined hacker, might use your server to find a day 0 exploit, but this is unlikely and is a risk all webmasters share.
#7, sqeaky, United States, 21 July 2006. Reply to this.
Great post(s)!
I have a "slightly" unrelated question if I may...
We have a situation (which I've been tasked to fix of course!) where a custom mod is behaving badly and causing apache to appear hung. (Before you ask :-): No, I dot not have the swag to make them fix the thing. I have to live with, detect and create an axe to recover from the behavior.) By hung I mean connect but not respond. Most of the time this means apache's active process count incrementally grows until it reaches its configured max. But not always.
Can you suggest a programmatic way of testing a server (apache or otherwise) to see if it is "hung"?
Thanks in advance!
John
#8, Hohn A. Parker, United States, 18 September 2006. Reply to this.
Thanks for so complete Http error info
#9, LeeTK, Malaysia, 8 February 2007. Reply to this.
Good information - thank you. I'm not encountering an HTTP 414 error until about 6-8,000 characters in the URL (using 1and1.com managed server. (I use long URI to upload data).
#10, Mike, United States, 5 June 2007. Reply to this.
Here's where to set the max request-URI length in Apache 2.2:
http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestline
Thought this might help some of you.
#11, Jeff Johnson, United States, 6 August 2007. Reply to this.
I have a site where I have .exe files available for download. Some of the files are quite large. I see lots of 200 and 206 status codes among others. Is there anything I can do to determine exactly how many FULL copies were successfully downloaded? Would a 200 status code indicate that? Could multiple 206 codes from the same IP indicate a successfull download of a FULL copy?
Thanks.
#12, New to This Stuff, United States, 10 August 2007. Reply to this.
Great! I need your help!
And I have linked your address in my blog! :)
#13, bbq, United Kingdom, 3 September 2007. Reply to this.
I recently installed apache 2.2.6, with ssl on Solaris 9. It's a pretty standard install.
In my access log, I see entries like this every couple minutes:
127.0.0.1 - - [03/Nov/2007:15:46:41 +0000] "GET /" 400 480
127.0.0.1 - - [03/Nov/2007:15:46:42 +0000] "GET /" 400 480
127.0.0.1 - - [03/Nov/2007:15:46:52 +0000] "GET /" 400 480
127.0.0.1 - - [03/Nov/2007:15:46:53 +0000] "GET /" 400 480
127.0.0.1 - - [03/Nov/2007:15:46:54 +0000] "GET /" 400 480
I didn't start seeing this until I modified my http.conf from
CustomLog logs/access_log common
to
CustomLog logs/access_log combined
(I wanted more information in logs for webalizer to have good
reports)
What would cause these log entries?
Thanks!
#14, Jessica, United States, 19 November 2007. Reply to this.
Thanks for the info. However, what can I do to fix my error 409 problem? Can I delete or edit the files that need to be edited or deleted?
#15, Norrisa, The Bahamas, 1 June 2009. Reply to this.
I been getting this error now for 12 days! Prostores is having trouble fixing it. Now I'm on my own because I am no longer listed in google base. Pretty frustrating.
I get a client error 400 code.
Missing shard or something. This happens from any computer. Is there a fix?
#16, Frankie Talarico, Maine, 16 September 2009. Reply to this.
Thanks for the post, If you are looking for a tool to verify the status code return from your URL when sending different HTTP request you can use this http testing tool: http://soft-net.net/SendHTTPTool.aspx
#17, Michaelz, 15 March 2010. Reply to this.
im using Internet Download Manager for my downloads,and when it reaches 99.99% it stops & then i get this error "416 - Requested Range Not Satisfiable" can any one help me plz
#18, tima, 4 October 2010. Reply to this.
For HTTP Status 413 error :
The fix is simply to up the size of the UploadReadAheadSize metabase property.
How To:
The following command instructs you to get the size as follows:
script adsutil.vbs get w3svc/1/uploadreadaheadsize
how to increase and set:
cscript adsutil.vbs set w3svc/1/uploadreadaheadsize 204800
Here highlighted number 1 is the website directory ID, you need to modify as per your website Directory ID.
=============================
For complete Article you can refer :
http://dotnetpedia.net/site/index.php?q=node/10
#19, hemal, india, 9 January 2011. Reply to this.
Hi,
I am trying to login a url but cannot access the menu page. In apache acess log file i find something similar to 302 return code like :
"GET / HTTP/1.0" 302 375
what does this mean & how can i access the link?
Plz help
Thanks
#20, Nilz, India, 16 November 2011. Reply to this.
if yo.u get a http 417. what can you do to fix somthing like that
#21, gary, us, 25 November 2011. Reply to this.
What will i do when i face this problem?
Technical description:
403 Forbidden - You are not allowed to communicate with the requested resource.
give me the sure solution
#22, Happy singh, India, 19 December 2011. Reply to this.
Hi..... Please may you assist me.
I keep getting http 407 error each time i try i connecting to the internet and cannot proceed. How do i fix this in simple english?
#23, Geri, Zimbabwe, 15 January 2012. Reply to this.
Thanks for the list of error codes, please add steps for the trouble shooting steps.
You guys are really rocking.
Thanks :)
#24, Christie Roy, India, 16 January 2012. Reply to this.
Hi,
I got the 500 error while I was running the script:
Here is the error msg that I copied fromt the replay log:
Internal_Message_LogIn_Registration.c(61): Error -26612: HTTP Status-Code=500 (Internal Server Error) for "https://136.181.240.148:9446/wss/viewMessageAdmin.do?method=showViewMessage&org.apache.struts.taglib.html.TOKEN=978d7952eb83f7ead9e8e183d5df1929"></div><TABLE WIDTH="98%" cellpadding="3" cellspacing="0" border="0"><TR><TD align="left"><font face='arial, helvetica, sans-serif'color='BLACK' size='-1'><p align="justify">Pleaseenter your State User Name and password below to access miAccount.</p> </font></TD></TR><tr><td align=left><hr width=100% /></td></tr><tr><td align="LEFT"><table border="0" cellpadding="0" cellspacing="4" width=80%align=center><tr><TD colspan="2"></TD></tr><tr><td colspan=2 class="requiredStar" align=left>&menuId=WSS.Global.MB&linkId=WSS.Global.MB" [MsgId: MERR-26612]
Internal_Message_LogIn_Registration.c(61): web_submit_data("viewMessageAdmin.do") highest severity level was "ERROR", 13 body bytes, 336 header bytes [MsgId: MMSG-26388]
Please give me a solution as to how to rectify this problem.
#25, Anu, USA, 18 January 2012. Reply to this.
Good article but 302 is Moved temporarily
#26, Arnab Sen, India, 19 January 2012. Reply to this.
Hellp I get the errror on my new exchange 2010 server
HTTP Error 505.0 - Http Version Not Supported
The page cannot be displayed because the HTTP version is not supported.
iis 7.5
#27, Olajide, United Kingsom, 19 January 2012. Reply to this.
Am sorry, i should have read the whole description first. As its mentioned 307 and 302 has a very little difference. To be honest, even after reading different blogs/posts i havent been able to figure out the difference between 30[27]
#28, Arnab Sen, India, 29 January 2012. Reply to this.
Hi,
How does the FF browse behaves for the DRM protected videos when it is exposed for 206 type of request ?
The reason behind this problem is
I use Firefox 6 browser to stream(progressive download) movie in Silverlight using ashx handler. When I seek to a new position, The browser does not initiate a new request at all with byte-range headers(which basically initiates for 206 type request ,instead it downloads the entire movie and then resumes back.
This behavior is applicable in chrome too. But in IE 8 it works great.
What would be the reason for this problem. Would be able to help me out regarding this ?
Thank you
Praveen
#29, Praveen, India, 31 January 2012. Reply to this.
Hi,
Below error sent from my client he told me we got error from server error logging.
31115 fired (level 13) -> "URL too long. Higher than allowed on most browsers. Possible attack."
Please suggest me how i can handle.
Thanks
Gagan
#30, Gagan, India, 3 February 2012. Reply to this.
Gagan,
The error is from OSSEC a host based IDS system. The error indicates that a rule has been triggered for a URL that is too long. This could indicate an attack, however we are seeing many of these errors due to comment spam in blog posts. Check the ossec documentation for filtering these alerts if they are not malicious (just annoying).
Regards,
Peter
http://hackertarget.com
#31, Peter, 22 March 2012. Reply to this.
I'm using a stylesheet in a Perl program.
But it results in a 500 Internal Server Error. And when I look into the Apache "access logfile" there is an extra error code 539: which means: cannot execute.
But the stylesheet does not need to be executed.
Can you give me a hint of what should be ajusted.
Regards,
Wim
#32, Wim 't Jong, The Netherlands, 7 May 2012. Reply to this.
Dave, thanks for the information. BTW that floating thing at the side ("I'm Dave, a web developer...") is REALLY annoying.
#33, Willm, Ecuador, 18 May 2012. Reply to this.
Hi - I see a number of 206 statuses in my logs - I have a bunch of songs for download (mp3) - If I get a 206, does it mean that only part of the song is being played?
Thanks,
Steve
#34, Steve, USA, 23 September 2012. Reply to this.
hello,
i hav been a student abot computer programs for about 3 years now maybe a little more im trying to figure out how to make a order status check for my customers. ive tried looking at google for answers but no luck any tips or do you no a code???
#35, bryce, usa, 13 June 2013. Reply to this.