HTTP::...dified(3pm)

πŸ“¦
version 0.028 Β· 2 versions
  • 0.028 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.027 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 Date to any response received without one (as already specified by [RFC 2068], section 14.19), caches will operate correctly. Teamwork, fr fr 🫢
  • ETag and/or Content-Location, if the header would have been sent in a 200 response to the same request
  • Expires, Cache-Control, and/or Vary, 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 πŸ‘‘

  1. Stevan Little <stevan.little@iinteractive.com>
  2. Ricardo Signes <cpan@semiotic.systems>

Shoutout to the legends. πŸ’œ


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