Web & http
San Skulrattanakulchai
September 11, 2018
TCP & UDP
- We mentioned last time that TCP (Transmission Control Protocol) is one of the main transport layer protocols.
- it is connection-oriented
- it provides reliable transfer of data by implementing
- chopping of message into apropriate chunks
- packet error checking
- ordering of packets
- congestion control
- Another main transport layer protocol is UDP (User Datagram Protocol).
- it is connectionless protocol
- it has packet error checking
- it provides only unreliable transfer of data
Network Applications
- A network application is an app residing at the Application layer
- Can use client-server model or P2P model
- The way clients and servers communicate is defined by an Application Level protocol.
- A network application consists of more than just the protocol.
- Open vs Propriatary protocols
Hypertext Transfer Protocol (HTTP)
- WWW
- Definition: hypertext, web (www)
- http (RFC 1945, RFC 2616)
- Model: client-server
- client - web browser (firefox, chrome, safari, …)
- server - (apache web server, …)
- web page, html, base html file, objects, url (uniform resource locator) = host name + object path name
- HTTP
- use TCP as transport layer
- client first initiates tcp connection, then a sequence of request-response follows
- control channel is the same as data channel (in-band)
- two possible types of connections
- non-persistent connections
- persistent connections
HTTP request message
The format of an HTTP message looks like this
request line (method url version)
header lines ...
blank line (CR/LF)
entity body ...
For example
GET /dir/page.html HTTP/1.1
Host: www.gustavus.edu
Connection: close
User-agent: Mozilla/5.0
Accept-language: fr