HANNAM UNIVERSITY 1 Chapter 24 Hypertext Transfer Protocol (HTTP)

Slides:



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

TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
PART 6 Application Layer
HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
HTTP – HyperText Transfer Protocol
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.
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.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 23 – Internet Applications Internet Directory.
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.
Hypertext Transfer Protocol Information Systems 337 Prof. Harry Plantinga.
HTTP HyperText Transfer Protocol Part 3.
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.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
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.
Sistem Jaringan dan Komunikasi Data #9. DNS The Internet Directory Service  the Domain Name Service (DNS) provides mapping between host name & IP address.
Web HTTP Hypertext Transfer Protocol. Web Terminology ◘Message: The basic unit of HTTP communication, consisting of structured sequence of octets matching.
Web Client-Server Server Client Hypertext link TCP port 80.
HTTP1 Hypertext Transfer Protocol (HTTP) After this lecture, you should be able to:  Know how Web Browsers and Web Servers communicate via HTTP Protocol.
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.
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.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
Overview of Servlets and JSP
Computer Networks with Internet Technology William Stallings Chapter 04 Modern Applications 4.1 Web Access - HTTP.
HyperText Transfer Protocol (HTTP) Deepti Kulkarni CISC 856: TCP/IP and Upper Layer Protocols Fall 2008 Acknowledgements Professor Amer Richi Gupta.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Chapter 22 World Wide Web (HTTP) Chapter 22 World Wide Web (HTTP) Mi-Jung Choi Dept. of Computer Science and Engineering
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
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
Tiny http client and server
Content from Python Docs.
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.
Hypertext Transfer Protocol
Hypertext Transport Protocol
Net 431 D: ADVANCED COMPUTER NETWORKS
Tutorial (4): HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
HTTP Hypertext Transfer Protocol
Hypertext Transfer Protocol
Hypertext Transfer Protocol
Hypertext Transfer Protocol
HyperText Transfer Protocol
EE 122: HyperText Transfer Protocol (HTTP)
William Stallings Data and Computer Communications
PART 6 Application Layer
Hypertext Transfer Protocol
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
HTTP Hypertext Transfer Protocol
Hypertext Transfer Protocol
Presentation transcript:

HANNAM UNIVERSITY 1 Chapter 24 Hypertext Transfer Protocol (HTTP)

HANNAM UNIVERSITY 2 CONTENTS HTTP TRANSACTION REQUEST MESSAGE RESPONSE MESSAGE HEADER EXAMPLES SOME OTHER FEATURES

HANNAM UNIVERSITY 3 HTTP uses the services of TCP on well-known port 80.

HANNAM UNIVERSITY 4 HTTP TRANSACTION 24.1

HANNAM UNIVERSITY HTTP 트랜잭션  HTTP 트랜잭션

HANNAM UNIVERSITY HTTP 트랜잭션  메시지 종류  Request : 요청 메시지 (C  S)  Response : 응답 메시지 (S  C)

HANNAM UNIVERSITY REQUEST MESSAGE

HANNAM UNIVERSITY 요청 메시지

HANNAM UNIVERSITY 요청 메시지  요청 라인  요청종류 : 메소드 (GET,HEAD,POST…)  자원 (URL) : 프로토콜 (FTP,HTTP,TELNET…)  HTTP 버전 : HTTP 1.1(1.0,0.9 도 사용함 )

HANNAM UNIVERSITY 요청 메시지  URL

HANNAM UNIVERSITY 요청 메시지  메소드  클라이언트가 서버에게 발행하는 실제 명령 or 요청  메소드 종류  GET  클라이언트가 서버로부터 문자를 읽을 때  문서검색, 응답 메시지의 본문에 문서내용 포함  HEAD  클라이언트가 문서에 대한 정보를 원할 때  응답에 본문이 없음 (GET 과의 차이 )  POST  클라이언트가 서버에게 정보를 제공시 사용  예 ) 서버에게 입력을 보낼때 사용

HANNAM UNIVERSITY 요청 메시지  PUT  서버에 저장될 새 문서 or 교체문서를 제공시 사용  요청된 문서에 포함, URL 이 지정한 위치에 저장  PATCH  기존 파일의 변경사항 목록만을 포함  COPY  파일을 다른 위치로 복사시 사용  원본 파일 위치는 요청라인 (URL), 목적지 위치는 헤더에서 주어짐  MOVE  파일 이동시 사용  원본 파일 위치는 요청라인 (URL), 목적지 위치는 헤더에서

HANNAM UNIVERSITY 요청 메시지  DELETE  서버에서 문서 제거시 사용  LINK  다른 위치로의 링크나 링크 생성시 사용  원본 파일 위치는 요청라인, 목적지 위치는 헤더에서 주어짐  UNLINK  LINK 에 의해 생성된 링크 삭제시 사용  OPTION  클라이언트가 서버에게 사용 가능한 옵션 질의시 사용

HANNAM UNIVERSITY 14 RESPONSE MESSAGE 24.3

HANNAM UNIVERSITY 응답 메시지

HANNAM UNIVERSITY 응답 메시지  상태라인  응답 메시지의 상태 정의  구성요소 : HTTP 버전, 공백, 상태코드, 공백 상태문구 Status code: Same format as FTP responses (three digits)

