Work stopped: (MODPYTHON-63) Handle wildcard in Directory to
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Mod-Python > Work stopped: (MODPYTHON-63) Handle wildcard in Directory to




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Work stopped: (MODPYTHON-63) Handle wildcard in Directory to  
Graham Dumpleton (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-07-06 06:11 AM

[ http://issues.apache.org/jira/brows...HON-63?page=all ]

Work on MODPYTHON-63 stopped by Graham Dumpleton

> Handle wildcard in Directory to sys.path transfer
> -------------------------------------------------
>
>          Key: MODPYTHON-63
>          URL: http://issues.apache.org/jira/browse/MODPYTHON-63
>      Project: mod_python
>         Type: Improvement

>   Components: core
>     Versions: 3.1.3
>  Environment: gentoo Linux 2.4.20-gentoo-r8 apache-2.0.54-r8 mod_python-3.
1.3-r1
>     Reporter: Kevin Quick
>     Assignee: Graham Dumpleton
>     Priority: Minor
[vbcol=seagreen]
>
> Below is a patch that does two things:
> 1) On module import failures, logfile contains additional information show
ing
>    system paths as well as module name.
> 2) Support of Python*Handler found in a wildcard-based directory.  For exa
mple,
> <IfModule mod_python.c>
>     <Directory /home/*/public_html/python>
>         AddHandler mod_python .py
>         PythonHandler helloworld
>         PythonDebug on
>     </Directory>
> </IfModule>
> which mirrors a corresponding PERL setting and would allow the user to
> place a mod_python handler in their $HOME/public_html/python directory.
> In the current code, the wildcard is not translated, the sys.path update
> will be invalid, and the user's module will not be accessible.  The attach
ed
> patch provides a fix for this.
> N.B. There are obvious security issues in using this type of configuration
,
> but this is very useful for dev environments, and security would implement
ed
> via explicit alternatives anyhow.
> Index: apache.py
>  ========================================
===========================
> RCS file: /home/cvspublic/httpd-python/lib/python/mod_python/apache.py,v
> retrieving revision 1.83
> diff -r1.83 apache.py
> 33a34,40 
> 170,171c177
> <                 if filter.dir and (filter.dir not in sys.path):
> <                     sys.path[:0] = [filter.dir]
> --- 
> 280,282c286
> <                     dir = hlist.directory
> <                     if dir and (dir not in sys.path):
> <                         sys.path[:0] = [dir]
> --- 
> 454c458,462
> <             f, p, d = imp.find_module(parts[i], path)
> --- 






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:38 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register