Hi Ian,

    self.directory = os.path.normpath(directory)
I think that makes sense.

Great.

This is how subdirectories are handled:

  SCRIPT_NAME=''; PATH_INFO='/foo/bar/baz.html'
  maps to app StaticURLParser('/www')

That in turn forwards the request as:

  SCRIPT_NAME='/foo'; PATH_INFO='/bar/baz.html'
  maps to app StaticURLParser('/www/foo')

And so forth, until you get to a real file.

But if you end up at a directory instead of a file, it isn't working.

Ahh right, makes sense. I'll try and track down the problem.

404 would be okay, I guess, though the actual error message should say something different so people realize why they get a 404. Apache gives a 403, though IMHO that's probably a bad convention. It's only Forbidden in Apache because indexes weren't turned on, but calling enabling indexes a permission (that can be revoked) doesn't make any sense. So sure, 404 with a message "No index file displayed for directories" or something like that. Alternately we could display index.html (probably based on a class method, or something passed to the constructor, which would be a list of index filenames -- but I'm also fine leaving it out so long as the 404 is sent in a special method that can be overridden).

Yup. I'd prefer 404 too so we'll go with that. I'll have a look at adding some options for directory indexes too, probably tomorrow now.

Cheers,

James


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to