Replies: 1 comment 5 replies
|
Hey, I'm not sure of the estimate, but you can already get all headers with Also, please note that this will only works with HTTP/1, because HTTP/2 and HTTP/3 require clients to send full lower case headers before transmission anyway. |
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Tldr: would anyone be able to give a rough estimate of the effort needed to implement, and maintain without diverging considerably from mainline, an FP module that would set up the PHP environment (from the received http request, presumably parsed by Caddy into Go data structures) in a slightly unconventional way?
The "unconventional" part being:
Point 3 is the key here, as what I want to achieve is being able to tell apart the following 2 requests:
and
Atm, all the webservers/php-sapis I tested transform both of those into
$_SERVER['HTTP_HACKME'] = 'hello, world'(*).But, as the app that I am writing is meant to be a Firewall(**), being able to tell them apart would be useful. As it would nice, but not mandatory, to be able to retrieve the headers with their original casing.
Atm I am eyeing writing a webserver implementation as a self-contained php app (starting from eg. Qbix or AppserverIo), as that allows me to fine-tune the http request parsing to my needs, but it also feels like begging for a mountain of maintenance work, and pining for perf issues.
Of course, if Caddy does not allow access to those http header lines as independent values, this is all moot in the first place...
* = more or less. Some webservers do not strip tabs/spaces around header values as per rfc9110...
** = I know, why on earth did I ever pick this tool for this job?
All reactions