HTTP Overview Vijayan Sugumaran School of Business Administration Oakland University.

Slides:



Advertisements
Similar presentations
HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
Advertisements

HTTP By: Becky Fultz, Joe Flager, Katie Huston, Tom Packard, Allison Wilsey.
Hypertext Transfer Protocol Kyle Roth Mark Hoover.
16-Jun-15 HTTP Hypertext Transfer Protocol. 2 HTTP messages HTTP is the language that web clients and web servers use to talk to each other HTTP is largely.
The Web The World Wide Web What does it do?.
HTTP Hypertext Transfer Protocol. HTTP messages HTTP is the language that web clients and web servers use to talk to each other –HTTP is largely “under.
World Wide Web1 Applications World Wide Web. 2 Introduction What is hypertext model? Use of hypertext in World Wide Web (WWW) – HTML. WWW client-server.
HTTP Presented By: Holly Mortinson Amy Drout Kyle Balmer & Matt Conklin.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Know how HTTP accesses data on the WWW Objectives.
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 The HyperText Transfer Protocol: HTTP Nick Smith Stuart Alley Tara Tjaden.
1 The World Wide Web. 2  Web Fundamentals  Pages are defined by the Hypertext Markup Language (HTML) and contain text, graphics, audio, video and software.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
PL-IV- Group A HTTP Request & Response Header
Rensselaer Polytechnic Institute CSC-432 – Operating Systems David Goldschmidt, Ph.D.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
HTTP Protocol Specification
Comp2513 Forms and CGI Server Applications Daniel L. Silver, Ph.D.
FTP (File Transfer Protocol) & Telnet
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
HyperText Transfer Protocol (HTTP).  HTTP is the protocol that supports communication between web browsers and web servers.  A “Web Server” is a HTTP.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
Maryam Elahi University of Calgary – CPSC 441.  HTTP stands for Hypertext Transfer Protocol.  Used to deliver virtually all files and other data (collectively.
Web application architecture
Web HTTP Hypertext Transfer Protocol. Web Terminology ◘Message: The basic unit of HTTP communication, consisting of structured sequence of octets matching.
HTTP Hypertext Transfer Protocol
HTTP Hypertext Transfer Protocol RFC 1945 (HTTP 1.0) RFC 2616 (HTTP 1.1)
Proxy Lab Recitation I Monday Nov 20, 2006.
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.
WWW: an Internet application Bill Chu. © Bei-Tseng Chu Aug 2000 WWW Web and HTTP WWW web is an interconnected information servers each server maintains.
Appendix E: Overview of HTTP ©SoftMoore ConsultingSlide 1.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
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)
HTTP Here, we examine the hypertext transfer protocol (http) – originally introduced around 1990 but not standardized until 1997 (version 1.0) – protocol.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
Web Services. 2 Internet Collection of physically interconnected computers. Messages decomposed into packets. Packets transmitted from source to destination.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
CS 6401 The World Wide Web Outline Background Structure Protocols.
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.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
Data Communication EDA344, DIT420 Description of Lab 1 and Optional Programming HTTP Assignment Bapi Chatterjee Prajith R G.
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.
What’s Really Happening
4.01 How Web Pages Work.
HTTP – An overview.
Computing with C# and the .NET Framework
COMP2322 Lab 2 HTTP Steven Lee Feb. 8, 2017.
IS333D: MULTI-TIER APPLICATION DEVELOPMENT
HTTP Hypertext Transfer Protocol
Hypertext Transfer Protocol
Hypertext Transfer Protocol
HyperText Transfer Protocol
Hypertext Transfer Protocol
Traditional Internet Applications
HTTP Hypertext Transfer Protocol
Hypertext Transfer Protocol
Presentation transcript:

HTTP Overview Vijayan Sugumaran School of Business Administration Oakland University

What is HTTP?  Hypertext Transfer Protocol  Language used to describe how documents are sent over the internet  Rules by which browsers make requests and servers supply responses  Includes ways to:  Ask for a document by name  Agree on data format  Determine who the user is  Decide how to handle outdated resources  Indicate the results of the request  When specifying a URL or clicking on a hyperlink, the browser translates into HTTP commands  The server finds the resource and sends it back

HTTP Request Model  HTTP is a stateless request/response protocol  Client opens a socket to the Web server’s HTTP port (80 by default)  Client sends a ASCII text request line, followed by zero or more HTTP headers, an empty line, and any data that accompanies the request  The web server parses the request and locates the specified resource  Server writes a copy of the resource to the socket, where it is read by the client  The server closes connection  Once the connection is closed, the server doesn’t remember anything about this request

Connecting to the Web Server  Web server operates by listening for requests on a particular port (default port 80)  If the server is running on any other port, it has to be part of the URL  E.g.  Client initiates an HTTP request by opening a TCP/IP socket to the Web server port, and then opening input and output stream over the socket  Parameters required to open the socket are the Web server host name, and the port number  Server host name is extracted from the URL  Output stream used to send commands to server  Input stream used to read the server response

