COMP2322 Lab 2 HTTP Steven Lee Jan. 29, 2016. HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):

Slides:



Advertisements
Similar presentations
World Wide Web Basics Original version by Carolyn Watters (Dalhousie U. Computer Science)
Advertisements

HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
HyperText Transfer Protocol (HTTP)
Application Layer-11 CSE401N: Computer Networks Lecture-4 Application Layer Overview HTTP.
HTTP – HyperText Transfer Protocol
HTTP By: Becky Fultz, Joe Flager, Katie Huston, Tom Packard, Allison Wilsey.
HyperText Transfer Protocol (HTTP) Computer Networks Computer Networks Spring 2012 Spring 2012.
How the web works: HTTP and CGI explained
9/16/2003-9/18/2003 The Application Layer and Java Programming September 16-18, 2003.
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Web, HTTP and Web Caching
1 K. Salah Module 2.1: Application Layer Application-level protocols provide high-level services –Web and HTTP –DNS –Electronic mail –Remote login –FTP.
HTTP Overview Vijayan Sugumaran School of Business Administration Oakland University.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Hypertext Transport Protocol CS Dick Steflik.
Client, Server, HTTP, IP Address, Domain Name. Client-Server Model Client Bob Yahoo Server yahoo.com/finance.html A text file named finance.html.
 What is it ? What is it ?  URI,URN,URL URI,URN,URL  HTTP – methods HTTP – methods  HTTP Request Packets HTTP Request Packets  HTTP Request Headers.
PL-IV- Group A HTTP Request & Response Header
CS 3830 Day 7 Introduction : Application Layer 2 Processes communicating Process: program running within a host. r within same host, two processes.
FTP (File Transfer Protocol) & Telnet
Mail (smtp), VoIP (sip, rtp)
HyperText Transfer Protocol (HTTP).  HTTP is the protocol that supports communication between web browsers and web servers.  A “Web Server” is a HTTP.
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
2: Application Layer1 CS 4244: Internet Software Development Dr. Eli Tilevich.
Application Layer 2 Figures from Kurose and Ross
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
20-1 Last time □ NAT □ Application layer ♦ Intro ♦ Web / HTTP.
2: Application Layer1 Internet apps: their protocols and transport protocols Application remote terminal access Web file transfer streaming multimedia.
Week 11: Application Layer1 Web and HTTP First some jargon r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,…
Maryam Elahi University of Calgary – CPSC 441.  HTTP stands for Hypertext Transfer Protocol.  Used to deliver virtually all files and other data (collectively.
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
Introduction 1 Lecture 6 Application Layer (HTTP) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
2: Application Layer1 Web and HTTP First some jargon Web page consists of base HTML-file which includes several referenced objects Object can be HTML file,
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
Proxy Lab Recitation I Monday Nov 20, 2006.
1 HTTP EECS 325/425, Fall 2005 September Chapter 2: Application layer r 2.1 Principles of network applications m app architectures m app requirements.
HyperText Transfer Protocol (HTTP) RICHI GUPTA CISC 856: TCP/IP and Upper Layer Protocols Fall 2007 Thanks to Dr. Amer, UDEL for some of the slides used.
HTTP1 Hypertext Transfer Protocol (HTTP) After this lecture, you should be able to:  Know how Web Browsers and Web Servers communicate via HTTP Protocol.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
1-1 HTTP request message GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr request.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
Appendix E: Overview of HTTP ©SoftMoore ConsultingSlide 1.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
Application Layer 2-1 Lecture 4: Web and HTTP. Web and HTTP First, a review… web page consists of objects object can be HTML file, JPEG image, Java applet,
Important r There will be NO CLASS on Friday 1/30/2015! r Please mark you calendars 1.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
Advance Computer Networks Lecture#05 Instructor: Engr. Muhammad Mateen Yaqoob.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
HTTP Here, we examine the hypertext transfer protocol (http) – originally introduced around 1990 but not standardized until 1997 (version 1.0) – protocol.
Overview of Servlets and JSP
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
HyperText Transfer Protocol (HTTP) Deepti Kulkarni CISC 856: TCP/IP and Upper Layer Protocols Fall 2008 Acknowledgements Professor Amer Richi Gupta.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
2: Application Layer 1 Chapter 2 Application Layer These ppt slides are originally from the Kurose and Ross’s book. But some slides are deleted and added.
Hypertext Transfer Protocol
Block 5: An application layer protocol: HTTP
The Hypertext Transfer Protocol
COMP2322 Lab 2 HTTP Steven Lee Feb. 8, 2017.
Internet transport protocols services
Networks Problem Set 1 Due Oct 3 Bonus Date Oct 2
CS 5565 Network Architecture and Protocols
HyperText Transfer Protocol
Presentation transcript:

COMP2322 Lab 2 HTTP Steven Lee Jan. 29, 2016

HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser): requests, receives and displays Web objects, can be HTML files, images, videos, … – Server (Web server): responds requests with objects Stateless – Server maintains no information about past client requests 2

