Re: Announce: kHTTPd 0.1.0

Arjan van de Ven (adve@oce.nl)
Tue, 8 Jun 1999 16:57:00 +0200 (CEST)


In article <19990608125751.R949@mff.cuni.cz> you wrote:
> I'd suggest you to check the error handling when some kmalloc/gfp returns
> NULL. In some cases kHTTPd will cause memory leaks (e.g. the snippet bellow
> looks suspicious to me (if Buffer is NULL but httptime is not, then you'll
> leak it)).

> Buffer = (char*) get_free_page(GFP_KERNEL);
> httptime = kmalloc(sizeof(struct http_time),GFP_KERNEL);

Woops... I'll fix that ASAP.

> Also, I'd like to suggest if kHTTPd added some way how to explicitely say
> which files should be served by kHTTPd and which should be taken care of in
> userspace.

There is one now: Make the file user-executable.

> One way could be if khttpd allowed to specify a permission mask
> via /proc or sysctl and if file's permissions & that permission mask would
> be non-zero, it would serve it, otherwise it would forward it up. By that
> one could e.g. configure the sticky bit of files to trigger this, so if one
> has server where some documents need to be handled e.g. according to
> requested language or whatever, the admin can exclude them from kHTTPd
> processing.

The sticky bit... Why haven't I thought of that...

> I'm also not sure if limiting extension to 4 characters is a good idea,
> because .shtml are common and those definitely should not be served by
> kHTTPd, while .html match the same 4 byte extension.

I'll think about it. BUT shtml files can have either the sticky-bit or
any executable bits set.

> It would be also nice if you could port your daemon to 2.3.x (preferably by
> #ifdefing the same sources) and use 2.3.x wake_one semantics.

I'll do that.

Greetings,
Arjan van de Ven

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/