[ee122] Directories with extensions
Daniel Killebrew
dank at eecs.berkeley.edu
Wed Oct 31 15:15:14 PDT 2007
Christopher Cowart wrote:
> On Wed, Oct 31, 2007 at 12:20:27AM -0700, Carrell Killebrew wrote:
>
>> Yes, list the directory's contents if the URL passed to you does
>> refer to a directory, regardless of what the name 'looks like'.
>>
>> Don't bother looking at the file's contents, just blindly return
>> text/plain since the extension is .txt
>>
>
> Here's another case:
>
> Assume /index.html is a directory.
>
> When the client asks for /, do we:
>
Good question. Since they asked for / and not actually for /index.html,
and since index.html is not a file, do step 3. Ie: treat '/' as a
directory and do 'ls' on it.
> a) ls index.html
> b) recurse, so look for /index.html/index.html, and ls /index.html if
> index.html/index.html doesn't exist
> c) not worry about it because it's a really obnoxious corner case that
> doubles the length of the logic and you're a nice guy who isn't
> going to write any such test cases
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ee122 mailing list
> ee122 at mailman.ICSI.Berkeley.EDU
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/ee122
>
More information about the ee122
mailing list