HANNAM UNIVERSITY 응답 메시지  HTTP 버전 : HTTP 1.1(1.0, 0.9 도 사용함 )  상태 코드 There is no content in the bodyNo content204 The request is accepted, but it is not immediately acted upon Accepted202 A new URL is createdCreated201 The request is successfulOK200 Success The server is complying with a client request to switch protocols defined in the upgrade header Switching101 The initial part of the request has been received and the client may continue with is request Continue100 Informational DescriptionPhrase Code

HANNAM UNIVERSITY 응답 메시지 The format requested is not acceptableNot acceptable406 The method is not supported in this URL Method not allowed 405 Server Error There is an error, such as a crash, in the server siteInternal server error 500 The requested URL is no longer used by the serverMoved permanently 302 The request lacks proper authorizationUnauthorized401 Service is deniedForbidden403 The service is temporarily unavailable, but may be requested in the future Service unavailable503 The action requested act not be performedNot implement501 The document is not foundNot found404 There is a syntax error in the requestBad request400 Client Error The requested URL has moved temporarilyMoved temporarily304 The requested URL refers to more than one resource Multiple choices301 Redirection DescriptionPhraseCode

HANNAM UNIVERSITY 19 HEADER 24.4

HANNAM UNIVERSITY 헤더  헤더  역할  클라이언트와 서버 사이의 추가적인 정보 교환  형식  헤더이름, 콜론, 공백, 헤더 값

HANNAM UNIVERSITY 헤더  헤더라인  일반헤더 (General headers)  요청헤더 (Request headers)  응답헤더 (Response headers)  항목헤더 (Entity headers)  요청 메시지 : 일반, 요청, 항목헤더만 포함  응답 메시지 : 일반, 응답, 항목헤더만 포함

HANNAM UNIVERSITY 헤더  헤더

HANNAM UNIVERSITY 헤더  일반헤더 (General headers)  메시지에 대한 일반적인 정보 제공  요청과 응답 메시지에 존재 Specifies the preferred communication protocol Upgrade Shows the MIME version used MIME-version Shows the current date Date Shows whether the connection should be closed or not Connection Specifies information about caching Cache-control Header Description

HANNAM UNIVERSITY 헤더  요청헤더 (Request headers)  클라이언트의 구성과 선호하는 문서 형식을 지정 Shows the host and port number of the client Specifies the URL of the linked documentReferrer Send only the portion of the document that is missingIf-range Send the document if not changed since specified dateIf-unmodified-since Identifies the client programUser-agent Send the document only if it dose not matching given tagIf-non-match Send the document only if it matches given tagIf-match Send the document if newer than specified dateIf-modified-since Host Shows the address of the userFrom Shows what permissions the client hasAuthorization Shows the language the client can acceptAccept-language Shows the encoding scheme the client can handleAccept-encoding Shows the character set the client can handleAccept-charset Shows the media format the client can acceptAccept DescriptionHeader

HANNAM UNIVERSITY 헤더  응답헤더 (Response headers)  서버의 구성과 요청에 대한 특별한 정보를 지정  응답 메시지에만 존재 Shows the server name and version number Server Specifies the date after which the server is available Retry-after Shows the supported list of methods Public Shows the age of the document Age Shows if server accepts the range requested by client Accept-range Header Description

HANNAM UNIVERSITY 헤더  항목헤더 (Entity headers)  문서의 본문에 대한 정보 제공  대부분 응답 메시지에 존재, 일부 요청 메시지에도 존재 Specifies the location of the created or moved documentLocation Gives the date and time of the last changeLast-modified Gives the date and time when contents may changeExpires Gives an entity tagEtag Specifies the media typeContent-type Specifies the range of the documentContent-range Shows the length of the documentContent-length Specifies the languageContent-language Specifies the encoding schemeContent-encoding List valid method that can be used with a URLAllow DescriptionHeader

HANNAM UNIVERSITY 27 EXAMPLES 24.5

HANNAM UNIVERSITY 예제 Example 1 This example retrieves a document. We use the GET method to retrieve an image with the path /usr/bin/image1.

HANNAM UNIVERSITY 예제  예제 1

HANNAM UNIVERSITY 예제 Example 2 This example retrieves information about a document. We use the HEAD method to retrieve information about an HTML document (see Chapter 25)

HANNAM UNIVERSITY 예제  예제 2

HANNAM UNIVERSITY 예제 Example 3 In this example, the client wants to send input data to the server. We use the POST method.

HANNAM UNIVERSITY 예제  예제 3

HANNAM UNIVERSITY 34 SOME OTHER FEATURES 24.6

HANNAM UNIVERSITY 몇 가지 다른 특징들 HTTP version 1.1 specifies a persistent connection by default.

HANNAM UNIVERSITY 몇 가지 다른 특징들  Persistent Connection  서버는 응답을 전송한 후에 차후의 요청을 위해 연 결을 열어놓은 상태 유지  클라이언트 요청이나 timeout 인 경우 닫을 수 있다.  Proxy Server  최신 요청에 대한 응답들의 복사물을 가지고 있는 컴퓨터 (cache)