HTTP messages Entities and Encoding - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

HTTP messages Entities and Encoding

Description:

deflate. identity. 8. Accept-Encoding Headers. server. client. GET ... deflate. Compression using the gzip algorithm. gzip. Delta using the gdiff algorithm ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 22
Provided by: Mali6
Category:

less

Transcript and Presenter's Notes

Title: HTTP messages Entities and Encoding


1
HTTP messagesEntities and Encoding
  • Herng-Yow Chen

2
Outline
  • The format and behavior of HTTP message entities
    as HTTP containers
  • How HTTP describes the size of entity bodies, and
    what HTTP requires in the way of sizing
  • The entity headers used to describe the format,
    alphabet, and language of content, so clients can
    process it p

3
Message Are Crates,Entities Are Cargo
HTTP/1.0 200 OK Server Netscape_Enterprise/3.6 Da
te Sun, 17 Sep 2000 000105 GMT Content_type
text/plain Content-length 18 Hi!Im a message!
Entity headers
Entity
Entity body
4
Entity Bodies
5
Common media types
6
Content Encoding
Content-encoded content Content-Type
text/html Content-Length 7571 content-encoding
gzip
Original content Content-Type text/html Content-L
ength 7571
Original content Content-Type text/html Content-L
ength 7571
01110001 00110010
Gzip content decoder
Gzip content encoder
7
Content-encoding tokens
  • Content-encoding value
  • gzip
  • compress
  • deflate
  • identity

8
Accept-Encoding Headers
Request message
GET /logo.gif HTTP/1.1 Accept-encoding gzip
client
server
HTTP/1.1 200 OK Content-type image/gif Content-en
coding gzip
Response message
00101101
00101101
The server compresses the image with gzip to
transport a smaller file over the thin Network
connection between itself and the client.This
saves network bandwidth And reduces the amount of
time that the client waits for the
transfer.Though,the Client will have to spend
time decompressing the image once the image is
served.
9
Transfer Encoding and Chunked Encoding
Content-encoded response
Normal header block
Normal entity (just encoded)
A content-encoded message just encodes the
entity Section of the message. With
Transfer-encoded Messages the encoding is a
function of the entire Message, changing the
structure of the message itself
Transfer-encoded response
Basic header
Encoded blocks
10
Chunked Encoding
11
Combining Content and Transfer Encodings
Content-type text/heml
Content encoding
Content-Type text/html content-encoding gzip
9BF2578EA4 2670CD
9BF2578EA4 2670CD
Transfer encoding (chunking)
Content-Type text/html content-encoding
gzip Transfer-encoding chunked
426
426
8EA
8EA
257
257
98B
98B
12
Time-Varying Instances
13
Cach-Control header directives
14
Cach-Control header directives
15
Conditional request types
16
Range Requests
Request message
GET /bigfile.html HTTP/1.1
client
Response message
HTTP/1.1 200 OK Content-Type text/html Content-Le
ngth 65537 Accept-Ranges bytes
www.csie.ncnu.edu.tw
110100 111001 101001 110010
Range request message
GET /bigfile.html HTTP/1.1 Range bytes20224-
Range response message
HTTP/1.1 200 OK Content-Type text/html Range
bytes20224- Accept-Ranges bytes
The clients original request was Interrupted,but
a second request For the part of the message that
Was not received allows the Client to resume
form the point Of the interruption
www.csie.ncnu.edu.tw
17
Delta Encoding
18
Delta Encoding
19
Delta-encoding headers
  • Etag
  • If-None-Match
  • A-IM
  • IM
  • Delta-Base

20
IANA registered types of instance manipulations
21
For More Information
  • http//www.ietf.org/rfc/rfc2616.txt
  • Hypertext Transfer Protocol -- HTTP/1.1
  • http//www.ietf.org/rfc/rfc3229.txt
  • Delta encoding in HTTP
  • http//www.ietf.org/rfc/rfc1521.txt
  • MIME (Multipurpose Internet Mail Extensions) Part
    OneMechanisms for Specifying and Describing the
    Format of Internet Message Bodies
  • http//www.ietf.org/rfc/rfc2045.txt
  • Multipurpose Internet Mail Extensions(MIME) Part
    OneFormat of Internet Message Bodies
  • http//www.ietf.org/rfc/rfc1864.txt
  • The Content-MD5 Header Field
  • http//www.ietf.org/rfc/rfc3230.txt
  • Instance Digests in HTTP
Write a Comment
User Comments (0)
About PowerShow.com