> Personally I find that efforts to make serving static pages by
> HTTP (and only static pages by http and maybe ftp) from
> userspace are so ridiculously overdone (threads aio, signals,
> sendfile), and they hurt non-static-files server perrformance
> and functionality so much (by forcing unsuitable processing
> model on programmers that write modules for those servers),
> moving this into kernel can be the lesser evil if not a
> blessing.
> If there will be a reasonable way to tell the in-kernel server
> from userspace, what set of URLs should be mapped to what files,
> it will be enough to perform this task in fast and secure way,
> leaving all complex work to userspace server.
Perhaps one could use something based on the way squid currently does
that task.
1. If the URL has a ? anywhere within it, squid assumes it to be a
dynamic URL.
2. One of squid's configuration parameters specifies a collection of
directory names which, if found in the URL with / on either side
of them, and with at least one element after them, are taken as
indicating that the URL in question is a DYNAMIC one.
3. Any URL not satisfying one of the above rules is taken to be a
static one.
Rule 1 is simply a case of...
Q> if (index(url,'?') != NULL)
Q> dynamic = TRUE;
...and rule 2 suggests the use of /proc/sys/khttpd as a file to
specify the directory names to look for in rule 2, with the default
contents being the same as the squid defaults.
Best wishes from Riley.
+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* ftp://ftp.MemAlpha.cx/pub/rhw/Linux
* http://www.MemAlpha.cx/kernel.versions.html
-
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/