HyperText Transfer Protocol HTTP v1.1 hussein suleman uct cs honours 2009.

Slides:



Advertisements
Similar presentations
HTTP – HyperText Transfer Protocol
Advertisements

Hypertext Transfer Protocol Kyle Roth Mark Hoover.
CS320 Web and Internet Programming Generating HTTP Responses
The Web The World Wide Web What does it do?.
How the web works: HTTP and CGI explained
Cornell CS502 Web Basics and Protocols CS 502 – Carl Lagoze Acks to McCracken Syracuse Univ.
The World Wide Web and the Internet Dr Jim Briggs 1WUCM1.
1 The HyperText Transfer Protocol: HTTP Nick Smith Stuart Alley Tara Tjaden.
Definitions, Definitions, Definitions Lead to Understanding.
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.
HyperText Transfer Protocol HTTP v1.1 hussein suleman uct cs honours 2007.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
HTTP Protocol Specification
Network Applications Outline Simple Mail Transfer Protocol
HyperText Transfer Protocol (HTTP).  HTTP is the protocol that supports communication between web browsers and web servers.  A “Web Server” is a HTTP.
CSC 2720 Building Web Applications Getting and Setting HTTP Headers (With PHP Examples)
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.
Application Layer 2 Figures from Kurose and Ross
Maryam Elahi University of Calgary – CPSC 441.  HTTP stands for Hypertext Transfer Protocol.  Used to deliver virtually all files and other data (collectively.
Copyright (c) 2010, Dr. Kuanchin Chen1 The Client-Server Architecture of the WWW Dr. Kuanchin Chen.
Sistem Jaringan dan Komunikasi Data #9. DNS The Internet Directory Service  the Domain Name Service (DNS) provides mapping between host name & IP address.
WebServer A Web server is a program that, using the client/server model and the World Wide Web's Hypertext Transfer Protocol (HTTP), serves the files that.
The HyperText Transfer Protocol. History HTTP has been in use since 1990 (HTTP/0.9) HTTP/1.0 was defined in RFC 1945 (May 1996) and included metainformation.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 7: HTTP and CGI Fundamentals of Web Programming.
Web Client-Server Server Client Hypertext link TCP port 80.
CS 6401 The World Wide Web Outline Background Structure Protocols.
1 Seminar on Service Oriented Architecture Principles of REST.
Web Technologies Interactive Responsiveness Function Hypertext Web E-Publishing Simple Response Web Fill-in Forms Object Web « Full-Blown » Client/Server.
Form Data Encoding GET – URL encoded POST – URL encoded
World Wide Web “WWW”, "Web" or "W3". World Wide Web “WWW”, "Web" or "W3"
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.
Web Server Design Week 13 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 4/7/10.
HTTP Here, we examine the hypertext transfer protocol (http) – originally introduced around 1990 but not standardized until 1997 (version 1.0) – protocol.
CS 6401 The World Wide Web Outline Background Structure Protocols.
Overview of Servlets and JSP
Computer Networks with Internet Technology William Stallings Chapter 04 Modern Applications 4.1 Web Access - HTTP.
1 Unraveling the Web: How Does it All Work?. 2 Web Enabling Technologies F TCP/IP network (Internet & others) F URLs F HTTP protocol and HTTP Servers.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
Web Programming Week 1 Old Dominion University Department of Computer Science CS 418/518 Fall 2007 Michael L. Nelson 8/27/07.
HTTP Protocol Amanda Burrows. HTTP Protocol The HTTP protocol is used to send HTML documents through the Internet. The HTTP protocol sends the HTML documents.
Lecture # 1 By: Aftab Alam Department Of Computer Science University Of Peshawar Internet Programming.
What’s Really Happening
Hypertext Transfer Protocol (HTTP) COMP6218 Web Architecture Dr Nicholas Gibbins –
Hypertext Transfer Protocol
WWW and HTTP King Fahd University of Petroleum & Minerals
HTTP – An overview.
Hypertext Transfer Protocol
The Hypertext Transfer Protocol
COMP2322 Lab 2 HTTP Steven Lee Feb. 8, 2017.
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
HTTP Protocol Specification
Hypertext Transfer Protocol
Hypertext Transport Protocol
Introduction Web Environments
Hypertext Transfer Protocol
HyperText Transfer Protocol
EE 122: HyperText Transfer Protocol (HTTP)
Hypertext Transfer Protocol (HTTP)
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Kevin Harville Source: Webmaster in a Nutshell, O'Rielly Books
The HTTP Protocol COSC 2206 Internet Tools The HTTP Protocol
CSCI-351 Data communication and Networks
Presentation transcript:

HyperText Transfer Protocol HTTP v1.1 hussein suleman uct cs honours 2009

What is HTTP?  Protocol for transfer of data between Web servers and Web clients (browsers).  Popular Web servers: Apache HTTPD JBoss Tomcat  Popular Web clients: Firefox Opera wget  Defined formally by IETF as RFC2616.

Abstract “The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. It is a generic, stateless, protocol which can be used for many tasks beyond its use for hypertext, such as name servers and distributed object management systems, through extension of its request methods, error codes and headers [47]. A feature of HTTP is the typing and negotiation of data representation, allowing systems to be built independently of the data being transferred. HTTP has been in use by the World-Wide Web global information initiative since This specification defines the protocol referred to as "HTTP/1.1", and is an update to RFC 2068 [33].”

Basic Operation ClientServer Request Method URL / RelativeURL Request Headers Request Body Protocol Version Status Code Response Headers Response Body

Example HTTP Communication  Client → Server: GET / HTTP/1.1 Host:  Server → Client: HTTP/ OK Content-type: text/html Content-length: 1024 Really old webpage!

HTTP Request  Format: Method URI HttpVersion

Amaya

Tim Berners-Lee’s WWW Vision  The WWW is meant to be a place for accessing and authoring content, not just the former.  Amaya is W3C’s experimental 2-way browser that works with their 2-way server Jigsaw.  Is access more important than content creation? Why (not)?

URLs, URNs and URIs  Every resource accessible through HTTP is identified by a Uniform Resource Location (URL), which is a location-specific identifier. For example,   ftp://ftp.cs.uct.ac.za/ ftp://ftp.cs.uct.ac.za/  A Uniform Resource Identifier (URI) is a standard format ( : ) generic identifier. For example,   oai:  A Uniform Resource Name (URN) is one example of a location- independent URI. For example,  urn:isbn:  Note: Every URL and URN is also a URI!

HTTP Response  Format: HTTPVersion StatusCode Reason

HTTP Headers  Accept: Indicates which data formats are acceptable. Accept: text/html, text/plain  Content-Language: Language of the content Content-Language: en  Content-Length: Size of message body Content-Length: 1234  Content-Type: MIME type of content body Content-Type: text/html  Date: Date of request/response Date: Tue, 15 Nov :12:31 GMT  Expires: When content is no longer valid Expires: Tue, 15 Nov :12:31 GMT  Host: Machine that request is directed to Host:  Location: Redirection to a different resource Location:  Retry-After: Indicates that client must try again in future Retry-After: 120

Other HTTP Features  Authentication  Persistent connections  GET-if-modified  Byte ranges  Content type negotiation  Cache control  Proxy support

Non-static content  HTTP can support content that is not static.  For a GET request, data is appended to the request – for a POST request, data is contained in the request body.  Responses are generated by a piece of software and are similar to the non-static version.

Common Gateway Interface  Common Gateway Interface (CGI) defines how parameters are passed to Web applications.  For a GET request, the URL contains ue ue3 These are called URL-encoded parameters.  The part beyond ‘?’ is passed in the environment of the Web application as a QUERY_STRING.  The application interprets the QUERY_STRING, generates an HTTP response and writes it to stdout, with at least a Content-type header.  HTML forms generate GET requests that can easily be converted to support CGI.

Notes on URL-Encoding  URLs assign special semantics for some characters so if they are needed, they must be inserted as character codes. e.g.,

CGI POST Content-Disposition: form-data; name="var1" something Content-Disposition: form-data; name="var2"; filename="testpost.html“ Content-Type: text/html recursive example if you fill in the form embedded here, this is the data that gets sent to the server  GET cannot handle file uploads.  File uploads are handled as Multipart-MIME messages sent from the client to the server.

Not-So-Common Gateway Interfaces  Instead of QUERY_STRING and stdin and stdout for data,  Java servlets use methods to acquire parameters and output data.  PHP defines global variables for GET/POST query parameters.

References  Achour, Mehdi, Friedhelm Betz, Antony Dovgal, Nuno Lopes, Philip Olson, Georg Richter, Damien Seguv and Jakub Vrana (2006) PHP Manual. Available  Fielding, R., J. Gettys, J. Mogul, H. Frystyk, L. Masinter, P. Leach and T. Berners-Lee (1999) Hypertext Transfer Protocol – HTTP/1.1, RFC 2616, Network Working Group, IETF. Available ftp://ftp.rfc-editor.org/in-notes/rfc2616.txt ftp://ftp.rfc-editor.org/in-notes/rfc2616.txt  NCSA (1996) The Common Gateway Interface. Available  URI Planning Interest Group (2001) URIs, URLs, and URNs: Clarifications and Recommendations 1.0, W3C. Available  Wilson, Brian (2003) URL Encoding. Available