[ee122] File w/o extension + Directory listing question...

Carrell Killebrew dank at EECS.Berkeley.EDU
Wed Oct 31 00:18:36 PDT 2007



----- Original Message -----
From: Drew Lustro <drewlustro at gmail.com>
Date: Tuesday, October 30, 2007 10:17 pm
Subject: [ee122] File w/o extension + Directory listing question...

> So for directory listing, say the client requests "/foo"
> 
> If file "foo" exists, does that mean _no_matter_what_ we always 
> just  
> go "501 Not Implemented: /foo" because supported filetypes are  
> determined by filename extension?
Correct, its 501

> 
> If "foo" is a directory, we're supposed to return the contents of 
> the  
> ls command. The documentation _suggests_ we pipe the results of ls  
> into a file. Does this file need to be called something particular? 

You can do this however you want... So no, not called anything particular.

And the content type would be a text file, as answered before.


Daniel

> 
> Could we just call it .tmp_file_contents.txt and then return that 
> (ie:  
> end up doing HTTP/1.0 200 OK\nContent-Type: text/plain\nContent- 
> Length: 9999\n\r\nCONTENTS-OF-.tmp_file_contents.txt) and then 
> delete  
> the temporary file?
> 
> Thanks
> 
> Drew
> _______________________________________________
> ee122 mailing list
> ee122 at mailman.ICSI.Berkeley.EDU
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/ee122
> 


More information about the ee122 mailing list