SlideShare ist ein Scribd-Unternehmen logo
1 von 31
HTTP Protocol
Instructor: Prof. Dr. Friedbert Kaspar
Mai Nam Chuong
VGU BIS 2012 – Computer Networks
Definitions
HTTP Communication chain
HTTP Transport binding
HTTP Methods
HTTP Messages
HTTP Status Codes
HTTP Caching
Q&A
Agenda
2
A set of rules and regulations that
determine how data is transmitted.
Communication Protocol?
3
7 OSI layers
HTTP, SMTP, FTP, DNS
…
4
Application vs. Application layer
Application layer provides services for user
applications to use. Or,
User applications use protocols that reside
at the application layer.
Ex: Internet Explorer – HTTP; Outlook –
SMTP
Application layer?
5
Hypertext Transfer Protocol
an application-level protocol for
distributed, collaborative, hypermedia
information systems (RFC-2616)
Not only text but graphics and multimedia
A part of TCP/IP protocols suite
HTTP protocol?
6
HTTP protocol?
7
History
1990 – HTTP/0.9
1996 – HTTP/1.0
1999 – HTTP/1.1
Next HTTP/2.0 (draft)
HTTP protocol?
8
The HTTP protocol is a request/response
protocol
A client sends a request to the server
The server responds data
HTTP Communication chain
Request
Response
HTTP Client HTTP Server9
HTTP Request/Response Chain with
Intermediaries
HTTP Communication chain
Request
Response
HTTP Client
HTTP ServerIntermediary
Request
Response
Proxy
Gateway
10
Do not remember previous
request/response chain
HTTP stateless protocol
Request 1
Response 1
HTTP Client HTTP Server
Request 2
Response 2
How to maintain state?
11
Transitory connection
One connection is created for each
request/response
Persistent connection
The connection is kept open after each
request/response set until the client is done
requesting all the documents.
HTTP Transport binding
12
GET (*)
HEAD (*)
POST (*)
OPTIONS
PUT
DELETE
TRACE
CONNECT
HTTP Methods
13
GET - Requests data from a specified
resource
POST - Submits data to be processed to
a specified resource
HTTP GET vs. POST
14
HTTP GET vs. POST
15
Communication between devices using
the HTTP takes place via HTTP messages
Two types: requests and responses.
Text-based message format.
HTTP Message
16
HTTP Request Message
17
Accept:
tell the server what Internet media types it is willing to
accept in a response
Accept: type/subtype; text/plain; image/jpg; */*
Accept-Charset
specifies what character sets the client is willing to
accept in a response
Accept-Charset: iso-8859-5, UTF-8
Accept-Encoding
specifies what content encodings the client is willing to
accept
Accept-Encoding: compress, gzip
Accept-Language
indicate what languages the client supports
Accept-Language: en-gb; vi-vn
HTTP Request Headers
18
Host:
Specifies the Internet host
Host: www.vgu.edu.vn:8080
User-Agent
Specifies what agent (application) is sending the
request
User-Agent: Mozilla/5.0
Cookie
Cookie data which previously set by the server
Cookie: user=1; category=pc;
Referer
the URL of the resource from which the URL of the
current request was obtained
Referer: http://google.com
HTTP Request Headers (cont.)
19
HTTP Response Message
20
Server
Server info that serves the request
Server: Apache/2.4.1 (Unix)
Expires
gives the date/time after which the response is
considered
Expires: Thu, 20 Jul 2013 16:00:00 GMT
Refresh
Used in redirection, or when a new resource has been
created.
Refresh: 5; url=http://www.vgu.edu.vn
HTTP Response Headers
21
1xx (Informational): Request received, server is
continuing the process.
2xx (Success): The request was successfully
received, understood, accepted and serviced.
3xx (Redirection): Further action must be taken in
order to complete the request.
4xx (Client Error): The request contains bad syntax
or cannot be understood.
5xx (Server Error): The server failed to fulfill an
apparently valid request.
HTTP Status codes
22
200 OK: The request is fulfilled.
301 Move Permanently: The resource
requested for has been permanently
moved to a new location
304 Not Modified: Server notifies that
the resource requested has not been
modified.
Common HTTP Status codes
23
400 Bad Request: Server could not
understand the request (syntax error).
401 Authentication Required: The
requested resource is protected, and
require client’s credential.
403 Forbidden: Server refuses to supply
the resource, regardless of identity of
client.
404 Not Found: The requested resource
cannot be found in the server.
Common HTTP Status codes
24
500 Internal Server Error: Server is error in
the server-side program responding to the
request.
503 Service Unavailable: Server cannot
response due to overloading or
maintenance. The client can try again later.
504 Gateway Timeout: Proxy or Gateway
indicates that it receives a timeout from an
upstream server.
Common HTTP Status codes
25
HTTP is a
stateless
protocol.
Cookies
provide a
mechanism to
"maintain
state".
HTTP Cookie
26
Cache: local copy of a resource
HTTP Caching
Request
Response
HTTP Client
Intermediary
Request
Response
HTTP Server
27
Expiration Model
How long a resource is valid?
Eliminate requests to server
Reduce network round-trip
Cache-Control: max-age=3600
Expires: Tue, 15 Aug 2013 07:19:00 GMT
HTTP Caching
28
Validation Model
When the resource last changed?
Eliminate full response to client
Reduce network bandwidth
If-Modified-Since: Thu, 17 Aug 2006 17:53:51 GMT
ETag: "686897696a7c876b7e"
HTTP Caching
29
RFC-2616:
http://www.w3.org/Protocols/rfc2616/rfc2616.html
TCP GUIDE:
http://www.tcpipguide.com/free/t_TCPIPHypertextTran
sferProtocolHTTP.htm
IBM Software Information Center - The HTTP
protocol
http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/top
ic/com.ibm.cics.ts31.doc/dfhtl/topics/dfhtl29.htm
References
30
Q&A
31

Weitere ähnliche Inhalte

Was ist angesagt?

HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)Gurjot Singh
 
Simple mail transfer protocol (smtp)
Simple mail transfer protocol (smtp) Simple mail transfer protocol (smtp)
Simple mail transfer protocol (smtp) RochakSrivastava3
 
HTTP request and response
HTTP request and responseHTTP request and response
HTTP request and responseSahil Agarwal
 
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...rahul kundu
 
Basics of HTTP - Nafis Fuad
Basics of HTTP - Nafis FuadBasics of HTTP - Nafis Fuad
Basics of HTTP - Nafis FuadCefalo
 
Hypertext transfer protocol (http)
Hypertext transfer protocol (http)Hypertext transfer protocol (http)
Hypertext transfer protocol (http)Shimona Agarwal
 
FTP - File Transfer Protocol
FTP - File Transfer ProtocolFTP - File Transfer Protocol
FTP - File Transfer ProtocolPeter R. Egli
 
Https presentation
Https presentationHttps presentation
Https presentationpatel jatin
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocolselvakumar_b1985
 

Was ist angesagt? (20)

Http protocol
Http protocolHttp protocol
Http protocol
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)
 
Simple mail transfer protocol (smtp)
Simple mail transfer protocol (smtp) Simple mail transfer protocol (smtp)
Simple mail transfer protocol (smtp)
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
Http Protocol
Http ProtocolHttp Protocol
Http Protocol
 
Http
HttpHttp
Http
 
HTTP & HTTPS
HTTP & HTTPSHTTP & HTTPS
HTTP & HTTPS
 
HTTP & WWW
HTTP & WWWHTTP & WWW
HTTP & WWW
 
HTTP request and response
HTTP request and responseHTTP request and response
HTTP request and response
 
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
Hypertext transfer protocol and hypertext transfer protocol secure(HTTP and H...
 
Http Vs Https .
Http Vs Https . Http Vs Https .
Http Vs Https .
 
Smtp
SmtpSmtp
Smtp
 
Basics of HTTP - Nafis Fuad
Basics of HTTP - Nafis FuadBasics of HTTP - Nafis Fuad
Basics of HTTP - Nafis Fuad
 
Http VS. Https
Http VS. HttpsHttp VS. Https
Http VS. Https
 
HTTPS
HTTPSHTTPS
HTTPS
 
Hypertext transfer protocol (http)
Hypertext transfer protocol (http)Hypertext transfer protocol (http)
Hypertext transfer protocol (http)
 
FTP - File Transfer Protocol
FTP - File Transfer ProtocolFTP - File Transfer Protocol
FTP - File Transfer Protocol
 
Https presentation
Https presentationHttps presentation
Https presentation
 
HTTP
HTTPHTTP
HTTP
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 

Andere mochten auch

"Http protocol and other stuff" by Bipin Upadhyay
"Http protocol and other stuff" by Bipin Upadhyay"Http protocol and other stuff" by Bipin Upadhyay
"Http protocol and other stuff" by Bipin UpadhyayBipin Upadhyay
 
Web Crawling- Scraping Ajax Sites
Web Crawling- Scraping Ajax SitesWeb Crawling- Scraping Ajax Sites
Web Crawling- Scraping Ajax SitesPromptCloud
 
C++17 introduction - Meetup @EtixLabs
C++17 introduction - Meetup @EtixLabsC++17 introduction - Meetup @EtixLabs
C++17 introduction - Meetup @EtixLabsStephane Gleizes
 
Web I - 05 - HTTP Protocol
Web I - 05 - HTTP ProtocolWeb I - 05 - HTTP Protocol
Web I - 05 - HTTP ProtocolRandy Connolly
 
Modern c++ (C++ 11/14)
Modern c++ (C++ 11/14)Modern c++ (C++ 11/14)
Modern c++ (C++ 11/14)Geeks Anonymes
 
C++11 concurrency
C++11 concurrencyC++11 concurrency
C++11 concurrencyxu liwei
 
C++17 - the upcoming revolution (Code::Dive 2015)/
C++17 - the upcoming revolution (Code::Dive 2015)/C++17 - the upcoming revolution (Code::Dive 2015)/
C++17 - the upcoming revolution (Code::Dive 2015)/Sławomir Zborowski
 
Networking - TCP/IP stack introduction and IPv6
Networking - TCP/IP stack introduction and IPv6Networking - TCP/IP stack introduction and IPv6
Networking - TCP/IP stack introduction and IPv6Rodolfo Kohn
 
Elements of C++11
Elements of C++11Elements of C++11
Elements of C++11Uilian Ries
 
Database connectivity to sql server asp.net
Database connectivity to sql server asp.netDatabase connectivity to sql server asp.net
Database connectivity to sql server asp.netHemant Sankhla
 
C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012 C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012 Sumant Tambe
 
C++ 11 Style : A Touch of Class
C++ 11 Style : A Touch of ClassC++ 11 Style : A Touch of Class
C++ 11 Style : A Touch of ClassYogendra Rampuria
 
C# Tutorial MSM_Murach chapter-17-slides
C# Tutorial MSM_Murach chapter-17-slidesC# Tutorial MSM_Murach chapter-17-slides
C# Tutorial MSM_Murach chapter-17-slidesSami Mut
 

Andere mochten auch (20)

"Http protocol and other stuff" by Bipin Upadhyay
"Http protocol and other stuff" by Bipin Upadhyay"Http protocol and other stuff" by Bipin Upadhyay
"Http protocol and other stuff" by Bipin Upadhyay
 
Web Crawling- Scraping Ajax Sites
Web Crawling- Scraping Ajax SitesWeb Crawling- Scraping Ajax Sites
Web Crawling- Scraping Ajax Sites
 
What's up with HTTP?
What's up with HTTP?What's up with HTTP?
What's up with HTTP?
 
C++17 introduction - Meetup @EtixLabs
C++17 introduction - Meetup @EtixLabsC++17 introduction - Meetup @EtixLabs
C++17 introduction - Meetup @EtixLabs
 
Web I - 05 - HTTP Protocol
Web I - 05 - HTTP ProtocolWeb I - 05 - HTTP Protocol
Web I - 05 - HTTP Protocol
 
Modern c++ (C++ 11/14)
Modern c++ (C++ 11/14)Modern c++ (C++ 11/14)
Modern c++ (C++ 11/14)
 
TCP/IP
TCP/IPTCP/IP
TCP/IP
 
Bjarne essencegn13
Bjarne essencegn13Bjarne essencegn13
Bjarne essencegn13
 
C++11
C++11C++11
C++11
 
C++11
C++11C++11
C++11
 
C++11 concurrency
C++11 concurrencyC++11 concurrency
C++11 concurrency
 
C++11 & C++14
C++11 & C++14C++11 & C++14
C++11 & C++14
 
C++17 - the upcoming revolution (Code::Dive 2015)/
C++17 - the upcoming revolution (Code::Dive 2015)/C++17 - the upcoming revolution (Code::Dive 2015)/
C++17 - the upcoming revolution (Code::Dive 2015)/
 
Networking - TCP/IP stack introduction and IPv6
Networking - TCP/IP stack introduction and IPv6Networking - TCP/IP stack introduction and IPv6
Networking - TCP/IP stack introduction and IPv6
 
Elements of C++11
Elements of C++11Elements of C++11
Elements of C++11
 
Database connectivity to sql server asp.net
Database connectivity to sql server asp.netDatabase connectivity to sql server asp.net
Database connectivity to sql server asp.net
 
C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012 C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012
 
C++14 Overview
C++14 OverviewC++14 Overview
C++14 Overview
 
C++ 11 Style : A Touch of Class
C++ 11 Style : A Touch of ClassC++ 11 Style : A Touch of Class
C++ 11 Style : A Touch of Class
 
C# Tutorial MSM_Murach chapter-17-slides
C# Tutorial MSM_Murach chapter-17-slidesC# Tutorial MSM_Murach chapter-17-slides
C# Tutorial MSM_Murach chapter-17-slides
 

Ähnlich wie HTTP Protocol Basic

Httpbasics 1207412539273264-9-converted
Httpbasics 1207412539273264-9-convertedHttpbasics 1207412539273264-9-converted
Httpbasics 1207412539273264-9-convertedcomputerorganization
 
Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Nidhitransport
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Distributed web based systems
Distributed web based systemsDistributed web based systems
Distributed web based systemsReza Gh
 
Http basics by-joshi_29_4_15-ppt
Http basics by-joshi_29_4_15-pptHttp basics by-joshi_29_4_15-ppt
Http basics by-joshi_29_4_15-pptQwinix Technologies
 
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptHTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptVietAnhNguyen337355
 
Web and http computer network
Web and http computer networkWeb and http computer network
Web and http computer networkAnil Pokhrel
 
Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3Syed Ariful Islam Emon
 

Ähnlich wie HTTP Protocol Basic (20)

Httpbasics 1207412539273264-9-converted
Httpbasics 1207412539273264-9-convertedHttpbasics 1207412539273264-9-converted
Httpbasics 1207412539273264-9-converted
 
Http_Protocol.pptx
Http_Protocol.pptxHttp_Protocol.pptx
Http_Protocol.pptx
 
www and http services
www and http serviceswww and http services
www and http services
 
Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02
 
Compute rNetwork.pptx
Compute rNetwork.pptxCompute rNetwork.pptx
Compute rNetwork.pptx
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
HTTP_2.ppt
HTTP_2.pptHTTP_2.ppt
HTTP_2.ppt
 
HTTP.ppt
HTTP.pptHTTP.ppt
HTTP.ppt
 
HTTP.ppt
HTTP.pptHTTP.ppt
HTTP.ppt
 
Appl layer
Appl layerAppl layer
Appl layer
 
http presentation 1.pptx
http presentation 1.pptxhttp presentation 1.pptx
http presentation 1.pptx
 
Distributed web based systems
Distributed web based systemsDistributed web based systems
Distributed web based systems
 
Http basics by-joshi_29_4_15-ppt
Http basics by-joshi_29_4_15-pptHttp basics by-joshi_29_4_15-ppt
Http basics by-joshi_29_4_15-ppt
 
WWW & HTTP
WWW & HTTPWWW & HTTP
WWW & HTTP
 
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptHTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
 
Web and http computer network
Web and http computer networkWeb and http computer network
Web and http computer network
 
Application layer
Application layerApplication layer
Application layer
 
Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3
 
Webbasics
WebbasicsWebbasics
Webbasics
 

Mehr von Chuong Mai

Internet marketing - Đăng tin hiệu quả
Internet marketing - Đăng tin hiệu quảInternet marketing - Đăng tin hiệu quả
Internet marketing - Đăng tin hiệu quảChuong Mai
 
Intercultural Management case analysis
Intercultural Management case analysisIntercultural Management case analysis
Intercultural Management case analysisChuong Mai
 
IT governance in SMEs
IT governance in SMEsIT governance in SMEs
IT governance in SMEsChuong Mai
 
Quốc gia khởi nghiệp
Quốc gia khởi nghiệpQuốc gia khởi nghiệp
Quốc gia khởi nghiệpChuong Mai
 
Xác định mục tiêu và lập kế hoạch để đạt được mục tiêu
Xác định mục tiêu và lập kế hoạch để đạt được mục tiêuXác định mục tiêu và lập kế hoạch để đạt được mục tiêu
Xác định mục tiêu và lập kế hoạch để đạt được mục tiêuChuong Mai
 
Online marketing basic
Online marketing basicOnline marketing basic
Online marketing basicChuong Mai
 
Cloud computing made simple
Cloud computing made simpleCloud computing made simple
Cloud computing made simpleChuong Mai
 

Mehr von Chuong Mai (9)

Sql vs. NoSql
Sql vs. NoSqlSql vs. NoSql
Sql vs. NoSql
 
Internet marketing - Đăng tin hiệu quả
Internet marketing - Đăng tin hiệu quảInternet marketing - Đăng tin hiệu quả
Internet marketing - Đăng tin hiệu quả
 
Leadership
LeadershipLeadership
Leadership
 
Intercultural Management case analysis
Intercultural Management case analysisIntercultural Management case analysis
Intercultural Management case analysis
 
IT governance in SMEs
IT governance in SMEsIT governance in SMEs
IT governance in SMEs
 
Quốc gia khởi nghiệp
Quốc gia khởi nghiệpQuốc gia khởi nghiệp
Quốc gia khởi nghiệp
 
Xác định mục tiêu và lập kế hoạch để đạt được mục tiêu
Xác định mục tiêu và lập kế hoạch để đạt được mục tiêuXác định mục tiêu và lập kế hoạch để đạt được mục tiêu
Xác định mục tiêu và lập kế hoạch để đạt được mục tiêu
 
Online marketing basic
Online marketing basicOnline marketing basic
Online marketing basic
 
Cloud computing made simple
Cloud computing made simpleCloud computing made simple
Cloud computing made simple
 

Kürzlich hochgeladen

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Kürzlich hochgeladen (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

HTTP Protocol Basic

  • 1. HTTP Protocol Instructor: Prof. Dr. Friedbert Kaspar Mai Nam Chuong VGU BIS 2012 – Computer Networks
  • 2. Definitions HTTP Communication chain HTTP Transport binding HTTP Methods HTTP Messages HTTP Status Codes HTTP Caching Q&A Agenda 2
  • 3. A set of rules and regulations that determine how data is transmitted. Communication Protocol? 3
  • 4. 7 OSI layers HTTP, SMTP, FTP, DNS … 4
  • 5. Application vs. Application layer Application layer provides services for user applications to use. Or, User applications use protocols that reside at the application layer. Ex: Internet Explorer – HTTP; Outlook – SMTP Application layer? 5
  • 6. Hypertext Transfer Protocol an application-level protocol for distributed, collaborative, hypermedia information systems (RFC-2616) Not only text but graphics and multimedia A part of TCP/IP protocols suite HTTP protocol? 6
  • 8. History 1990 – HTTP/0.9 1996 – HTTP/1.0 1999 – HTTP/1.1 Next HTTP/2.0 (draft) HTTP protocol? 8
  • 9. The HTTP protocol is a request/response protocol A client sends a request to the server The server responds data HTTP Communication chain Request Response HTTP Client HTTP Server9
  • 10. HTTP Request/Response Chain with Intermediaries HTTP Communication chain Request Response HTTP Client HTTP ServerIntermediary Request Response Proxy Gateway 10
  • 11. Do not remember previous request/response chain HTTP stateless protocol Request 1 Response 1 HTTP Client HTTP Server Request 2 Response 2 How to maintain state? 11
  • 12. Transitory connection One connection is created for each request/response Persistent connection The connection is kept open after each request/response set until the client is done requesting all the documents. HTTP Transport binding 12
  • 13. GET (*) HEAD (*) POST (*) OPTIONS PUT DELETE TRACE CONNECT HTTP Methods 13
  • 14. GET - Requests data from a specified resource POST - Submits data to be processed to a specified resource HTTP GET vs. POST 14
  • 15. HTTP GET vs. POST 15
  • 16. Communication between devices using the HTTP takes place via HTTP messages Two types: requests and responses. Text-based message format. HTTP Message 16
  • 18. Accept: tell the server what Internet media types it is willing to accept in a response Accept: type/subtype; text/plain; image/jpg; */* Accept-Charset specifies what character sets the client is willing to accept in a response Accept-Charset: iso-8859-5, UTF-8 Accept-Encoding specifies what content encodings the client is willing to accept Accept-Encoding: compress, gzip Accept-Language indicate what languages the client supports Accept-Language: en-gb; vi-vn HTTP Request Headers 18
  • 19. Host: Specifies the Internet host Host: www.vgu.edu.vn:8080 User-Agent Specifies what agent (application) is sending the request User-Agent: Mozilla/5.0 Cookie Cookie data which previously set by the server Cookie: user=1; category=pc; Referer the URL of the resource from which the URL of the current request was obtained Referer: http://google.com HTTP Request Headers (cont.) 19
  • 21. Server Server info that serves the request Server: Apache/2.4.1 (Unix) Expires gives the date/time after which the response is considered Expires: Thu, 20 Jul 2013 16:00:00 GMT Refresh Used in redirection, or when a new resource has been created. Refresh: 5; url=http://www.vgu.edu.vn HTTP Response Headers 21
  • 22. 1xx (Informational): Request received, server is continuing the process. 2xx (Success): The request was successfully received, understood, accepted and serviced. 3xx (Redirection): Further action must be taken in order to complete the request. 4xx (Client Error): The request contains bad syntax or cannot be understood. 5xx (Server Error): The server failed to fulfill an apparently valid request. HTTP Status codes 22
  • 23. 200 OK: The request is fulfilled. 301 Move Permanently: The resource requested for has been permanently moved to a new location 304 Not Modified: Server notifies that the resource requested has not been modified. Common HTTP Status codes 23
  • 24. 400 Bad Request: Server could not understand the request (syntax error). 401 Authentication Required: The requested resource is protected, and require client’s credential. 403 Forbidden: Server refuses to supply the resource, regardless of identity of client. 404 Not Found: The requested resource cannot be found in the server. Common HTTP Status codes 24
  • 25. 500 Internal Server Error: Server is error in the server-side program responding to the request. 503 Service Unavailable: Server cannot response due to overloading or maintenance. The client can try again later. 504 Gateway Timeout: Proxy or Gateway indicates that it receives a timeout from an upstream server. Common HTTP Status codes 25
  • 26. HTTP is a stateless protocol. Cookies provide a mechanism to "maintain state". HTTP Cookie 26
  • 27. Cache: local copy of a resource HTTP Caching Request Response HTTP Client Intermediary Request Response HTTP Server 27
  • 28. Expiration Model How long a resource is valid? Eliminate requests to server Reduce network round-trip Cache-Control: max-age=3600 Expires: Tue, 15 Aug 2013 07:19:00 GMT HTTP Caching 28
  • 29. Validation Model When the resource last changed? Eliminate full response to client Reduce network bandwidth If-Modified-Since: Thu, 17 Aug 2006 17:53:51 GMT ETag: "686897696a7c876b7e" HTTP Caching 29
  • 30. RFC-2616: http://www.w3.org/Protocols/rfc2616/rfc2616.html TCP GUIDE: http://www.tcpipguide.com/free/t_TCPIPHypertextTran sferProtocolHTTP.htm IBM Software Information Center - The HTTP protocol http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/top ic/com.ibm.cics.ts31.doc/dfhtl/topics/dfhtl29.htm References 30