Sending the HTTP Request  Once the socket connection is made, Web browser writes an HTTP command to request the document  A request has up to four parts:  First part is “request line”  Second part – one or more request headers  Third part – Empty line consisting of carriage return or line feed  Fourth part – User data

Part I - Request Line  Mandatory part of HTTP Request  Consists of three tokens, separated by spaces  First Token: Request method  Second Token: request URI (derived from the URL – stuff that comes after the host name)   Third Token: HTTP version the client understands (allowable values are HTTP/1.0 and HTTP/1.1)  Example of Request line:  GET /myfile.html HTTP/1.0  There are eight possible methods defined in HTTP (GET and POST are the most frequently used)

Request Methods  GET – A simple request to retrieve the resource identified in the URI  HEAD – Same as GET, except the server doesn’t return the requested document. The server only returns the status line and headers  POST – A request for the server to accept data that will be written to the client’s output stream  PUT – A request for the server to store the data in the request as the new contents of the specified URI  DELETE – A request for the server to delete the resource named in the URI  OPTIONS – A request for information about what request methods the server supports  TRACE – A request for the Web server to echo the HTTP request and its headers  CONNECT – Currently unimplemented method reserved for use with a tunneling proxy

Part II - Request Headers  Second part – one or more request headers  Request headers inform the server of client’s identity and capabilities  Key/value pairs (key and value separated by colon)  E.g: Accept: text/html, image/bmp, text/x-wap.wml  one pair per line  Typical Request Headers  User-Agent ( The vendor and the version of the client)  Accept (A list of content types that client recognizes)  Content-Length (number of bytes of data appended to the request)

Part III – Empty Line  This informs the server that no more headers follow  Even if no headers exist, this empty line has to be sent so that the server doesn’t look for any more headers

HTTP Response from Server  Response also has up to four parts:  A status line  Zero or more response headers  An empty line signaling the end of the response headers, and  The requested data

HTTP Response - Status line  The status line consists of three tokens:  HTTP version  Just as the client indicates the highest version it can understand, the server indicates its capabilities  Response code  Three digit numeric code that indicates whether the request succeeded or failed, if it failed, the reason why.  An optional response description, which is a human readable explanation of the response code  Status line example  HTTP/ OK

Client (Browser) Asks…  User types the following URL in the browser   Browser opens a socket connection to host on port 80 and then writes the following line and an empty line after that.  GET /simple.htm HTTP/1.0

Web Server Returns… HTTP/ OK Date: Tue, 12 Feb :55:43 GMT Server: Apache/ (Win32) Content-Length: 241 Content-Type: text/html Welcome to The Lyric Note, the best Internet source for sheet music musical instruments books on musical topics music software, and musical gift items

Browser Renders…  Browser parses the status line and checks the status code – request was successful  The parses response headers  Finds out that 241 bytes of html follows  Reads html data and renders the document  If the html document contains references to other resources, the browser requests the server for those resources  E.g: if the document contains an tag, then the browser requests that image.  The server doesn’t send the image automatically along with the original request

Complex Request  HTTP Request: GET /compound.htm HTTP/1.0 Then the server sends the following….

Server Sends… HTTP/ OK Date: Tue, 12 Feb :55:43 GMT Server: Apache/ (Win32) Content-Length: 380 Content-Type: text/html Welcome to The Lyric Note, the best Internet source for sheet music musical instruments books on musical topics music software, and musical gift items

Another Request  Browser encounters style sheet request  Makes a second HTTP request  GET /lyricnote.css HTTP/1.0  Web server retrieves the style sheet and sends it to the client HTTP/ OK Date: Tue, 12 Feb :55:53 GMT Server: Apache/ (Win32) Connection: Keep-alive, close Content-Length: 73 Content-Type: text/plain H3 { font-size: 20px; font-weight: bold; color: #005A9C; }

Yet Another Request  Browser interprets the style sheet and applies it to the document  Encounters image tag and makes a request for the logo  GET /images/logo.jpg HTTP/1.0  Server responds with image data stream HTTP/ OK Date: Tue, 12 Feb :55:59 GMT Server: Apache/ (Win32) Connection: Keep-alive, close Content-Length: 1280 Content-Type: text/plain (binary image data follows)

GET Versus POST  GET  Form data appended to the URI  Simplifies the work the server needs to do  Limit to the length of the URI (4KB)  Some servers won’t even accept 2KB  If you submit form data using GET and book mark the resulting page, then, you don’t have to type the data  However, the data is visible – defeats having a password  POST  Write the data to the client’s output stream  Server takes time in processing this data

More Info on HTTP  W3C – World Wide Web Consortium   Freesoft.org   HTTP IETF (Internet Engineering Task Force) 