plack / Plack

PSGI toolkit and server adapters
http://plackperl.org/
Other
486 stars 214 forks source link

[feature] Introduce server_software option to make LighttpdScriptNameFix more generic? #676

Closed XSven closed 2 years ago

XSven commented 2 years ago

The challenge that leads to the LighttpdScriptNameFix Plack middleware seems to be applicable to the Apache webserver too under certain circumstances. Unfortunately the SERVER_SOFTWARE condition does not allow me to use this middleware unless I am overwriting the SERVER_SOFTWARE using the ForceEnv middleware. Maybe a server_software option (defaults to lighttpd) could be introduced that makes LighttpdScriptNameFix more generic.

miyagawa commented 2 years ago

This middleware is roughly 10 lines of code and has not been changed for 10 years. I recommend you to copy it to a different piece of middleware and include it in your application.