SlideShare une entreprise Scribd logo
1  sur  56
Télécharger pour lire hors ligne
HTTP
Hypertext Transfer Protocol
Tricode Professional Services
www.tricode.nl

25-06-2010
Marcel Blok
Index
 Introduction
 Message format
 Methods
 Status codes
 Headers
      General headers
      Request headers
      Response headers
      Entity headers
 Entities
 Chunked transfer
Introduction
The Hypertext Transfer Protocol (HTTP) began as an
extremely basic protocol.

It was designed to do just one thing: allow a client
to send a simple request for a hypertext file and
receive it back from the server.
Modern HTTP remains at its heart a straight-forward
request/reply protocol, but now includes many
new features and capabilities to support the
growing size of the World Wide Web.
Basic communication consists of a request
message sent by a client to a server, which returns
a response back to the client.
Since HTTP/1.1 we have persistent connections.
Multiple requests to the same server use the same
TCP connection.
Message format
All HTTP messages are created to fit a message
structure that is called the generic message
format.
Generic message layout:

<start-line>
<message-headers>
<empty-line>
[ <message-body> ]
[ <message-trailers> ]
HTTP Request message layout:

<start-line>
<general-headers>
<request-headers>
[ <entity-headers> ]
<empty-line>
[ <message-body> ]
[ <message-trailers> ]
start line
                                   general headers
 GET /index.html HTTP/1.1
 Date: Wed, 23 Jun 2010 13:27:42 CET
 Connection: close
 Host: www.somesite.com
 From: me@anothersite.com
 Accept: text/html, text/plain
 User-Agent: Mozilla/4.0 (Windows 98; U)

 (empty body)




request headers
General headers refer to the message itself and are
used to control the processing or provide extra info.
Request headers convey more details about the
request and provide info about how the request is
handled.
Entity headers describe the entity contained in the
message body.
HTTP Response message layout:

<start-line>
<general-headers>
<response-headers>
[ <entity-headers> ]
<empty-line>
[ <message-body> ]
[ <message-trailers> ]
start line
                                  general headers
 HTTP/1.1 200 OK
 Date: Wed, 23 Jun 2010 13:27:43 CET
 Connection: close
 Server: Apache/1.3.27
 Accept-Ranges: bytes
 Content-Type: text/html
 Content-Length: 170
 Last-Modified: Mon, 17 May 2004 12:11:11
                                            entity
 <html><head><title>Test</title></head>     headers
 <body><p>test</p></body></html>




response headers                   body
Methods
All client/server protocols provide a way for the
client to prompt the server to take action,
generally by having the client give the server a
series of commands.
HTTP does not have commands but rather a fixed
set of methods that can be applied to any
thinkable resource.
GET, POST, PUT, DELETE

TRACE, HEAD, OPTIONS
PUT is placing or replacing a resource at a given
location.

PUT is idempotent: it has no side effects. You may
repeat it and the result is the same.
POST is merely sending data to a resource
location. It can be handled by the server in
anyway it wants. It may store the data privately. It
may store it at the current location. It may update
many resources. It may self destruct.
Status codes
Each HTTP response includes both a numeric status
code and a text reason phrase, both of which
indicate the disposition of the corresponding client
request.
1xx   Informational message
2xx   Success
3xx   Redirection
4xx   Client error
5xx   Server error
Headers
The limited amount of methods may give the
impression that HTTP is quite limited. But much of
the functionality is implemented by the message
headers.
General headers
Cache-Control, Connection, Date, Pragma,
Transfer-Encoding, Upgrade, Via and Warning are
some of the HTTP general headers.
Example

Cache-Control: no-store
Transfer-Encoding: chunked
Upgrade: IRC/6.9
Via: 1.0 myproxy, 1.1 where.com
Request headers
Accept, Accept-Charset, Accept-Encoding,
Accept-Language, Authorization, Expect, From,
Host, If-Match, If-Modified-Since, If-None-Match, If-
Range, If-Unmodified-Since, Max-Forwards,
Referer, User-Agent

