Skip to Main Content
Web Caching
book

Web Caching

by Duane Wessels
June 2001
Intermediate to advanced content levelIntermediate to advanced
320 pages
9h 18m
English
O'Reilly Media, Inc.
Content preview from Web Caching

HTCP Data Types

HTCP messages are built on a simple hierarchy of data types. I’ll start with the most simple and finish with the complex ones.

COUNTSTR

A COUNTSTR is a string of ISO8859-1 (Latin-1) characters preceded by the length of the string. The string length is encoded (in network byte order) using two octets. The string is not necessarily null-terminated. For example, the following hexadecimal values encode the string Cache as a COUNTSTR:

00 05 43 61 63 68 65
    5  C  a  c  h  e

SPECIFIER

HTCP SPECIFIER format

Figure D-5. HTCP SPECIFIER format

A SPECIFIER, shown in Figure D-5, encodes an HTTP request using four COUNTSTRs. It is used in TST, SET, and CLR requests, and in MON responses. METHOD, URL, and VERSION are all taken from the first line of an HTTP request. REQ-HDRS consists of all the remaining request headers.

DETAIL

Figure D-6 shows the DETAIL type, which is used in TST response messages. It provides the information about a cached response. These are all HTTP-style headers with CRLF line termination. RESP-HDRS is the set of HTTP response headers, as defined in Section 6.2 of RFC 2616. These include Etag, Age, and others. ENTITY-HDRS is the set of HTTP headers defined in Section 7.1 of RFC 2616. These include Expires, Last-modified, and others. CACHE-HDRS, on the other hand, are defined by HTCP, rather than HTTP. They are used to convey additional information about a resource that may prove to be useful. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Web Caching and Replication

Web Caching and Replication

Michael Rabinovich, Oliver Spatscheck
NGINX Unit Cookbook

NGINX Unit Cookbook

Derek DeJonghe
NGINX Cookbook

NGINX Cookbook

Tim Butler

Publisher Resources

ISBN: 156592536XCatalog PageErrata