[ee122] Directories with extensions

Calvin A cardi at berkeley.edu
Wed Oct 31 00:48:38 PDT 2007


> 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:
>   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
>
And another:

If we have

 GET /foo.avi

I thought we would just return "501 Not Implemented". Are we to check if
it exists as a directory first? If so, does that mean we need to append
/index.html and check if that exists, then treat it as a directory and
list the contents (if permitted)?

In the case when we have

 GET /foo.avi/

it seems more clear that we check if the folder exists, then look for
index.html, then list the directory's contents (if I'm not mistaken).

Thanks,
Calvin
> --
> Chris Cowart
> _______________________________________________
> ee122 mailing list
> ee122 at mailman.ICSI.Berkeley.EDU
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/ee122
>




More information about the ee122 mailing list