are some of the HTTP request headers.
Example

Accept: audio/*; q=0.2, audio/basic
Accept-Encoding: compress, gzip
From: me@some.org
Host: www.some.org
Referer: http://www.tst.org/at/1.html User-Agent:
Mozilla/4.0
Conditional GET example

GET /someurl HTTP/1.1
If-Modified-Since: Wed, 23 Jun 2010 13:27:43 CET



HTTP/1.1 304 NOT MODIFIED
Secure GET example

GET /someurl HTTP/1.1
Authorization: GOOG1 GOC7F:Y9ts=



HTTP/1.1 401 UNAUTHORIZED
WWW-Authenticate: GOOG1
Response headers
Accept-Ranges, Age, ETag, Location, Proxy-
Authenticate, Retry-After, Server, Vary, WWW-
Authenticate are some of the HTTP response
headers.
Example

Age: 3356
ETag: “1fd32ada-asd-qra8as”
Server: CERN/3.0 libwww/2.17
WWW-Authenticate: GOOG1
Conditional GET example (2)

GET /someurl HTTP/1.1
If-None-Match: “1fd32ada-asd-qra8as”



HTTP/1.1 304 NOT MODIFIED
Conditional PUT example

PUT /someurl HTTP/1.1
If-Match: “1fd32ada-asd-qra8as”



HTTP/1.1 412 PRECONDITION FAILED
Entity headers
Entity headers describe the nature of the entity in
the message body, including its type, language
and encoding, to facilitate the proper processing
and/or presentation of the entity by the device
receiving it.
Allow, Content-Encoding, Content-Language,
Content-Length, Content-Location, Content-MD5,
Content-Range, Content-Type, Expires, Last-
Modified are some of the HTTP entity headers.
Example

HEAD /someurl HTTP/1.1



HTTP/1.1 200 OK
Last-Modified: Wed, 23 Jun 2010 13:27:43 CET
Entities
While HTTP is naturally associated with hypertext, its
messages can transport a large variety of different
types of files, including images, audio, video and
much more.
To indicate the type of entity contained in an HTTP
message, its sender must identify its media type
and subtype. This is done using the HTTP Content-
Type header, which was borrowed from the
Multipurpose Internet Mail Extensions (MIME)
specification.
Even though HTTP borrows several concepts and
header types from MIME, the protocol is not MIME-
compliant.
Content encoding tells something about the
encoding of the entity.

Transfer-encoding tells something about the entire
HTTP message, and may change from hop to hop.
Chunked transfer
Since HTTP/1.1 uses persistent connections that
allow multiple requests and responses to be sent
over a TCP connection, clients and servers need
some way to identify where one message ends
and the next begins.
The easiest way is to send the Content-Length
header with the message size. But for dynamic
content you may not know this in advance. In this
case you can use chunked transfer encoding.
chunked message body:

<chunk-1-length>
<chunk-1-data>
<chunk-2-length>
<chunk-2-data>
...
0
<message-trailers>
HTTP/1.1 200 OK
Date: Mon, 22 Mar 2004 11:15:03 GMT
Content-Type: text/html
Content-Length: 129
Expires: Sat, 27 Mar 2004 21:12:00 GMT

<html><body><p>The file you requested is 3,400 bytes long
and was last modified: Sat, 20 Mar 2004 21:12:00
GMT.</p></body></html>
HTTP/1.1 200 OK
Date: Mon, 22 Mar 2004 11:15:03 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Trailer: Expires
29
<html><body><p>The file you requested is
5
3,400
23
bytes long and was last modified:
1d
Sat, 20 Mar 2004 21:12:00 GMT
13
.</p></body></html>
0
Expires: Sat, 27 Mar 2004 21:12:00 GMT
More…?
•   Content negotiation
•   Cache, cache, cache!
•   HTTPS
•   Cookies

• Same Origin Policy
• Cross-Origin Resource Sharing

Contenu connexe

Tendances

Tendances (20)

HTTP
HTTPHTTP
HTTP
 
Http protocol
Http protocolHttp protocol
Http protocol
 
HTTP request and response
HTTP request and responseHTTP request and response
HTTP request and response
 
HyperText Transfer Protocol
HyperText Transfer ProtocolHyperText Transfer Protocol
HyperText Transfer Protocol
 
Http
HttpHttp
Http
 
What's up with HTTP?
What's up with HTTP?What's up with HTTP?
What's up with HTTP?
 
HTTP fundamentals for developers
HTTP fundamentals for developersHTTP fundamentals for developers
HTTP fundamentals for developers
 
HTTP Protocol Basic
HTTP Protocol BasicHTTP Protocol Basic
HTTP Protocol Basic
 
21 HTTP Protocol #burningkeyboards
21 HTTP Protocol #burningkeyboards21 HTTP Protocol #burningkeyboards
21 HTTP Protocol #burningkeyboards
 
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
 
HTTP & WWW
HTTP & WWWHTTP & WWW
HTTP & WWW
 
Hypertext transfer protocol (http)
Hypertext transfer protocol (http)Hypertext transfer protocol (http)
Hypertext transfer protocol (http)
 
Http VS. Https
Http VS. HttpsHttp VS. Https
Http VS. Https
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
HTTP Definition and Basics.
HTTP Definition and Basics.HTTP Definition and Basics.
HTTP Definition and Basics.
 
Http - All you need to know
Http - All you need to knowHttp - All you need to know
Http - All you need to know
 
HTTP
HTTPHTTP
HTTP
 
Http
HttpHttp
Http
 
Http Vs Https .
Http Vs Https . Http Vs Https .
Http Vs Https .
 
HTTP
HTTPHTTP
HTTP
 

En vedette

Kwalitatief unit testen, hoe pak je dit aan?
Kwalitatief unit testen, hoe pak je dit aan?Kwalitatief unit testen, hoe pak je dit aan?
Kwalitatief unit testen, hoe pak je dit aan?Tricode (part of Dept)
 
We Open-Sourced Three Apps and Here's Why
We Open-Sourced Three Apps and Here's WhyWe Open-Sourced Three Apps and Here's Why
We Open-Sourced Three Apps and Here's WhyTricode (part of Dept)
 
Content Marketing: How to Create Relevant Content for Your Audience
Content Marketing: How to Create Relevant Content for Your AudienceContent Marketing: How to Create Relevant Content for Your Audience
Content Marketing: How to Create Relevant Content for Your AudienceTricode (part of Dept)
 
B2B ecommerce: connecting with your customers
B2B ecommerce: connecting with your customersB2B ecommerce: connecting with your customers
B2B ecommerce: connecting with your customersTricode (part of Dept)
 
Continuous Delivery for Open Source Java projects
Continuous Delivery for Open Source Java projectsContinuous Delivery for Open Source Java projects
Continuous Delivery for Open Source Java projectsTricode (part of Dept)
 
12 hot features to engage and save time with aem 6.2
12 hot features to engage and save time with aem 6.212 hot features to engage and save time with aem 6.2
12 hot features to engage and save time with aem 6.2Tricode (part of Dept)
 
AEM Digital Assets Management - What's new in 6.2?
AEM Digital Assets Management - What's new in 6.2?AEM Digital Assets Management - What's new in 6.2?
AEM Digital Assets Management - What's new in 6.2?Tricode (part of Dept)
 
The world of gradle - an introduction for developers
The world of gradle  - an introduction for developersThe world of gradle  - an introduction for developers
The world of gradle - an introduction for developersTricode (part of Dept)
 
Adobe Experience Manager - The hub within the Marketing Cloud
Adobe Experience Manager - The hub within the Marketing CloudAdobe Experience Manager - The hub within the Marketing Cloud
Adobe Experience Manager - The hub within the Marketing CloudTricode (part of Dept)
 

En vedette (18)

Content Marketing - Facts & Figures
Content Marketing - Facts & FiguresContent Marketing - Facts & Figures
Content Marketing - Facts & Figures
 
AngularJS filters
AngularJS filtersAngularJS filters
AngularJS filters
 
Content meets Customer Journey
Content meets Customer JourneyContent meets Customer Journey
Content meets Customer Journey
 
Tricode = Career + Fun
Tricode = Career + FunTricode = Career + Fun
Tricode = Career + Fun
 
Magnolia CMS
Magnolia CMSMagnolia CMS
Magnolia CMS
 
Kwalitatief unit testen, hoe pak je dit aan?
Kwalitatief unit testen, hoe pak je dit aan?Kwalitatief unit testen, hoe pak je dit aan?
Kwalitatief unit testen, hoe pak je dit aan?
 
We Open-Sourced Three Apps and Here's Why
We Open-Sourced Three Apps and Here's WhyWe Open-Sourced Three Apps and Here's Why
We Open-Sourced Three Apps and Here's Why
 
Dive into AngularJS and directives
Dive into AngularJS and directivesDive into AngularJS and directives
Dive into AngularJS and directives
 
Online marketing trends 2016
Online marketing trends 2016Online marketing trends 2016
Online marketing trends 2016
 
Content Marketing: How to Create Relevant Content for Your Audience
Content Marketing: How to Create Relevant Content for Your AudienceContent Marketing: How to Create Relevant Content for Your Audience
Content Marketing: How to Create Relevant Content for Your Audience
 
B2B ecommerce: connecting with your customers
B2B ecommerce: connecting with your customersB2B ecommerce: connecting with your customers
B2B ecommerce: connecting with your customers
 
Continuous Delivery for Open Source Java projects
Continuous Delivery for Open Source Java projectsContinuous Delivery for Open Source Java projects
Continuous Delivery for Open Source Java projects
 
12 hot features to engage and save time with aem 6.2
12 hot features to engage and save time with aem 6.212 hot features to engage and save time with aem 6.2
12 hot features to engage and save time with aem 6.2
 
AEM Digital Assets Management - What's new in 6.2?
AEM Digital Assets Management - What's new in 6.2?AEM Digital Assets Management - What's new in 6.2?
AEM Digital Assets Management - What's new in 6.2?
 
The world of gradle - an introduction for developers
The world of gradle  - an introduction for developersThe world of gradle  - an introduction for developers
The world of gradle - an introduction for developers
 
Deep Learning - STM 6
Deep Learning - STM 6Deep Learning - STM 6
Deep Learning - STM 6
 
Customers speak on Magnolia CMS
Customers speak on Magnolia CMSCustomers speak on Magnolia CMS
Customers speak on Magnolia CMS
 
Adobe Experience Manager - The hub within the Marketing Cloud
Adobe Experience Manager - The hub within the Marketing CloudAdobe Experience Manager - The hub within the Marketing Cloud
Adobe Experience Manager - The hub within the Marketing Cloud
 

Similaire à HTTP

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
 
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptHTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptVietAnhNguyen337355
 
PHP Training: Module 1
PHP Training: Module 1PHP Training: Module 1
PHP Training: Module 1hussulinux
 
Web Server Technologies I: HTTP
Web Server Technologies I: HTTP Web Server Technologies I: HTTP
Web Server Technologies I: HTTP webhostingguy
 
Web Server Technologies I: HTTP & Getting Started
Web Server Technologies I: HTTP & Getting StartedWeb Server Technologies I: HTTP & Getting Started
Web Server Technologies I: HTTP & Getting StartedPort80 Software
 
HTTP 완벽가이드 1장.
HTTP 완벽가이드 1장.HTTP 완벽가이드 1장.
HTTP 완벽가이드 1장.HyeonSeok Choi
 
Dictributed application by Waqas
Dictributed application by WaqasDictributed application by Waqas
Dictributed application by WaqasWaqas !!!!
 
Distributedapplications
DistributedapplicationsDistributedapplications
DistributedapplicationsWaqas !!!!
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocolselvakumar_b1985
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 

Similaire à HTTP (20)

Starting With Php
Starting With PhpStarting With Php
Starting With Php
 
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
 
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptHTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
 
PHP Training: Module 1
PHP Training: Module 1PHP Training: Module 1
PHP Training: Module 1
 
HTTP1.1/2 overview
HTTP1.1/2 overviewHTTP1.1/2 overview
HTTP1.1/2 overview
 
Web Server Technologies I: HTTP
Web Server Technologies I: HTTP Web Server Technologies I: HTTP
Web Server Technologies I: HTTP
 
Web Server Technologies I: HTTP & Getting Started
Web Server Technologies I: HTTP & Getting StartedWeb Server Technologies I: HTTP & Getting Started
Web Server Technologies I: HTTP & Getting Started
 
Http methods
Http methodsHttp methods
Http methods
 
Web
WebWeb
Web
 
HTTP 완벽가이드 1장.
HTTP 완벽가이드 1장.HTTP 완벽가이드 1장.
HTTP 완벽가이드 1장.
 
Http_Protocol.pptx
Http_Protocol.pptxHttp_Protocol.pptx
Http_Protocol.pptx
 
Dictributed application by Waqas
Dictributed application by WaqasDictributed application by Waqas
Dictributed application by Waqas
 
Distributedapplications
DistributedapplicationsDistributedapplications
Distributedapplications
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
Http Introduction
Http IntroductionHttp Introduction
Http Introduction
 
web_01_HTTP.ppt
web_01_HTTP.pptweb_01_HTTP.ppt
web_01_HTTP.ppt
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
HTTP
HTTPHTTP
HTTP
 
www and http services
www and http serviceswww and http services
www and http services
 

Plus de Tricode (part of Dept)

The Top Benefits of Magnolia CMS’s Inspirational Open Suite Ideology
The Top Benefits of Magnolia CMS’s Inspirational Open Suite IdeologyThe Top Benefits of Magnolia CMS’s Inspirational Open Suite Ideology
The Top Benefits of Magnolia CMS’s Inspirational Open Suite IdeologyTricode (part of Dept)
 
Mobile Sensor Networks based on Smartphone devices and Web Services
Mobile Sensor Networks based on Smartphone devices and Web ServicesMobile Sensor Networks based on Smartphone devices and Web Services
Mobile Sensor Networks based on Smartphone devices and Web ServicesTricode (part of Dept)
 
Keeping Your Clients Happy and Your Management Even Happier
Keeping Your Clients Happy and Your Management Even Happier Keeping Your Clients Happy and Your Management Even Happier
Keeping Your Clients Happy and Your Management Even Happier Tricode (part of Dept)
 
Porn, the leading influencer of Technology
Porn, the leading influencer of Technology Porn, the leading influencer of Technology
Porn, the leading influencer of Technology Tricode (part of Dept)
 
De 4 belangrijkste risicofactoren van het nearshoring proces
De 4 belangrijkste risicofactoren van het nearshoring procesDe 4 belangrijkste risicofactoren van het nearshoring proces
De 4 belangrijkste risicofactoren van het nearshoring procesTricode (part of Dept)
 
Internet Addiction (Social Media Edition)
Internet Addiction (Social Media Edition)Internet Addiction (Social Media Edition)
Internet Addiction (Social Media Edition)Tricode (part of Dept)
 
Kids Can Code - an interactive IT workshop
Kids Can Code - an interactive IT workshopKids Can Code - an interactive IT workshop
Kids Can Code - an interactive IT workshopTricode (part of Dept)
 
How Technology is Affecting Society - STM 6
How Technology is Affecting Society - STM 6How Technology is Affecting Society - STM 6
How Technology is Affecting Society - STM 6Tricode (part of Dept)
 
Monolithic to Microservices Architecture - STM 6
Monolithic to Microservices Architecture - STM 6Monolithic to Microservices Architecture - STM 6
Monolithic to Microservices Architecture - STM 6Tricode (part of Dept)
 
10 nearshoring it trends om in 2016 te volgen
10 nearshoring it trends om in 2016 te volgen 10 nearshoring it trends om in 2016 te volgen
10 nearshoring it trends om in 2016 te volgen Tricode (part of Dept)
 
Why you should use Adobe Experience Manager Mobile
Why you should use Adobe Experience Manager Mobile Why you should use Adobe Experience Manager Mobile
Why you should use Adobe Experience Manager Mobile Tricode (part of Dept)
 
Introducing: Tricode's Software Factory
Introducing: Tricode's Software FactoryIntroducing: Tricode's Software Factory
Introducing: Tricode's Software FactoryTricode (part of Dept)
 
Communication and its Importance to a Developer
Communication and its Importance to a DeveloperCommunication and its Importance to a Developer
Communication and its Importance to a DeveloperTricode (part of Dept)
 

Plus de Tricode (part of Dept) (20)

The Top Benefits of Magnolia CMS’s Inspirational Open Suite Ideology
The Top Benefits of Magnolia CMS’s Inspirational Open Suite IdeologyThe Top Benefits of Magnolia CMS’s Inspirational Open Suite Ideology
The Top Benefits of Magnolia CMS’s Inspirational Open Suite Ideology
 
Agile QA 2017: A New Hope
Agile QA 2017: A New HopeAgile QA 2017: A New Hope
Agile QA 2017: A New Hope
 
Mobile Sensor Networks based on Smartphone devices and Web Services
Mobile Sensor Networks based on Smartphone devices and Web ServicesMobile Sensor Networks based on Smartphone devices and Web Services
Mobile Sensor Networks based on Smartphone devices and Web Services
 
Keeping Your Clients Happy and Your Management Even Happier
Keeping Your Clients Happy and Your Management Even Happier Keeping Your Clients Happy and Your Management Even Happier
Keeping Your Clients Happy and Your Management Even Happier
 
Intro to JHipster
Intro to JHipster Intro to JHipster
Intro to JHipster
 
Porn, the leading influencer of Technology
Porn, the leading influencer of Technology Porn, the leading influencer of Technology
Porn, the leading influencer of Technology
 
De 4 belangrijkste risicofactoren van het nearshoring proces
De 4 belangrijkste risicofactoren van het nearshoring procesDe 4 belangrijkste risicofactoren van het nearshoring proces
De 4 belangrijkste risicofactoren van het nearshoring proces
 
Internet Addiction (Social Media Edition)
Internet Addiction (Social Media Edition)Internet Addiction (Social Media Edition)
Internet Addiction (Social Media Edition)
 
Kids Can Code - an interactive IT workshop
Kids Can Code - an interactive IT workshopKids Can Code - an interactive IT workshop
Kids Can Code - an interactive IT workshop
 
RESTful API - Best Practices
RESTful API - Best PracticesRESTful API - Best Practices
RESTful API - Best Practices
 
How Technology is Affecting Society - STM 6
How Technology is Affecting Society - STM 6How Technology is Affecting Society - STM 6
How Technology is Affecting Society - STM 6
 
Monolithic to Microservices Architecture - STM 6
Monolithic to Microservices Architecture - STM 6Monolithic to Microservices Architecture - STM 6
Monolithic to Microservices Architecture - STM 6
 
Quality Nearshoring met Tricode
Quality Nearshoring met TricodeQuality Nearshoring met Tricode
Quality Nearshoring met Tricode
 
10 nearshoring it trends om in 2016 te volgen
10 nearshoring it trends om in 2016 te volgen 10 nearshoring it trends om in 2016 te volgen
10 nearshoring it trends om in 2016 te volgen
 
Tricode & Magnolia
Tricode & MagnoliaTricode & Magnolia
Tricode & Magnolia
 
Why you should use Adobe Experience Manager Mobile
Why you should use Adobe Experience Manager Mobile Why you should use Adobe Experience Manager Mobile
Why you should use Adobe Experience Manager Mobile
 
Introducing: Tricode's Software Factory
Introducing: Tricode's Software FactoryIntroducing: Tricode's Software Factory
Introducing: Tricode's Software Factory
 
Offshoring: Top 10 verborgen kosten
Offshoring: Top 10 verborgen kostenOffshoring: Top 10 verborgen kosten
Offshoring: Top 10 verborgen kosten
 
Communication and its Importance to a Developer
Communication and its Importance to a DeveloperCommunication and its Importance to a Developer
Communication and its Importance to a Developer
 
Little Brother Is Watching You
Little Brother Is Watching YouLittle Brother Is Watching You
Little Brother Is Watching You
 

Dernier

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Dernier (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

HTTP

  • 1. HTTP Hypertext Transfer Protocol Tricode Professional Services www.tricode.nl 25-06-2010 Marcel Blok
  • 2. Index Introduction Message format Methods Status codes Headers General headers Request headers Response headers Entity headers Entities Chunked transfer
  • 4. The Hypertext Transfer Protocol (HTTP) began as an extremely basic protocol. It was designed to do just one thing: allow a client to send a simple request for a hypertext file and receive it back from the server.
  • 5. Modern HTTP remains at its heart a straight-forward request/reply protocol, but now includes many new features and capabilities to support the growing size of the World Wide Web.
  • 6. Basic communication consists of a request message sent by a client to a server, which returns a response back to the client.
  • 7. Since HTTP/1.1 we have persistent connections. Multiple requests to the same server use the same TCP connection.
  • 9. All HTTP messages are created to fit a message structure that is called the generic message format.
  • 11. HTTP Request message layout: <start-line> <general-headers> <request-headers> [ <entity-headers> ] <empty-line> [ <message-body> ] [ <message-trailers> ]
  • 12. start line general headers GET /index.html HTTP/1.1 Date: Wed, 23 Jun 2010 13:27:42 CET Connection: close Host: www.somesite.com From: me@anothersite.com Accept: text/html, text/plain User-Agent: Mozilla/4.0 (Windows 98; U) (empty body) request headers
  • 13. General headers refer to the message itself and are used to control the processing or provide extra info. Request headers convey more details about the request and provide info about how the request is handled. Entity headers describe the entity contained in the message body.
  • 14. HTTP Response message layout: <start-line> <general-headers> <response-headers> [ <entity-headers> ] <empty-line> [ <message-body> ] [ <message-trailers> ]
  • 15. start line general headers HTTP/1.1 200 OK Date: Wed, 23 Jun 2010 13:27:43 CET Connection: close Server: Apache/1.3.27 Accept-Ranges: bytes Content-Type: text/html Content-Length: 170 Last-Modified: Mon, 17 May 2004 12:11:11 entity <html><head><title>Test</title></head> headers <body><p>test</p></body></html> response headers body
  • 17. All client/server protocols provide a way for the client to prompt the server to take action, generally by having the client give the server a series of commands.
  • 18. HTTP does not have commands but rather a fixed set of methods that can be applied to any thinkable resource.
  • 19. GET, POST, PUT, DELETE TRACE, HEAD, OPTIONS
  • 20. PUT is placing or replacing a resource at a given location. PUT is idempotent: it has no side effects. You may repeat it and the result is the same.
  • 21. POST is merely sending data to a resource location. It can be handled by the server in anyway it wants. It may store the data privately. It may store it at the current location. It may update many resources. It may self destruct.
  • 23. Each HTTP response includes both a numeric status code and a text reason phrase, both of which indicate the disposition of the corresponding client request.
  • 24. 1xx Informational message 2xx Success 3xx Redirection 4xx Client error 5xx Server error
  • 26. The limited amount of methods may give the impression that HTTP is quite limited. But much of the functionality is implemented by the message headers.
  • 28. Cache-Control, Connection, Date, Pragma, Transfer-Encoding, Upgrade, Via and Warning are some of the HTTP general headers.
  • 31. Accept, Accept-Charset, Accept-Encoding, Accept-Language, Authorization, Expect, From, Host, If-Match, If-Modified-Since, If-None-Match, If- Range, If-Unmodified-Since, Max-Forwards, Referer, User-Agent are some of the HTTP request headers.
  • 32. Example Accept: audio/*; q=0.2, audio/basic Accept-Encoding: compress, gzip From: me@some.org Host: www.some.org Referer: http://www.tst.org/at/1.html User-Agent: Mozilla/4.0
  • 33. Conditional GET example GET /someurl HTTP/1.1 If-Modified-Since: Wed, 23 Jun 2010 13:27:43 CET HTTP/1.1 304 NOT MODIFIED
  • 34. Secure GET example GET /someurl HTTP/1.1 Authorization: GOOG1 GOC7F:Y9ts= HTTP/1.1 401 UNAUTHORIZED WWW-Authenticate: GOOG1
  • 36. Accept-Ranges, Age, ETag, Location, Proxy- Authenticate, Retry-After, Server, Vary, WWW- Authenticate are some of the HTTP response headers.
  • 37. Example Age: 3356 ETag: “1fd32ada-asd-qra8as” Server: CERN/3.0 libwww/2.17 WWW-Authenticate: GOOG1
  • 38. Conditional GET example (2) GET /someurl HTTP/1.1 If-None-Match: “1fd32ada-asd-qra8as” HTTP/1.1 304 NOT MODIFIED
  • 39. Conditional PUT example PUT /someurl HTTP/1.1 If-Match: “1fd32ada-asd-qra8as” HTTP/1.1 412 PRECONDITION FAILED
  • 41. Entity headers describe the nature of the entity in the message body, including its type, language and encoding, to facilitate the proper processing and/or presentation of the entity by the device receiving it.
  • 42. Allow, Content-Encoding, Content-Language, Content-Length, Content-Location, Content-MD5, Content-Range, Content-Type, Expires, Last- Modified are some of the HTTP entity headers.
  • 43. Example HEAD /someurl HTTP/1.1 HTTP/1.1 200 OK Last-Modified: Wed, 23 Jun 2010 13:27:43 CET
  • 45. While HTTP is naturally associated with hypertext, its messages can transport a large variety of different types of files, including images, audio, video and much more.
  • 46. To indicate the type of entity contained in an HTTP message, its sender must identify its media type and subtype. This is done using the HTTP Content- Type header, which was borrowed from the Multipurpose Internet Mail Extensions (MIME) specification.
  • 47. Even though HTTP borrows several concepts and header types from MIME, the protocol is not MIME- compliant.
  • 48. Content encoding tells something about the encoding of the entity. Transfer-encoding tells something about the entire HTTP message, and may change from hop to hop.
  • 50. Since HTTP/1.1 uses persistent connections that allow multiple requests and responses to be sent over a TCP connection, clients and servers need some way to identify where one message ends and the next begins.
  • 51. The easiest way is to send the Content-Length header with the message size. But for dynamic content you may not know this in advance. In this case you can use chunked transfer encoding.
  • 53. HTTP/1.1 200 OK Date: Mon, 22 Mar 2004 11:15:03 GMT Content-Type: text/html Content-Length: 129 Expires: Sat, 27 Mar 2004 21:12:00 GMT <html><body><p>The file you requested is 3,400 bytes long and was last modified: Sat, 20 Mar 2004 21:12:00 GMT.</p></body></html>
  • 54. HTTP/1.1 200 OK Date: Mon, 22 Mar 2004 11:15:03 GMT Content-Type: text/html Transfer-Encoding: chunked Trailer: Expires 29 <html><body><p>The file you requested is 5 3,400 23 bytes long and was last modified: 1d Sat, 20 Mar 2004 21:12:00 GMT 13 .</p></body></html> 0 Expires: Sat, 27 Mar 2004 21:12:00 GMT
  • 56. Content negotiation • Cache, cache, cache! • HTTPS • Cookies • Same Origin Policy • Cross-Origin Resource Sharing