Week 1 Reading: Overview of HTTP - savannahc502/SavC-TechJournal-SEC260 GitHub Wiki

Gourley, David, and Brian Totty. HTTP: The Definitive Guide. O’Reilly, 2002.


Read Chapter 1 (Overview of HTTP)

  • HyperText Transfer Protocol uses reliable data-transmission protocols

HTTP, Web Clients and Servers

  • Web servers host the content of the web, and are often called HTTP servers

image

  • Most common HTTP clients are browsers
  • Communication is request/response

Web Resources

  • Web servers host content, aka web resources (the source of web content)
    • Includes Static Files: text files, HTML files, Microsoft Word files, Adobe Acrobat files, JPEG image files, AVI movie files
    • Includes dynamic content via software (camera feed, stocks, online stores) image

Media Types

  • HTTP tags transported objects with a label called a MIME type (Multipurpose Internet Mail Extensions)
  • The server attaches a MIME to all HTTP objects, the browser interprets
  • MIME tag examples
    • text/html
    • text/plain
    • image/jpeg
    • image/gif
    • video/quicktime
    • application/vdn.ms-powerpoint

URI (Uniform Resource Identifier) and URL (Uniform Resource Locator)

  • Type of URI are URLs
  • URLs describe the specific location of a resource on a particular serve

image

URN (Uniform Resource Name)

  • Type of URI
  • "A URN serves as a unique name for a particular piece of content, independent of where the resource currently resides."

Transactions

  • HTTP responses and requests are sent via messages

image

  • HTTP requests have a method, typically GET and POST. The method tells the server what action to perform
HTTP Method Description
GET Send named resource from server to the client
PUT Store data from client into a named server resource
DELETE Delete the named resource from the server
POST Send client data into a server gateway application
HEAD Send just the HTTP headers from the response for the named resource

Status Codes

  • HTTP responses messages
  • Three digits (200, 302, 404)

Web Pages Can Consist of Multiple Objects


Messages

image


Connections

  • HTTP is a simple application layer protocol. The network communication is left to TCP/IP, the reliable Internet transport protocol.
    • TCP has error-free data transportation, in-order delivery, and unsegmented data stream
  • HTTP is layered OVER TCP.

image

Connections, IP Addresses, and Port Numbers

  • TCP/IP connection must be established before HTTP client
    • Requires the IP address of the server and the TCP port numbers of the software running on the server
      • This information comes form the URL
      • The host name can be translated to an IP via the DNS
      • Default server port is 80, which is absent from URLs

Steps from textbook:

  1. The browser extracts the server’s hostname from the URL.
  2. The browser converts the server’s hostname into the server’s IP address.
  3. The browser extracts the port number (if any) from the URL.
  4. The browser establishes a TCP connection with the web server.
  5. The browser sends an HTTP request message to the server.
  6. The server sends an HTTP response back to the browser.
  7. The connection is closed, and the browser displays the document.

You can use Telnet to test this out via text lines


Protocol Versions

  • HTTP/0.9, HTTP/1.0, HTTP/1.0+, HTTP/1.1, HTTP-NG (HTTP/2.0)

Architectural Components of the Web

  • Proxy sits between client and server to be a middle man for incoming HTTP requests
  • Web cache/Caching proxy is a proxy server that keeps stock of popular requested documents
  • Gateways are intermediaries to filter traffic, like a firewall. Often convert hTTP traffic to another protocol
  • Tunnels are HTTP applications that "blindly relay raw data between two connections"
  • Agents make HTTP requests for the user, like web browsers