HTTP message Two types: request, response HTTP request message – ASCII (human-readable format) 3 Request line GET /hypertext/WWW/TheProject.html HTTP/1.1 Header lines Host: info.cern.ch User-agent: Mozilla/5.0 Connection: keep-alive Accept-language: en-US End of message (extra carriage return \r, line feed \n)

HTTP methods GET (HTTP/1.0+) POST (HTTP/1.0+) HEAD (HTTP/1.0+) – Requests the header only, without the response body PUT (HTTP/1.1+) – Uploads the file in the entity body to the path specified in the URL field DELETE (HTTP/1.1+) – Deletes the file specified in the URL field 4

HTTP message HTTP response message 5 Status line HTTP/ OK Header lines Date: Thu, 28 Jan :53:26 GMT Server: Apache Last-Modified: Thu, 03 Dec :37:20 Content-Length: 2217 Connection: close Content-Type: text/html Data The World Wide Web Project …

HTTP response status codes 200 OK – Request succeeded, requested object later in this message 301 Moved Permanently – Requested object moved, new location specified later in this message (Location:) 404 Not Found – Requested document not found on this server 500 Internal Server Error – An unexpected condition was encountered 503 Service Unavailable – The server is currently unavailable (due to overloading or maintenance) 6

Content Explore several aspects of the HTTP protocol with Wireshark – Basic HTTP GET/response interaction – The HTTP CONDITIONAL GET/response interaction – Retrieving long documents – HTML documents with embedded objects – HTTP authentication 7

Web cache A mechanism for the temporary storage (caching) of web documents, such as HTML pages and images, to reduce bandwidth usage, server load, and perceived lag Clear cache – Google Chrome: Ctrl+Shift+Delete → Clear browsing data – Mozilla Firefox: Ctrl+Shift+Delete → Clear Now – Internet Explorer: Use Chrome or Firefox 8

Practice 1 Y:\Win32\WiresharkPortable Visit Question 1 (2 marks for each part in a question) a)What version(s) of HTTP are your browser and the server running? b)What language(s) (if any) does your browser indicate that it can accept from the server? c)What are the IP addresses of your computer and the server? d)What is the status code returned from the server to your browser? e)When was the HTML file that you retrieved last modified at the server? f)How many bytes of content are returned to your browser? 9

Practice 2 Clear web cache Visit Visit this address again Question 2 – Inspect the contents of the first HTTP GET request a)Do you see an “If-Modified-Since” line in the HTTP GET? b)Did the server explicitly return the contents of the file? How can you tell? – Inspect the contents of the second HTTP GET request c)Do you see an “If-Modified-Since” line in the HTTP GET? If so, what information follows the “If-Modified-Since” header? d)What is the status code and phrase returned from the server’s response to this second HTTP GET? e)Did the server explicitly return the contents of the file? Explain. 10

Practice 3 Open a new incognito or private window in your browser – Google Chrome: Ctrl+Shift+N – Mozilla Firefox: Ctrl+Shift+P Visit 2.htmlhttp://www4.comp.polyu.edu.hk/~comp2322/HTTP- 2.html Visit this address again Question 3 a)Did the server explicitly return the contents of the file in response to the first HTTP GET request? b)How about for the second HTTP GET request? c)Please explain this behavior. When does the browser clear all the cache when browsing in incognito or private mode? 11

Practice 4 Clear web cache Visit Select an HTTP message → Right-click on the TCP layer → Protocol Preferences → Uncheck Allow subdissector to reassemble TCP stream Question 4 a)How many HTTP GET request messages were sent by your browser? b)How many data-containing TCP segments were needed to carry the single HTTP response? c)What is the status code and phrase associated with the response to the HTTP GET request? d)Are there any HTTP status lines in the transmitted data associated with a TCP-induced “Continuation”? 12

Practice 5 Clear web cache Visit TP-4.html TP-4.html Question 5 a)How many HTTP GET request messages were sent by your browser? To which Internet addresses were these GET requests sent? b)Can you tell whether your browser downloaded the two images serially, or whether they were downloaded from the two websites in parallel? Explain. 13

Practice 6 Clear web cache Visit 5.phphttp://www4.comp.polyu.edu.hk/~comp2322/HTTP- 5.php Username: wireshark-students Password: network Question 6 a)What is the status code and phrase of the server’s response to the initial HTTP GET message from your browser? b)When your browser sends the HTTP GET message for the second time, what new field is included in the HTTP GET message? 14

In last December, the Internet Engineering Steering Group (IESG) approved a new HTTP status code. Question 7 – What is the new status code and what is it for? 15