Top Banner
Hypertext Transfer Protocol Kyle Roth Mark Hoover
22
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

Hypertext Transfer Protocol

Kyle RothMark Hoover

Page 2: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

What is HTTP

● Protocol– Mainly used for accessing data on the World Wide

Web.– Similar to FTP and SMTP

● HTTP and FTP transfer files and use services of TCP● HTTP only uses one TCP connection.● HTTP and SMTP messages look similar● HTTP messages are only interpreted by the browser

– HTTP typically uses TCP, but only presumes reliable transport

– HTTP uses a request/response model

Page 3: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

Request/Response

Page 4: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

World Wide Web

● The Wold Wide Web is a distributed client/server service

● HTTP provides uniformity over requests and responses

● HTTP requests are requests for Web Documents

● HTTP responses are Web Documents

Page 5: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

HTTP Messages

● There are two types of HTTP messages● Request Message

– Request Line– Header– Body

● Response Message– Status Line– Header– Body

Page 6: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

HTTP Message

Page 7: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

Request Line and Status Line

● Request Line– Request Type– URL– HTTP Version

● Status Line– HTTP Version– Status Code– Status phrase

Page 8: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

Request Type

● The Request type defines the type of action that the client is requesting

● GET – Requests a document from the server

● HEAD – Requests information about a document, but not the document itself

● POST – Sends some information from client to server

● PUT – Sends a document from client to server

● TRACE – Echoes the incoming request

● CONNECT – Reserved

● OPTION – Inquires about available options

Page 9: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

URL

● Standard for specifying any kind of information on the Internet

● Defines– Protocol – HTTP– Host – Referred to by an alias (typically www)– Port – Specifies port number of the server (optional)– Path – Pathname to the file

Page 10: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

Status Code/Phrase

● The Status code reports the success of the request– 100 Range – Informational– 200 Range – Successful request– 300 Range – Redirection– 400 Range – Client Side Error– 500 Range – Server Side Error

Page 11: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

Status Codes

Page 12: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

Status Codes

Page 13: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

HTTP Header

● Header contains additional information● The header can specify format constraints● Four categories of headers

– General – Information about the message– Request – Specifies client's configuration and

preferred format– Response – Specifies server's configuration and

special information about the request– Entity – Information about the body

Page 14: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

General Header

Page 15: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

Request Header

Page 16: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

Response

Page 17: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

Entity

Page 18: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

HTTP Transaction

Page 19: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

Nonpersistent Connections

● Persistent connections are default in HTTP version 1.1

● One connection is made for each request/response– Client opes a connection and sends a request– Server sends the response and closes the

connection– Client reads data, then closes the connection

● Requires N connections for N files

Page 20: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

Persistent Connections

● Persistent connections remove the high overhead of non persistent connections

● The connection remains open until the client requests it to be closed, or the connection times out

● Length of data is sent when applicable

Page 21: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

Proxy Servers

● Proxy servers act as go betweens for the actual servers

● Proxy servers maintain a cache of recent requests

● HTTP requests are sent to proxy servers, which check their cache

● The actual server is only accessed when the proxy server does not have the requested information– The proxy server polls the server for the requested

information and updates its cache

Page 22: Hypertext Transfer Protocol Kyle Roth Mark Hoover.

Proxy Servers

● This reduces traffic coming into the original server.– Latency is improved

● Requires that the client is configured to access the proxy instead of the target server