17 February 2012, 00:48

I've played quite a bit with Hiawatha and I like it a lot.
I've browsed this forum and saw that you firmly believe that rewriting should be handled by the application.
For normal pages I agree with you, however when serving files, using a fast cgi is a big overhead.
Not only we would be limited to N(the max process of fcgi) concurrent connections (that will use 10+MB ram each), but it will also significantly increase cpu usage.

I will not try to convince you that rewriting deserve a place in the web server.
Instead I will suggest to implement X-sendfile.
Not only it would allow to configure rewriting on the fly without taking the server down (unlike lighttpd) or droping .htaccess in every single directory (apache), but it will also keep rewriting out of the server!

And because hiawatha takes security seriously, you could add a directive to chroot to a predefined directory (and emulate such behavior on windows) to avoid sending critical config files (lighttpd is vulnerable to that, I've lived it first hand).

Thank you for considering my suggestion

Hiawatha version: 8.0
Operating System: Linux 2.6.32
Hugo Leisink
17 February 2012, 08:19
I don't know what you mean with that I believe rewriting should be handled by the application. Hiawatha has URL rewriting support (the URL toolkit) or isn't that what you mean?

Anyway, the X-Sendfile header looks interesting. I'll see what I can do to include support for it in 8.1.
This topic has been closed.