Hypertext Transfer Protocol (HTTP) COMP6218 Web Architecture Dr Nicholas Gibbins –

Slides:



Advertisements
Similar presentations
Hypertext Transfer PROTOCOL ----HTTP Sen Wang CSE5232 Network Programming.
Advertisements

HTTP – HyperText Transfer Protocol
Web basics HTTP – – URI/L/Ns – HTML –
Hypertext Transfer Protocol Kyle Roth Mark Hoover.
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.
How the web works: HTTP and CGI explained
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 23 – Internet Applications Internet Directory.
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
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.
Hypertext Transport Protocol CS Dick Steflik.
 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.
Rensselaer Polytechnic Institute CSC-432 – Operating Systems David Goldschmidt, Ph.D.
COMP3016 Web Technologies Introduction and Discussion What is the Web?
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.
HTTP The HyperText Transfer Protocol. Objectives Introduce HTTP Introduce HTTP support in.NET.
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.
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.
Sistem Jaringan dan Komunikasi Data #9. DNS The Internet Directory Service  the Domain Name Service (DNS) provides mapping between host name & IP address.
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.
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
Proxy Lab Recitation I Monday Nov 20, 2006.
CS 6401 The World Wide Web Outline Background Structure Protocols.
HTTP1 Hypertext Transfer Protocol (HTTP) After this lecture, you should be able to:  Know how Web Browsers and Web Servers communicate via HTTP Protocol.
Web Server Design Week 4 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 2/03/10.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
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)
Web Technologies Lecture 1 The Internet and HTTP.
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
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):
HyperText Transfer Protocol (HTTP) Deepti Kulkarni CISC 856: TCP/IP and Upper Layer Protocols Fall 2008 Acknowledgements Professor Amer Richi Gupta.
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.
Web Protocols: HTTP COMP6017 Topics on Web Services Dr Nicholas Gibbins –
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
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
Block 5: An application layer protocol: HTTP
How HTTP Works Made by Manish Kushwaha.
Hypertext Transfer Protocol
Content from Python Docs.
HTTP – An overview.
Hypertext Transfer Protocol
The Hypertext Transfer Protocol
COMP2322 Lab 2 HTTP Steven Lee Feb. 8, 2017.
Hypertext Transfer Protocol
Hypertext Transport Protocol
The World Wide Web Outline Background Structure Protocols CS 640.
COMP3220 Web Infrastructure COMP6218 Web Architecture
HTTP Protocol.
WEB API.
HTTP Hypertext Transfer Protocol
Hypertext Transfer Protocol
HyperText Transfer Protocol
Hypertext Transfer Protocol (HTTP)
HTTP Hypertext Transfer Protocol
CSCI-351 Data communication and Networks
CS/COE 1520 Jarrett Billingsley
Presentation transcript:

Hypertext Transfer Protocol (HTTP) COMP6218 Web Architecture Dr Nicholas Gibbins –

Web Protocols Many protocols in use on the Web, but only two are Web protocols –Hypertext Transfer Protocol (the subject of this lecture) –Simple Object Access Protocol (used for Web Services)

HTTP: Hypertext Transfer Protocol 3

Hypertext Transfer Protocol 4 Application protocol for distributed hypermedia –First documented in 1991 (HTTP/0.9) –HTTP/1.0 introduced in 1996 (RFC1945) –HTTP/1.1 introduced in 1997 (RFC2068) –HTTP/1.1 updated in 1999 (RFC2616) –HTTP/1.1 last updated in 2014 (RFC ) Client and server exchange request/response messages clientserver request response

HTTP Messages 5 ::= ( | ) * CRLF ::= SP SP CRLF ::= : CRLF ::=

Typical message exchange 6 clientserver GET uri 200 OK

Minimal HTTP/1.1 Exchange 7 GET / HTTP/1.1 Host: HTTP/ OK Content-Type: text/html Acme, Inc Homepage Welcome to Acme! …

Demonstration

HTTP/1.1 Methods 9 GET – request a representation of a resource HEAD – requests the body-less response from a GET request POST – request that a representation be accepted as a new subordinate of the specified resource PUT – uploads a representation of the specified resource DELETE – deletes the specified resource (also TRACE, OPTIONS, CONNECT, PATCH)

Demonstration

HTTP/1.1 Request Headers 11 Accept: specify desired media type of response Accept-Language: specify desired language of response Date: date/time at which the message was originated Host: host and port number of requested resource If-Match: conditional request Referer: URI of previously visited resource User-Agent: identifier string for Web browser or user agent

HTTP/1.1 Status Codes 12 1xx – informational message 2xx – success 3xx – redirection 4xx – client error 5xx – server error

