HTTP::...tandard(3pm)
π HTTP::Proxy::HeaderFilter::standard (3pm) β the perl manual page, but make it make sense π
okay bestie, so this is a page from the User Contributed Perl Documentation, and the module we're talking about is literally called HTTP::Proxy::HeaderFilter::standard β say that three times fast, I dare you π«Ά
β¨ NAME β¨
HTTP::Proxy::HeaderFilter::standard β it's an internal filter whose whole entire job is respecting RFC2616. yes, the girlies are enforcing protocol standards now, we contain multitudes π
πΈ DESCRIPTION πΈ
so basically? this is an internal filter that HTTP::Proxy uses to enforce behaviour that's compliant with RFC 2616. she's not here to be invoked by you directly, she's here to keep the proxy in line. internal main character energy, fr fr π
π METHOD π
this filter implements a single method, and it gets called automatically β you don't have to do anything, she just shows up and does the work like the group chat's designated responsible one π§
filter()β Enforce RFC 2616-compliant behaviour, by adding theVia:andX-Forwarded-For:headers (except when the proxy was instructed not to add them), decrementing theMax-Forwards:header and removing the hop-by-hop andLWP::UserAgentheaders.
okay so let me translate that, because it's a lot of words: she addsVia:andX-Forwarded-For:β unless the proxy was told not to add them, in which case she respects that. she decrementsMax-Forwards:. and she removes the hop-by-hop headers and theLWP::UserAgentheaders. clean-up queen π§Ήβ¨
and then there's this little note, which is lowkey important:
- Note that the filter will automatically remove the
Accept-Encodingheaders if the proxy has at least oneHTTP::Proxy::BodyFilterfilter. (This is to ensure that the filters will receive uncompressed data.)
so if you've got even oneHTTP::Proxy::BodyFilterin the mix,Accept-Encodingis getting yeeted π and the reason is genuinely cute and sensible: she wants those filters to get uncompressed data, because compressed data would be giving them a headache and nobody wants that. iykyk.
π¦ SEE ALSO π¦
go read these next, bestie, they're the extended universe:
HTTP::ProxyHTTP::Proxy::HeaderFilter- RFC 2616
π AUTHOR π
Philippe "BooK" Bruhat, <book@cpan.org>.
Thanks to Gisle Aas, for directions regarding the handling of the hop-by-hop headers. π«Ά (shoutout to Gisle, the hop-by-hop header whisperer, no cap)
π COPYRIGHT π
Copyright 2003-2015, Philippe Bruhat.
β LICENSE β
This module is free software; you can redistribute it or modify it under the same terms as Perl itself. slay, honestly β free software is the blueprint π
and that's the whole page!! π this was HTTP::Proxy::HeaderFilter::standard, page HTTP::...tandard(3pm), from perl v5.36.0, dated 2022-12-04. thank you for coming to my ted talk, go enforce some RFCs responsibly β¨ππΈ
π¦ where this page comes from
- debian bookworm: libhttp-proxy-perl 0.304-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libhttp-proxy-perl 0.304-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhttp-proxy-perl 0.304-5 Β· 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