Download presentation
Presentation is loading. Please wait.
1
HTTP Exercise 01
2
Three Internet Protocols IP TCP HTTP Routes messages thru “Inter-network “ 2-way Connection between programs on 2 computers So they can exchange messages Used by browser to communicate with web server Like telephone connection between 2 people So they can talk to the other
3
TCPConnection between programs on 2 computers so they can talk program Computer-1Computer-2 TCP connection (like a browser) program (like a web server) listens on port (80) port: 80 port telnet google.com 80 Establish with: telnet domain-name port
4
HTTP Protocol to exchange message requests & responses between browser and web server 2-way TCP connection Browser Web server port: 80 HTTP request Message GET HTTP response Message Common HTTP command
5
Example HTTP Exchange Computer-1web.njit.edu TCP connection GET /~ mchugh/test/b.html HTTP/1.0 test/b.html web server telnet web.njit.edu 80 http request http response
6
argerich-17 mchugh>: telnet web.njit.edu 80 Trying 128.235.204.61... Connected to pathos.njit.edu. Escape character is '^]'. HTTP/1.1 200 OK Date: Wed, 28 Jan 2009 16:34:37 GMT Server: Apache Last-Modified: Wed, 03 Sep 2008 23:29:48 GMT ETag: "19a834c4-85-4560636525301" Accept-Ranges: bytes Content-Length: 133 Connection: close Content-Type: text/html Makes TCP connection to web server at web.njit.edu listening on port 80 HTTP Get request for file test/b.html on server HTTP response message Header [from server] GET /~mchugh/test/b.html HTTP/1.0 Byte length File type Check file size Status Web sever PREVIOUS EXAMPLE
7
US Flag HTTP Response Message Body TCP connection closed Connection to pathos.njit.edu closed by foreign host. Browser must “parse” html page Requires another HTTP request to retrieve image Content Not “rendered” here as would be in browser Firefox > Tools > Page Info > Headers ( HTTP)
8
Trying 129.6.13.23... Connected to potomac.nist.gov. Escape character is '^]'. telnet www.nist.gov 80 GET /public_affairs/images/bullet.gif HTTP/1.0 HTTP/1.1 200 OK Server: Netscape-Enterprise/4.1 Date: Wed, 28 Jan 2009 21:52:00 GMT Content-type: image/gif Last-modified: Thu, 14 Dec 2006 16:11:03 GMT Content-length: 54 Accept-ranges: bytes Connection: close GIF89a ÿÿÌ!ù, ©ËíbPr¦Jå); Connection to potomac.nist.gov closed by foreign host. Makes TCP connection to web server at www.nist.gov listening on port 80 HTTP Get request for file on server HTTP response message header from server HTTP response message body TCP connection closed
9
telnet time-a.nist.gov 13 54859 09-01-28 22:02:29 00 0 0 383.1 UTC(NIST) * Connection to time-a.nist.gov closed by foreign host. Trying 129.6.15.28... Connected to time-a.nist.gov. Escape character is '^]'. Makes TCP connection To time-of-day program Listening on port 13 time of day TCP connection closed TCP connection Not an HTTP exchange No input required ! date Program response not HTTP response Response by program listening at port 13
10
TCP protocol IP protocol HTTP protocol port HTTP message request HTTP message response HTTP response header HTTP response body Numeric IP address – dotted quad
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.