200 OK 13 The request has succeeded. For a GET request, the response body contains a representation of the specified resource For a POST request, the response body contains a description of the result of the action

201 Created 14 The request has been fulfilled and resulted in a new resource being created.

300 Multiple Choices 15 Multiple representations of the requested resource exist, and the client is provided with negotiation so that it may select a preferred representation

301 Moved Permanently 16 The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. New permanent URI given using the Location: header

302 Found 17 The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. Temporary URI given using the Location: header

401 Unauthorized 18 The request requires user authentication. The response MUST include a WWW-Authenticate: header field containing a challenge applicable to the requested resource (username/password, for example)

403 Forbidden 19 The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated.

404 Not Found 20 The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

405 Method Not Allowed 21 The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. The response MUST include an Allow: header containing a list of valid methods for the requested resource.

Demonstration

HTTP/1.1 Response Headers 23 Allow: lists methods supported by request URI Content-Language: language of representation Content-Type: media type of representation Content-Length: length in bytes of representation Date: date/time at which the message was originated Expires: date/time after which response is considered stale ETag: identifier for version of resource (message digest) Last-Modified: date/time at which representation was last changed

HTTP Content Negotiation 24 HTTP allows the serving of different representations of a resource based on client preferences Two areas for negotiation –Media type (Accept: and Content-Type:) –Language (Accept-Language: and Content-Language:)

HTTP Content Negotiation: Media Type 25 GET / HTTP/1.1 Host: Accept: text/html; q=1.0, text/plain; q=0.5 HTTP/ OK Content-Type: text/html Acme, Inc Homepage Welcome to Acme! …

HTTP Content Negotiation: Language 26 GET / HTTP/1.1 Host: Accept-Language: de; q=1.0, en-gb; q=0.5 HTTP/ OK Content-Type: text/html Content-Language: de Acme, Inc Homepage Willkommen zu Acme! …

Demonstration

HTTP Extensions

WebDAV HTTP/1.1 still essentially a read-only protocol, as deployed –Web Distributed Authoring and Versioning – HTTP extension –Most recent version from 1999 – RFC2518 Extra methods: –PROPFIND – retrieve resource metadata –PROPPATCH – change/delete resource metadata –MKCOL – create collection (directory) –COPY – copy resource –MOVE – move resource –LOCK/UNLOCK – lock/release resource (so that others can’t change it)

Beyond HTTP/1.1

HTTP Limitations In order to fetch multiple resources from a server, HTTP/1.0 opens multiple connections to that server –Extra costs in connection set-up/teardown –Increased latency if connections are not concurrent Two partial solutions –Reuse connections – HTTP Keep-Alive –Service requests in parallel – HTTP Pipelining

Before HTTP/1.1, each HTTP request used a separate TCP connection HTTP/1.0 and earlier 32 GET 200 OK GET 200 OK GET 200 OK TCP open TCP close TCP open TCP close TCP open TCP close

HTTP/1.1 introduced keep-alive TCP connections reused for multiple HTTP requests HTTP Keep-Alive 33 GET 200 OK GET 200 OK GET 200 OK TCP open TCP close

Also available from HTTP/1.1 Pipelining allows multiple requests to be made without waiting for responses Server must send responses in same order as received requests Reduces latency HTTP Pipelining 34 GET 200 OK GET 200 OK GET 200 OK TCP open TCP close

SPDY 35 Not an acronym - pronounced ‘speedy’ –Development between Google and Microsoft –Preserves existing HTTP semantics – SPDY is purely a framing layer –Basis for HTTP/2.0 Offers four improvements over HTTP/1.1: –Multiplexed requests –Prioritised requests –Compressed headers –Server push

HTTP/2.0 Prioritised Requests 36 A connection may contain multiple streams (each of which consists of a sequence of frames) Each stream has a 31-bit identifier –Odd for client-initiated –Even for server-initiated Each stream has another 31-bit integer that expresses its relative priority –Frames from higher priority streams sent before those from lower priority streams –Allows asynchronous stream processing (unlike HTTP/1.1 Pipelining)

HTTP/2.0 Compressed Headers 37 HTTP/1.1 can compress message bodies using gzip or deflate –Sends headers in plain text HTTP/2.0 also provides the ability to compress message headers

HTTP/2.0 Push 38 HTTP/1.1 servers only send messages in response to requests HTTP/2.0 enables a server to pre-emptively send (or push) multiple associated resources to a client in response to a single request.

Further Reading 39 Hypertext Transfer Protocol – HTTP/1.1 Semantics and Content