HTTP::...dified(3pm)
π NAME π
HTTP::Throwable::Role::Status::NotModified β bestie, it's the 304 Not Modified status role, and she's iconic for it. This is a Perl thing (the manpage lives under the 3pm manual name, if you're keeping track π).
β¨ VERSION β¨
version 0.028 β that's the one, no cap.
πΈ DESCRIPTION πΈ
Okay so picture this: your client did a conditional GET request, access is allowed, but the document literally hasn't changed. Not even a little. In that case the server SHOULD hit back with this status code. It's the polite "nothing new here, babe π
" of HTTP.
And the 304 response MUST NOT contain a message-body. Ever. Which means it's always terminated by the first empty line after the header fields. That's just how she ends. Periodt.
The response MUST include the following header fields, no skipping:
Date, unless its omission is required by section 14.18.1- And like, here's the tea: if a clockless origin server obeys these rules, and proxies and clients add their own
Dateto any response received without one (as already specified by[RFC 2068], section 14.19), caches will operate correctly. Teamwork, fr fr π«Ά
- And like, here's the tea: if a clockless origin server obeys these rules, and proxies and clients add their own
ETagand/orContent-Location, if the header would have been sent in a 200 response to the same requestExpires,Cache-Control, and/orVary, if the field-value might differ from that sent in any previous response for the same variant
Now, if the conditional GET used a strong cache validator, the response SHOULD NOT include other entity-headers. Otherwise β meaning if the conditional GET used a weak validator β the response MUST NOT include other entity-headers. Why? Because it prevents inconsistencies between cached entity-bodies and updated headers. It's giving "keep your story straight" energy. π
π¨ If a 304 response indicates an entity that is not currently cached, then the cache MUST disregard the response and repeat the request without the conditional. Do not pass go. Do not collect vibes. Just redo the request. π
π And if a cache uses a received 304 response to update a cache entry, the cache MUST update the entry to reflect any new field values given in the response. Keep the receipts fresh, always.
π¦ PERL VERSION π¦
This library should run on perls released even a long time ago. She's lowkey ancient-friendly like that. It should work on any version of perl released in the last five years.
Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. So likeβ¦ don't get attached to a specific floor, bestie. π
π AUTHORS π
- Stevan Little <stevan.little@iinteractive.com>
- Ricardo Signes <cpan@semiotic.systems>
Shoutout to the legends. π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2011 by Infinity Interactive, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Free as in do-what-you-want-with-the-license-terms, slay. β¨
okay that's the whole page, mwah π
β and for the record, this lil masterpiece was rendered by perl v5.36.0 on 2023-01-24, filed under HTTP::...dified(3pm). bye bestie, go handle your conditional GETs responsibly πΈπ¦π
π¦ where this page comes from
- debian bookworm: libhttp-throwable-perl 0.028-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libhttp-throwable-perl 0.028-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhttp-throwable-perl 0.028-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libhttp-throwable-perl 0.028-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libhttp-throwable-perl 0.028-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms