SlideShare a Scribd company logo
1 of 45
HTTP
Hypertext Transfer Protocol
HTTP 2
What It Is
 Protocol for transfer of various data
formats between server and client
– Plaintext
– Hypertext
– Images
– Video
– Sound
 Meta-information also transferred
HTTP 3
Uniform Resources
 URL
– Uniform Resource Locator
– Refers to an existing protocol
 http:, wais:, ftp:, mailto:, gopher:, news:
– Points to a document on a specific server
 URN
– Uniform Resource Name
– Globally unique, persistent identifier
 Independent of location
HTTP 4
Uniform Resources
 URI
– Uniform Resource Identifier
– Collection of URL’s and URN’s
HTTP 5
URL
 <scheme> : //<host> :<port>
/<path> ;<parameters> ?<query>
#<fragment>
– scheme
 The protocol you are using
– host
 Host name or ip number
– port
 TCP port number that protocol server is using
– path
 Path and filename reference of object on server
HTTP 6
URL
 <scheme> : //<host> :<port>
/<path> ;<parameters> ?<query>
#<fragment>
– parameters
 Any specific parameters that object needs
– query
 Query string for a CGI program
– fragment
 Reference to a subset of an object
HTTP 7
URL and HTTP
 All parts of URL, except parameters,
used with http
 Scheme and host can be omitted when
referenced object is on same machine
as referring document
 Port can be omitted so long as
referenced host is running on port listed
in your /etc/services file
– Usually port 80
HTTP 8
URL and HTTP
 Full path used when referring to
another server
– Relative path on same server
 Reference with relative path is a partial URL
 Query passes parameters to CGI
 Fragment jumps to labels within a page
– http://www.x.y/z#foo
HTTP 9
Web Documents
– html
– ASCII text
– Preformatted
 postscript
– Images
 GIF
 JPEG
– Video
 MPEG
– VRML
– Java
HTTP 10
Communication
 Server tells client what type of
information is coming before
information arrives
– File extensions
 .html .htm
 .txt
 .ps
 .au
 .gif .tiff .jpeg
 .mpeg
 .vrml .wrl
 .java
HTTP 11
Communication
 Text and inline images
– Separate objects
 Client browser may optionally send a
list of formats it can accept
 Document can be a program
– Web server executes program and sends
results to client
– Generic term for this program is script,
gateway, or gateway script
HTTP 12
Scripts
 Translates input from client
 Calls other programs
 Translates output from programs and
returns it to client
HTTP 13
Gateways
 Translates from one protocol or service
to another
– HTTP / database query
– Database query results / HTTP
HTTP 14
HTTP 1.0
 Berners Lee, Fielding, Nielsen - 1995
 Used in hypermedia systems distributed
across networks
 Defines request-response conversation
– Requesting program (client) establishes
connection with receiving program (server)
– Client sends request to server
 HTTP specifies syntax
HTTP 15
HTTP 1.0
 Defines request-response conversation
– Server replies with response
 http specifies syntax
 Does not handle network connectivity
or how information is transmitted
 TCP/IP does this
HTTP 16
HTTP 1.0
 HTTP request
– Method
– URI
– Protocol version
– Optional other information
– Method [Request URI] HTTP/1.0 <CRLF>
HTTP 17
HTTP 1.0
 Method
– Get
 Returns object
– Head
 Returns information about object
– Post
 Sends information to be stored on server or as
input to script
HTTP 18
HTTP 1.0
 Method
– Put
 Sends new copy of existing object to server
 Usually not allowed
– Delete
 Deletes object
 Usually not allowed
HTTP 19
HTTP 1.0
 Other information
– User Agent
 Kind of browser
– If-Modified-Since
 Returns object only if more recent than given
date
 Otherwise returns status code 304
HTTP 20
HTTP 1.0
 Other information
– Accept
 Mime types which browser can accept
– Multipurpose Internet Mail Extension
 text/plain
 text/html
 application/postscript
 image/gif
 image/jpeg
 audio/basic
 video/mpeg
 x-world/x-vrml
HTTP 21
HTTP 1.0
 Other information
– Authorization
 User password
GET /X/Y/Z.HTML HTTP 1.0
User Agent: Prodigy-WB/1.3e
Accept: text/plain
Accept: text/html
Accept: application/postscript
Accept: image/gif
– Accept: */*
HTTP 22
HTTP 1.0
 HTTP response
– Status line
 HTTP-version Status-code Reason
 Status-codes 1xx - Informational
– Reserved for future use
HTTP 23
HTTP 1.0
 HTTP response
– Status line
 Status-codes 2xx - Success
– The action was successfully received, understood,
and accepted
 200 OK
 201 POST command successful
 202 Request accepted
 203 GET or HEAD request fulfilled
 204 No content
HTTP 24
HTTP 1.0
 HTTP response
– Status line
 Status-codes 3xx - Redirection
– Further action must be taken in order to complete
request
 300 Resource found at multiple locations
 301 Resource moved permanently
 302 Resource moved temporarily
 304 Resource has not modified (since date)
HTTP 25
HTTP 1.0
 HTTP response
– Status line
 Status-codes 4xx - Client error
– The request contains bad syntax or cannot be
fulfilled
 400 Bad request from client
 401 Unauthorized request
 402 Payment required for request
 403 Resource access forbidden
 404 Resource not found
 405 Method not allowed for resource
 406 Resource type not acceptable
HTTP 26
HTTP 1.0
 HTTP response
– Status line
 Status-codes 5xx - Server error
– The server failed to fulfill an apparently valid request
 500 Internal server error
 501 Method not implemented
 502 Bad gateway or server overload
 503 Service unavailable / gateway timeout
 504 Secondary gateway / server timeout
HTTP 27
HTTP 1.0
 HTTP response
– Description of information
 Server Type of server
 Date Date and time
 Content-Length Number of bytes
 Content-Type Mime type
 Content-Language English, for example
 Content-Encoding Data compression
 Last-Modified Date when last modified
 Expires Date when file becomes
invalid
HTTP 28
HTTP 1.0
 Problems
– HTTP is stateless
 Each request requires separate TCP connection
 Server doesn’t remember previous requests
HTTP 29
Evolution of HTTP
 HTTP/0.9 - 1990
– Request method + URI + crlf
 GET /pets/index.html
 Just file contents sent back
– No header information
 Gopher influence
– Media types
 Single character indicated one of ten types
HTTP 30
Evolution of HTTP
 HTTP/1.0 - 1995
– Meta-information between client and
server
 Media types
– MIME type/subtype
 Status codes
 This information influenced the development of
web search engines
– Caching
– Authorization
HTTP 31
Evolution of HTTP
 HTTP/1.0 - 1995
– Problems
 Scalability
– High number of clients visit server for short time
 Flash crowd
 Bandwidth
HTTP 32
Evolution of HTTP
 HTTP/1.1
– Byte ranges
 Request of a document subset
– Adobe's Portable Document Format
– Streaming multimedia
 Eliminates unnecessary client/server
communication
 An interrupted transfer which is restarted can
be more efficient
HTTP 33
Evolution of HTTP
 HTTP/1.1
– Content negotiation with quality factors
 Quality factors
– Real numbers between 0 and 1
 Default is 1
 Accept-Language: fr, en-gb; q=0.8, en; q=0.7
HTTP 34
Evolution of HTTP
 HTTP/1.1
– Chunked encoding
 Transmission of streaming multimedia
– One frame varies in size and composition from the
next
 Streaming video
– Entire image transmitted in first chunk and
differences to the previous image are transmitted in
the next chunk
HTTP 35
Evolution of HTTP
 HTTP/1.1
– Protocol switching
 Client can specify another protocol more suited
to data being transferred
– Message integrity checks
– Digest authentication
 In HTTP/1.0, user sent username and password
over the network
 In HTTP/1.1, the client and the server never
send the actual username or password over the
network
HTTP 36
Evolution of HTTP
 HTTP/1.1
– Persistent connections
 In HTTP/1.0, if a single page includes inline
images, multiple frames, animation, and other
external references, to browse this page would
require many reconnections
 In HTTP/1.1 there are multiple
request/response transactions per connection
 Clients can pipeline requests to the server by
sending multiple requests at start of session
HTTP 37
Evolution of HTTP
 HTTP/1.1
– Cache management with entity tags
 When body of URI changes, so does its entity
tag
– Useful for maintaining caches, as updated URI
information would have a different entity tag
 Can tell if same resource is being cached from
multiple URI's as it would have same entity tag
 Strong entity tag
– Changes when any portion of resource changes
 One or more bytes change
 Weak entity tag
– Changes only when semantics of entity-body
changes
HTTP 38
Evolution of HTTP
 HTTP/1.1
– Software multihoming
 Number of available IP addresses is a concern
 In HTTP/1.0, server could have multiple DNS
entries and IP addresses, each corresponding
to different document tree
 In HTTP/1.1, server could have multiple DNS
entries and only a single IP address
HTTP 39
The Future
 HTTP-Next Generation
– Many channels
 One TCP connection carries multiple channels
for parallel communication
 Different protocols on each channel
– Traditional way
 Multiple TCP connections between same client
and server
 Pages contain images, video, audio, and html
HTTP 40
The Future
 Extensibility
– Adding new MIME headers has been the
traditional way of extending http
– Drawbacks
 No indication whether receiving end
understands these extensions
 No indication whether extension is intended for
all parties along message path or only for
certain intermediaries
 No indication of order in which extensions
should be interpreted
HTTP 41
The Future
 Extensibility
– PEP
 Protocol Extension Protocol
HTTP 42
The Future
 Performance
– Parsing MIME headers wastes resources
– Sticky headers
 Persistent state between multiple http requests
 Not all headers have to be included in every
http message
 Distributed authoring
– Event notification
HTTP 43
The Future
 Caching and replication
– Popular sites are really popular
– Flash crowds happen
– Hot spots on the net are dynamic
– Amount of dynamic data is increasing
HTTP 44
The Future
 QoS
– Quality of service
– Not everything must be treated with same
QoS
– Required QoS should be made at the user-
interface
HTTP 45
The Future
 Real-time protocols and the web
– Streaming protocols
 Audio/video-on-demand

More Related Content

Similar to HTTP.ppt

Http request&response session 1 - by Vignesh.N
Http request&response session 1 - by Vignesh.NHttp request&response session 1 - by Vignesh.N
Http request&response session 1 - by Vignesh.NNavaneethan Naveen
 
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
 
Hypertex transfer protocol
Hypertex transfer protocolHypertex transfer protocol
Hypertex transfer protocolwanangwa234
 
Group20 Dynamic Networks
Group20 Dynamic NetworksGroup20 Dynamic Networks
Group20 Dynamic Networkshariprasadnr
 
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
 
internet programming and java notes 5th sem mca
internet programming and java notes 5th sem mcainternet programming and java notes 5th sem mca
internet programming and java notes 5th sem mcaRenu Thakur
 

Similar to HTTP.ppt (20)

Http protocol
Http protocolHttp protocol
Http protocol
 
Http request&response session 1 - by Vignesh.N
Http request&response session 1 - by Vignesh.NHttp request&response session 1 - by Vignesh.N
Http request&response session 1 - by Vignesh.N
 
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
 
Starting With Php
Starting With PhpStarting With Php
Starting With Php
 
Hypertex transfer protocol
Hypertex transfer protocolHypertex transfer protocol
Hypertex transfer protocol
 
http presentation 1.pptx
http presentation 1.pptxhttp presentation 1.pptx
http presentation 1.pptx
 
Introduction to HTTP
Introduction to HTTPIntroduction to HTTP
Introduction to HTTP
 
Http_Protocol.pptx
Http_Protocol.pptxHttp_Protocol.pptx
Http_Protocol.pptx
 
Group20 Dynamic Networks
Group20 Dynamic NetworksGroup20 Dynamic Networks
Group20 Dynamic Networks
 
Web
WebWeb
Web
 
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-protocol
Http-protocolHttp-protocol
Http-protocol
 
The HTTP and Web
The HTTP and Web The HTTP and Web
The HTTP and Web
 
HTTP Basics
HTTP BasicsHTTP Basics
HTTP Basics
 
Application layer
Application layerApplication layer
Application layer
 
Compute rNetwork.pptx
Compute rNetwork.pptxCompute rNetwork.pptx
Compute rNetwork.pptx
 
Network basics
Network basicsNetwork basics
Network basics
 
www and http services
www and http serviceswww and http services
www and http services
 
internet programming and java notes 5th sem mca
internet programming and java notes 5th sem mcainternet programming and java notes 5th sem mca
internet programming and java notes 5th sem mca
 

Recently uploaded

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 

Recently uploaded (20)

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 

HTTP.ppt

  • 2. HTTP 2 What It Is  Protocol for transfer of various data formats between server and client – Plaintext – Hypertext – Images – Video – Sound  Meta-information also transferred
  • 3. HTTP 3 Uniform Resources  URL – Uniform Resource Locator – Refers to an existing protocol  http:, wais:, ftp:, mailto:, gopher:, news: – Points to a document on a specific server  URN – Uniform Resource Name – Globally unique, persistent identifier  Independent of location
  • 4. HTTP 4 Uniform Resources  URI – Uniform Resource Identifier – Collection of URL’s and URN’s
  • 5. HTTP 5 URL  <scheme> : //<host> :<port> /<path> ;<parameters> ?<query> #<fragment> – scheme  The protocol you are using – host  Host name or ip number – port  TCP port number that protocol server is using – path  Path and filename reference of object on server
  • 6. HTTP 6 URL  <scheme> : //<host> :<port> /<path> ;<parameters> ?<query> #<fragment> – parameters  Any specific parameters that object needs – query  Query string for a CGI program – fragment  Reference to a subset of an object
  • 7. HTTP 7 URL and HTTP  All parts of URL, except parameters, used with http  Scheme and host can be omitted when referenced object is on same machine as referring document  Port can be omitted so long as referenced host is running on port listed in your /etc/services file – Usually port 80
  • 8. HTTP 8 URL and HTTP  Full path used when referring to another server – Relative path on same server  Reference with relative path is a partial URL  Query passes parameters to CGI  Fragment jumps to labels within a page – http://www.x.y/z#foo
  • 9. HTTP 9 Web Documents – html – ASCII text – Preformatted  postscript – Images  GIF  JPEG – Video  MPEG – VRML – Java
  • 10. HTTP 10 Communication  Server tells client what type of information is coming before information arrives – File extensions  .html .htm  .txt  .ps  .au  .gif .tiff .jpeg  .mpeg  .vrml .wrl  .java
  • 11. HTTP 11 Communication  Text and inline images – Separate objects  Client browser may optionally send a list of formats it can accept  Document can be a program – Web server executes program and sends results to client – Generic term for this program is script, gateway, or gateway script
  • 12. HTTP 12 Scripts  Translates input from client  Calls other programs  Translates output from programs and returns it to client
  • 13. HTTP 13 Gateways  Translates from one protocol or service to another – HTTP / database query – Database query results / HTTP
  • 14. HTTP 14 HTTP 1.0  Berners Lee, Fielding, Nielsen - 1995  Used in hypermedia systems distributed across networks  Defines request-response conversation – Requesting program (client) establishes connection with receiving program (server) – Client sends request to server  HTTP specifies syntax
  • 15. HTTP 15 HTTP 1.0  Defines request-response conversation – Server replies with response  http specifies syntax  Does not handle network connectivity or how information is transmitted  TCP/IP does this
  • 16. HTTP 16 HTTP 1.0  HTTP request – Method – URI – Protocol version – Optional other information – Method [Request URI] HTTP/1.0 <CRLF>
  • 17. HTTP 17 HTTP 1.0  Method – Get  Returns object – Head  Returns information about object – Post  Sends information to be stored on server or as input to script
  • 18. HTTP 18 HTTP 1.0  Method – Put  Sends new copy of existing object to server  Usually not allowed – Delete  Deletes object  Usually not allowed
  • 19. HTTP 19 HTTP 1.0  Other information – User Agent  Kind of browser – If-Modified-Since  Returns object only if more recent than given date  Otherwise returns status code 304
  • 20. HTTP 20 HTTP 1.0  Other information – Accept  Mime types which browser can accept – Multipurpose Internet Mail Extension  text/plain  text/html  application/postscript  image/gif  image/jpeg  audio/basic  video/mpeg  x-world/x-vrml
  • 21. HTTP 21 HTTP 1.0  Other information – Authorization  User password GET /X/Y/Z.HTML HTTP 1.0 User Agent: Prodigy-WB/1.3e Accept: text/plain Accept: text/html Accept: application/postscript Accept: image/gif – Accept: */*
  • 22. HTTP 22 HTTP 1.0  HTTP response – Status line  HTTP-version Status-code Reason  Status-codes 1xx - Informational – Reserved for future use
  • 23. HTTP 23 HTTP 1.0  HTTP response – Status line  Status-codes 2xx - Success – The action was successfully received, understood, and accepted  200 OK  201 POST command successful  202 Request accepted  203 GET or HEAD request fulfilled  204 No content
  • 24. HTTP 24 HTTP 1.0  HTTP response – Status line  Status-codes 3xx - Redirection – Further action must be taken in order to complete request  300 Resource found at multiple locations  301 Resource moved permanently  302 Resource moved temporarily  304 Resource has not modified (since date)
  • 25. HTTP 25 HTTP 1.0  HTTP response – Status line  Status-codes 4xx - Client error – The request contains bad syntax or cannot be fulfilled  400 Bad request from client  401 Unauthorized request  402 Payment required for request  403 Resource access forbidden  404 Resource not found  405 Method not allowed for resource  406 Resource type not acceptable
  • 26. HTTP 26 HTTP 1.0  HTTP response – Status line  Status-codes 5xx - Server error – The server failed to fulfill an apparently valid request  500 Internal server error  501 Method not implemented  502 Bad gateway or server overload  503 Service unavailable / gateway timeout  504 Secondary gateway / server timeout
  • 27. HTTP 27 HTTP 1.0  HTTP response – Description of information  Server Type of server  Date Date and time  Content-Length Number of bytes  Content-Type Mime type  Content-Language English, for example  Content-Encoding Data compression  Last-Modified Date when last modified  Expires Date when file becomes invalid
  • 28. HTTP 28 HTTP 1.0  Problems – HTTP is stateless  Each request requires separate TCP connection  Server doesn’t remember previous requests
  • 29. HTTP 29 Evolution of HTTP  HTTP/0.9 - 1990 – Request method + URI + crlf  GET /pets/index.html  Just file contents sent back – No header information  Gopher influence – Media types  Single character indicated one of ten types
  • 30. HTTP 30 Evolution of HTTP  HTTP/1.0 - 1995 – Meta-information between client and server  Media types – MIME type/subtype  Status codes  This information influenced the development of web search engines – Caching – Authorization
  • 31. HTTP 31 Evolution of HTTP  HTTP/1.0 - 1995 – Problems  Scalability – High number of clients visit server for short time  Flash crowd  Bandwidth
  • 32. HTTP 32 Evolution of HTTP  HTTP/1.1 – Byte ranges  Request of a document subset – Adobe's Portable Document Format – Streaming multimedia  Eliminates unnecessary client/server communication  An interrupted transfer which is restarted can be more efficient
  • 33. HTTP 33 Evolution of HTTP  HTTP/1.1 – Content negotiation with quality factors  Quality factors – Real numbers between 0 and 1  Default is 1  Accept-Language: fr, en-gb; q=0.8, en; q=0.7
  • 34. HTTP 34 Evolution of HTTP  HTTP/1.1 – Chunked encoding  Transmission of streaming multimedia – One frame varies in size and composition from the next  Streaming video – Entire image transmitted in first chunk and differences to the previous image are transmitted in the next chunk
  • 35. HTTP 35 Evolution of HTTP  HTTP/1.1 – Protocol switching  Client can specify another protocol more suited to data being transferred – Message integrity checks – Digest authentication  In HTTP/1.0, user sent username and password over the network  In HTTP/1.1, the client and the server never send the actual username or password over the network
  • 36. HTTP 36 Evolution of HTTP  HTTP/1.1 – Persistent connections  In HTTP/1.0, if a single page includes inline images, multiple frames, animation, and other external references, to browse this page would require many reconnections  In HTTP/1.1 there are multiple request/response transactions per connection  Clients can pipeline requests to the server by sending multiple requests at start of session
  • 37. HTTP 37 Evolution of HTTP  HTTP/1.1 – Cache management with entity tags  When body of URI changes, so does its entity tag – Useful for maintaining caches, as updated URI information would have a different entity tag  Can tell if same resource is being cached from multiple URI's as it would have same entity tag  Strong entity tag – Changes when any portion of resource changes  One or more bytes change  Weak entity tag – Changes only when semantics of entity-body changes
  • 38. HTTP 38 Evolution of HTTP  HTTP/1.1 – Software multihoming  Number of available IP addresses is a concern  In HTTP/1.0, server could have multiple DNS entries and IP addresses, each corresponding to different document tree  In HTTP/1.1, server could have multiple DNS entries and only a single IP address
  • 39. HTTP 39 The Future  HTTP-Next Generation – Many channels  One TCP connection carries multiple channels for parallel communication  Different protocols on each channel – Traditional way  Multiple TCP connections between same client and server  Pages contain images, video, audio, and html
  • 40. HTTP 40 The Future  Extensibility – Adding new MIME headers has been the traditional way of extending http – Drawbacks  No indication whether receiving end understands these extensions  No indication whether extension is intended for all parties along message path or only for certain intermediaries  No indication of order in which extensions should be interpreted
  • 41. HTTP 41 The Future  Extensibility – PEP  Protocol Extension Protocol
  • 42. HTTP 42 The Future  Performance – Parsing MIME headers wastes resources – Sticky headers  Persistent state between multiple http requests  Not all headers have to be included in every http message  Distributed authoring – Event notification
  • 43. HTTP 43 The Future  Caching and replication – Popular sites are really popular – Flash crowds happen – Hot spots on the net are dynamic – Amount of dynamic data is increasing
  • 44. HTTP 44 The Future  QoS – Quality of service – Not everything must be treated with same QoS – Required QoS should be made at the user- interface
  • 45. HTTP 45 The Future  Real-time protocols and the web – Streaming protocols  Audio/video-on-demand