Geeks With Blogs
mikedopp Geekswithblogs (edition)

***This is definitely not the full definition this is my way of explaining it.***

HTTP stands for Hyper Text Transfer Protocol and has been around since 1990. It is an application layer protocol used to distribute information from various types of hypermedia, such as a web server. The current version in use in HTTP v1.1. This article is meant to be a general overview of the protocol we use day in and day out, with out even giving it a thought.

HTTP Mechanics:
The port that listens for HTTP requests is port 80, but this can be changed if desired. A client sends a request to a server, and then waits for a reply back which contains a status code. This is called a request/response model and is actually quite simple. When a request is made it includes the web resource that is wanted by using a URI (Uniform Resource Identifier).

As stated above, the URI indicates the resource desired by the client.  There are two main parts to a URI. The URN (Uniform Resource Name), and the URL (Uniform Resource Locater). The URI is nothing more than a formatted string used to identify network resources by location and name.

HTTP v1.1 Commands (methods):
HTTP commands are issued by the client and are then sent to the server. This this current version, there are eight different commands available to the client.  They are as follows:

GET – Used to retrieve information specified by the URI.
HEAD – Retrieves meta information.
POST – Sends input or data to the server.
OPTIONS – Used to determine supported options or requirements for the connection.
PUT - Sends input or data to the server.
DELETE – Removes a resource specified by the URI.

TRACE – Used by the client to see if the server receives a request message.
CONNECT – Used for tunneling. It makes a connection to a proxy and tunnels to the destination. Used with SSL.

HTTP v1.1 Status Codes:
HTTP will indicate success or failure of a request. This is done by the server, it sends various status codes to the client. The following are the status codes:

1** Range - Informational
100 – Continue
101 – Switching Protocols
2** Range - Successful
200 – OK
201 – Created
202 – Accepted
203 – Non-Authoritative informational
204 – No Content
205 – Reset Connection
206 – Partial Content
3** - Redirection
300 – Multiple Choices
301 -Moved Permanently
302 – Found
303 – See Other
304 – Not Modified
305 – Use Proxy

307 – Temporary Redirection
4** Range - Client Error
400 – Bad Requests
401 – Unauthorized
402 – Payment Required
403 – Forbidden
404 – Not Found
405 – Method Not Allowed
406 – Not Acceptable
407 – Proxy Authentication Required
408 – Request Timeout
409 - Conflict
410 - Gone
411 – Length Required
412 – Precondition Failed
413 Request Entity Too Large
414 – Request URI To Long
415 – Unsupported Media Type
416 – Requested Range Not Satisfied
417 – Expectation Failed
5** Range – Server Error
500 – Inter Server Error
501 – Not Implemented
502 – Bad Gateway
503 – Service Unreachable
504 – Gateway Timeout
505 – HTTP Version Not Supported

HTTP is a very simple protocol, some say it is what revolutionized the Internet to make it how it is today. With all the work we do on the Internet these days it's good to have a fundamental understanding of how it all works, seeing as how we are so dependent on it.

Posted on Sunday, September 23, 2007 5:09 PM | Back to top

Comments on this post: How HTTP works

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © mikedopp | Powered by: