Skip to content

QUERY: HTTPDIR/RF review - Caching #3120

@reschke

Description

@reschke

QUOTED FROM SPEC TEXT, COMMENTS ARE ROY'S (@royfielding)

2.4. Caching

The response to a QUERY method is cacheable; a cache MAY use it to
satisfy subsequent QUERY requests as per Section 4 of
[HTTP-CACHING]).

No, just no. A cache does not have access to the request content when
making a hit/miss decision. Use the 303 response, as designed.

The reason why this is not allowed in HTTP is because routing decisions
are based on the connection context, host, and entire target URI.
A cache cannot know what parts may apply. The origin doesn't know either.

The actual server recipient of a request containing query parameters
might have been passed along a completely different internal routing
path, with its own security filtering, from the same request with
those parameters hidden within the request content.

Allowing a cache to change the key by moving identifiers from the
content would allow a generic resource to poison the cache for other,
more specific resources.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions