[Reposting to this thread, that is closer to
the subject... first posted in "Preparations for ZD's ... "
our ideas are in the same direction - let the path decide,
but with your idea the paths have to be different from root.
Mine can be local /Roger]
How about using the path to decide if the page is static or not,
instead of using hacks that will never be complete enough.
My idea:
- if the path a contains a directory named "static" then the page
is static and can be handled by khttpd. If khttpd is not running
it will work anyway, without polluting the environment with hacks.
Example:
$WEBROOT/logo.gif
will be handled by user space http server (if $WEBROOT does not contain
a "static" directory)
$WEBROOT/static/logo.gif
can be handled by khttpd if it is running.
=> Any page designer can decide (think private home pages), he would
know if a
page, gif ... is static or not.
Implementation details.
Searching for a specific string in a text are described in several
text books, like Algorithms by Robert Sedgewick. One that I think is
promising is Rabin-Karp.
"Moving hash value" - can be compared to moving average over
characters. When it matches you got a likely candidate, by using
weights you could almost avoid false indications.
[watch out for ./static.html ! probably the match should be
with "/static/"]
Regards,
Roger Larsson
Skellefteċ, Sweden
Chris Smith wrote:
>
> Maybe this is a dumb question, but here goes:
>
> Why not give khttpd a devoted port? Why go to all these pains to dissect
> keep-alive connections and all that, when we can do <IMG
> SRC="http://my.server.net:81/banner.gif">? Is that just too easy for
> everyone? Is it because the benchmarks we were talking about would be able
> to use something like that?
>
> Just curious,
> Chris
>
> -
> 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/
--The Internet interprets Windows as damage, and routes around it.
Roger Larsson Skellefteċ Sweden
- 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/