quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Firat KUCUK <fi...@kucuk.org>
Subject mod_python directory index error
Date Tue, 21 Mar 2006 13:09:14 GMT
Hi,

i have a little problem about Directory Index.

this is our .htaccess file:

Allow from       All

AddHandler       mod_python .py
PythonHandler    wepy.handler
PythonDebug      On

DirectoryIndex   index.htm index.html index.php index.py index.pl

wepy is a new PHP like web python library.

http://www.wepy.org/

we just type http://blablabla.com/wepy/

and our main file is index.py

but req.path_info is None

so in mod_python/apache.py/build_cgi_env function:

    *if* req.path_info *and* len(req.path_info) > 0:
        env[*"SCRIPT_NAME"*] = req.uri[:-len(req.path_info)]
    *else*:
        env[*"SCRIPT_NAME"*] = req.uri


i think should be like this.

    if req.path_info:
        env["SCRIPT_NAME"] = req.uri[:-len(req.path_info)]
    else:
        env["SCRIPT_NAME"] = req.uri


regards





-- 
*Öğr. Gör. Fırat KÜÇÜK*
Industrial Electronics Program Coordinator

-----------------------------------------------------------
  Department of Industrial Electronics
  Sakarya University, Adapazari Vocational College
  + 90 (264) 346 02 32, fkucuk[at]sakarya[dot]edu[dot]tr
  http://www.adamyo.sakarya.edu.tr/

  http://firat.kucuk.org/, firat[at]kucuk[dot]org
-----------------------------------------------------------


Mime
View raw message