[ee122] resolving filesnames and directories

Merry Choi merry_c at berkeley.edu
Mon Oct 29 23:45:23 PDT 2007


So essentially, if the URI does not have a slash after it, nor a
.txt/.gif/.html/.jpg ... then we can return 501?




-----Original Message-----
From: lisa.fowler at gmail.com [mailto:lisa.fowler at gmail.com] On Behalf Of Lisa
Fowler
Sent: Monday, October 29, 2007 10:35 PM
To: Merry Choi
Cc: ee122 at icsi.berkeley.edu
Subject: Re: [ee122] resolving filesnames and directories

Actually, you'd never return "foo" if foo doesn't have an extension,
per the spec.  So the "return foo" below should be replaced with the
appropriate not-supported error.

-Lisa

On 10/29/07, Lisa Fowler <fowler at eecs.berkeley.edu> wrote:
> Close, but you're missing the first step....
>
> e.g. request is for "http://www.domain.com/foo"
>
> Assume is not a directory.  Test for file "foo":
>   + File "foo" exists.  Return foo or permission denied.
>   + File "foo" does not exist.  Return does not exist.
>   + File "foo" is not a file, but is a directory.
>
> Then, if directory, continue as you described.
>
> I hope that helps!
>
> Lisa
>
> On 10/29/07, Merry Choi <merry_c at berkeley.edu> wrote:
> > Just wanted to make sure I'm interpreting these steps correctly.
> >
> > If the file requested does not have an extension you can assume it is a
> > request for a directory. You first append /index.html to see if that
> > directory has an index.html file. If yes, then you send the index.html
file.
> > If not, then you perform and ls and send the directory contents. Yes?
> > (Please be yes. :)
> >
> >
> >
> > _______________________________________________
> > ee122 mailing list
> > ee122 at mailman.ICSI.Berkeley.EDU
> > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/ee122
> >
>



More information about the ee122 mailing list