Hinweis der Redaktion

  1. http://www.tcpipguide.com/free/t_ApplicationLayerLayer7.htm
  2. 1.0 http://www.ietf.org/rfc/rfc1945.txt1.1 http://www.w3.org/Protocols/rfc2616/rfc2616.html2.0 http://tools.ietf.org/html/draft-ietf-httpbis-http2-04The Hypertext Transfer Protocol (HTTP) is designed to enable communications between clients and servers.HTTP works as a request-response protocol between a client and server.A web browser may be the client, and an application on a computer that hosts a web site may be the server.Example: A client (browser) submits an HTTP request to the server; then the server returns a response to the client. The response contains status information about the request and may also the requested content.
  3. A part of TCP/IP protocols suite
  4. 0.9: The first version of HTTP, HTTP/0.9, was part of the early World Wide Web and was a very simple request/response protocol with limited capabilities that could transfer only text files.1.0 http://www.ietf.org/rfc/rfc1945.txtThe first widely-used version was HTTP/1.0, which is a more complete protocol that allows the transport of many types of files and resources.1.1 http://www.w3.org/Protocols/rfc2616/rfc2616.htmlMultiple host name. Multiple host on 1 IPPerformance, security2.0 http://tools.ietf.org/html/draft-ietf-httpbis-http2-04
  5. HTTP is a client/server-oriented, request/reply protocol. Basic communication consists of an HTTP Request message sent by an HTTP client to an HTTP server, which returns an HTTP Response message back to the client.
  6. Proxy:A proxy is a forwarding agent, receiving requests for a URI in its absolute form, rewriting all or part of the message, and forwarding the reformatted request toward the server.Gateway: receiving agent. A router that routes the data transmission.
  7. Persistent connections are connections between a Web client and a server that can be reused for more than one exchange of a request and a response.In HTTP/1.0, the default action for the server was to close the connection when it had received a request from the Web client and sent a response. If the Web client wanted the server to keep the connection open, it had to send a Connection: Keep-Alive header on the request.For HTTP/1.1, persistent connections are the default. When a connection is made between a Web client and a server, the server should keep the connection open by default. The connection should only be closed if the Web client requests closure by sending a Connection: close header, or if the server's timeout setting is reached, or if the server encounters an error.Persistent connections improve network performance because a new connection does not have to be established for each request. Establishing a new connection consumes significant additional network resources compared to making a request using an existing connection.DEMO using telnetDraw HTML document on the WHITEBOARD
  8. http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.htmlTelnet demo Get and HeadGET:Retrieve a resource.HEAD Like GET, but returns just the HTTP header.POST create new resourceOPTIONS Get information about how the server allows to communicate with. OPTIONS * HTTP/1.1 Host: example.com HTTP/1.1 200 OK Date: … Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE Content-Length: 0PUT Send data to the server.DELETE Delete an existing resource.TRACE Return the request headers sent by the client.
  9. Demo Web sniffer tool
  10. In this example, the client issues a GET request to ask for a document named "/index.html"; and negotiates to use HTTP/1.0 protocol. A blank line is needed after the request header. This request message does not contain a body.The server receives the request message, interprets and maps the request-URI to a document under its document directory. If the requested document is available, the server returns the document with a response status code "200 OK". The response headers provide the necessary description of the document returned, such as the last-modified date (Last-Modified), the MIME type (Content-Type), and the length of the document (Content-Length). The response body contains the requested document. The browser will format and display the document according to its media type (e.g., Plain-text, HTML, JPEG, GIF, and etc.) and other information obtained from the response headers.
  11. DEMO using chrome to access resources
  12. Important especially in authenticationNo cookie -> no sessionDEMO login google, yahoo
  13. The cache, which is local copies of resources, works because many resources change infrequently. When a browser can reuse a local copy, it saves the time to set up a connection as well as the time to download. The key to making the cache work effectively is HTTP caching headers, which are sent by the web server to specify how long a resource is valid and when it last changed.
  14. The Expires header specifies a date after which a resource is invalid. max-age specifies how long a resource is after it is downloaded.DEMOhttp://stevesouders.com/hpws/expiresoff.phphttp://stevesouders.com/hpws/expireson.php
  15. If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match