You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by Jim Gallacher <jp...@jgassociates.ca> on 2006/11/04 17:04:21 UTC

PSP Handler underscore trick

I was doing a bit of work on the Docs and I noticed a problem with the 
.psp_ trick to get the listing of the source and generated code. This is 
  not a feature I use so I'm not sure if the documentation is incorrect 
or if the behaviour has changed. Simply appending "_" to the URL does 
not work as advertised.

eg.

URL
---
http://localhost/test.psp_


test.psp
--------
<%
req.write('hello world')
%>


This configuration doesn't work - status 404
.htaccess
---------
PythonDebug On
AddHandler mod_python .psp
PythonHandler mod_python.psp


This configuration works - status 200
.htaccess
---------
PythonDebug On
AddHandler mod_python .psp .psp_
PythonHandler mod_python.psp


This configuration works - status 200
.htaccess
---------
PythonDebug On
SetHandler mod_python
PythonHandler mod_python.psp

So what's up with this? Bad docs or has it changed?

Jim



Re: PSP Handler underscore trick

Posted by Jim Gallacher <jp...@jgassociates.ca>.
Graham Dumpleton wrote:
> Incomplete documentation. For AddHandler it would always have required
> the .psp_ extension case to be listed explicitly.

I'll fix the docs.

Jim

> On 05/11/2006, at 3:04 AM, Jim Gallacher wrote:
> 
>> I was doing a bit of work on the Docs and I noticed a problem with the 
>> .psp_ trick to get the listing of the source and generated code. This 
>> is  not a feature I use so I'm not sure if the documentation is 
>> incorrect or if the behaviour has changed. Simply appending "_" to the 
>> URL does not work as advertised.
>>
>> eg.
>>
>> URL
>> ---
>> http://localhost/test.psp_
>>
>>
>> test.psp
>> --------
>> <%
>> req.write('hello world')
>> %>
>>
>>
>> This configuration doesn't work - status 404
>> .htaccess
>> ---------
>> PythonDebug On
>> AddHandler mod_python .psp
>> PythonHandler mod_python.psp
>>
>>
>> This configuration works - status 200
>> .htaccess
>> ---------
>> PythonDebug On
>> AddHandler mod_python .psp .psp_
>> PythonHandler mod_python.psp
>>
>>
>> This configuration works - status 200
>> .htaccess
>> ---------
>> PythonDebug On
>> SetHandler mod_python
>> PythonHandler mod_python.psp
>>
>> So what's up with this? Bad docs or has it changed?
>>
>> Jim
>>
> 


Re: PSP Handler underscore trick

Posted by Graham Dumpleton <gr...@dscpl.com.au>.
Incomplete documentation. For AddHandler it would always have required
the .psp_ extension case to be listed explicitly.

On 05/11/2006, at 3:04 AM, Jim Gallacher wrote:

> I was doing a bit of work on the Docs and I noticed a problem with  
> the .psp_ trick to get the listing of the source and generated  
> code. This is  not a feature I use so I'm not sure if the  
> documentation is incorrect or if the behaviour has changed. Simply  
> appending "_" to the URL does not work as advertised.
>
> eg.
>
> URL
> ---
> http://localhost/test.psp_
>
>
> test.psp
> --------
> <%
> req.write('hello world')
> %>
>
>
> This configuration doesn't work - status 404
> .htaccess
> ---------
> PythonDebug On
> AddHandler mod_python .psp
> PythonHandler mod_python.psp
>
>
> This configuration works - status 200
> .htaccess
> ---------
> PythonDebug On
> AddHandler mod_python .psp .psp_
> PythonHandler mod_python.psp
>
>
> This configuration works - status 200
> .htaccess
> ---------
> PythonDebug On
> SetHandler mod_python
> PythonHandler mod_python.psp
>
> So what's up with this? Bad docs or has it changed?
>
> Jim
>