Thursday, April 8, 2010

Lecture 19: HTTP (April 7)

We began today with a short presentation from Justin about IPv6 and its differences from IPv4. We then began a discussion about the HTTP protocol. HTTP is the protocol that supports communication between browsers and servers. HTTP is implemented so that a clients requests something from the server and the server replies to that request. HTTP connections of this kind are stateless, and the connection can either be persistent or not.

The format of an HTTP request is in the form of lines of ASCII text followed by a carriage return and line feed. In HTTP version 1.0 and above, the version number is required as one of the lines in the request, while in previous versions this was not required.

HTTP methods that are supported across the board are GET, POST, and HEAD. Servers that use HTTP 1.1 will support PUT, DELETE, TRACE, and OPTIONS.

We then concluded the class with a discussion of what cookies are and what they are used for. Cookies are used in order to allow web sites to keep state information about you. This is implemented as a cookie value that is sent in the HTTP header as a field, and then the server will compare that value with its database of cookies. This way, state information is saved.

No comments:

Post a Comment