Re: generalizing khttpd

Riley Williams (rhw@MemAlpha.CX)
Sat, 12 Jun 1999 14:15:22 +0100 (GMT)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

--1421910094-2066731574-929193322=:26266
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hi Ben.

>>> If the URL has ? in it, there CANNOT be a file corresponding
>>> with it, so this one caught by kHTTPd right now, using the
>>> rule "When not servable, do userspace".

>> Don't be too sure of that - try the following command:

>> Q> touch 'x?y' ; ls -l 'x?y'

>> I've just tried it, and it works fine here...

> It doesn't matter whether can create a file containing `?'.
> `?' signifies the beginning of a URL query string. You'll find
> that to access the file above through a web server you actually
> need to specify x%3fy as the URL.

I know, and that's what I was pointing out to the person I was
replying to - reread his comments and you'll see that the current
design of khttpd (at least as he specified it) would happily have
taken x?y as a filename if such a file happenned to have existed.

I therefore repeat the claim I made, which is that any web server
seeing a URL with a ? in it MUST assume that the URL in question
references a dynamic file.

However, you've brought up a point that I'd certainly overlooked, and
I suspect Arjan had as well, which is the %xx notation for certain
characters in filenames.

Arjan: Allowing for those sequences, the correct handling of URL's
as far as khttpd is concerned would be similar to the enclosed shell
script, at least as I understand it.

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

--1421910094-2066731574-929193322=:26266
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=url
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.10.9906121415220.26266@ps.cus.umist.ac.uk>
Content-Description:
Content-Disposition: attachment; filename=url

IyEvYmluL2Jhc2gNCmlmIFsgJCMgLWVxIDAgXTsgdGhlbg0KICAgIGVjaG8g
IlVzYWdlO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
CSAgICAjIENoZWNrIHdoZXRoZXIgYW55IG9mIHRoZSBkaXJlY3RvcmllcyBp
biB0aGUgcGF0aCBzcGVjaWZ5DQoJICAgICMgdGhhdCBpdCdzIGR5bmFtaWMu
DQoNCgkgICAgZm9yIERJUiBpbiAkRFlOQU1JQ19ESVJTIDsgZG8NCgkJaWYg
ZWNobyAiJFVSTCIgfCBmZ3JlcCAiJHtESVJ9IiA+IC9kZXYvbnVsbCA7IHRo
ZW4NCgkJICAgIFJFU1VMVD1EWU5BTUlDDQoJCSAgICBicmVhaw0KCQlmaQ0K
CSAgICBkb25lDQoNCglmaQ0KICAgIGZpDQoNCiAgICAjIERpc3BsYXkgdGhl
IHJlc3VsdC4NCg0KICAgIHByaW50ZiAnJS04cyAlc1xuJyAiJHtSRVNVTFR9
OiIgIiRPUklHIg0KZG9uZQ0K
--1421910094-2066731574-929193322=:26266--

-
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/