On 08/09/2006, at 5:15 PM, Graham Dumpleton wrote:

Now I am well and truly confused and not sure if I have broken mod_python 3.3
or not. Short of it is, that I cannot get something like:

  <Location /location>
  AddHandler mod_python .xxx
  PythonHandler /Users/grahamd/Projects/testing/xxx.py
  </Location>

FWIW, you can only use AddHandler with Location directives if you also
set ModMimeUsePathInfo directive.

  <Location /location>
  AddHandler mod_python .xxx
  PythonHandler /Users/grahamd/Projects/testing/xxx.py
  ModMimeUsePathInfo On
  </Location>

This way the mod_mime module which processes AddHandler directives,
will take into consideration the req.path_info value which is where the
extension will lie in this case.

The only caveat to this is that the extension must be at the end of the URL
and cannot be embedded within the path. Ie., a URL of:

  /location/cat/dog.xxx

will match and handler called, but not if it is:

  /location/cat.xxx/dog

I'll add notes about this too that new article of mine when I get a chance.

Graham

Reply via email to