RFC 2227 Hit-Metering and Usage-Limiting October 1997
3.2 Format of the Meter header
The Meter header is used to carry zero or more directives. Multiple
Meter headers may occur in an HTTP message, but according to the
rules in section 4.2 of the HTTP/1.1 specification [4], they may be
combined into a single header (and should be so combined, to reduce
overhead).
For example, the following sequence of Meter headers
Meter: max-uses=3
Meter: max-reuses=10
Meter: do-report
may be expressed as
Meter: max-uses=3, max-reuses=10, do-report
3.3 Negotiation of hit-metering and usage-limiting
An origin server that wants to collect hit counts for a resource, by
simply forcing all requests to bypass any proxy caches, would respond
to requests on the resource with "Cache-control: s-maxage=0". (An
origin server wishing to prevent HTTP/1.0 proxies from improperly
caching the response could also send both "Expires: ", to
prevent such caching, and "Cache-control: max-age=NNNN", to allow
newer proxies to cache the response).
The purpose of the Meter header is to obviate the need for "Cache-
control: s-maxage=0" within a metering subtree. Thus, any proxy may
negotiate the use of hit-metering and/or usage-limiting with the
next-hop server. If this server is the origin server, or is already
part of a metering subtree (rooted at the origin server), then it may
complete the negotiation, thereby extending the metering subtree to
include the new proxy.
To start the negotiation, a proxy sends its request with one of the
following Meter directives:
will-report-and-limit
indicates that the proxy is willing and able to
return usage reports and will obey any usage-limits.
wont-report indicates that the proxy will obey usage-limits but
will not send usage reports.
wont-limit indicates that the proxy will not obey usage-limits
but will send usage reports.
RFC 2227 Hit-Metering and Usage-Limiting October 1997
A proxy willing to neither obey usage-limits nor send usage reports
MUST NOT transmit a Meter header in the request.
By definition, an empty Meter header:
Meter:
is equivalent to "Meter: will-report-and-limit", and so, by the
definition of the Connection header (see section 14.10 of the
HTTP/1.1 specification [4]), a request that contains
Connection: Meter
and no explicit Meter header is equivalent to a request that contains
Connection: Meter
Meter: will-report-and-limit
This makes the default case more efficient.
An origin server that is not interested in metering or usage-limiting
the requested resource simply ignores the Meter header.
If the server wants the proxy to do hit-metering and/or usage-
limiting, its response should include one or more of the following
Meter directives:
For hit-metering:
do-report specifies that the proxy MUST send usage reports to
the server.
dont-report specifies that the proxy SHOULD NOT send usage
reports to the server.
=6= |