Assigned: (MODPYTHON-157) PythonInterpPerDirectory broken
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 > Assigned: (MODPYTHON-157) PythonInterpPerDirectory broken




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

    Assigned: (MODPYTHON-157) PythonInterpPerDirectory broken  
Graham Dumpleton (JIRA)


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


 
04-10-06 12:57 PM

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

Graham Dumpleton reassigned MODPYTHON-157:
------------------------------------------

Assign To: Graham Dumpleton

> PythonInterpPerDirectory broken for directory request in fixup phase and e
arlier.
> --------------------------------------------------------------------------
-------
>
>          Key: MODPYTHON-157
>          URL: http://issues.apache.org/jira/browse/MODPYTHON-157
>      Project: mod_python
>         Type: Bug

>   Components: core
>     Versions: 3.2.8, 3.1.4, 2.7.10
>     Reporter: Graham Dumpleton
>     Assignee: Graham Dumpleton

>
> The PythonInterpPerDirectory request creates distinct interpreters for eac
h directory in the file system. The name of the directory is derived from re
q.filename.
> In determining the name of the interpreter from req.filename, it always assumes th
at if the request is against the directory and not a file in it, that req.filename w
ill always have a trailing slash appended to it. This however is not the case, as tr
ail
ing slash redirection is only performed by mod_dir at the end of the fixup handler phase. Th
us the name of the interpreter will be wrong for handler run in fixup handler pahse or earli
er and will actually be that of the parent directory.
> The code in select_interp_name() of src/mod_python.c which determines inte
rpreter name is:
>             /* base interpreter on directory where the file is found */
>             if (req && ap_is_directory(req->pool, req->filename)) {
>                 /** XXX I suppose that if req->filename is a directory, th
ere already
>                     is a trailing slash in req->filename. This is due to t
he fact
>                     that Apache redirect any request from /directory to /d
irectory/.
>                     That's why the tests below are commented out, they sho
uld be useless.
>                 **/
>                 /* if (req->filename[strlen(req->filename)-1]=='/') &#
123; */
>                     return ap_make_dirstr_parent(req->pool, req->filename)
;
>                 /* }
>                 else {
>                     return ap_make_dirstr_parent(req->pool,
>                                                 apr_pstrcat(req->pool, req
->filename,
>                                                             "/", NULL ));
>                 } */
>             }
> Note that it actually has the code that would be required for this to work
 properly but it is commented out because of a wrong assumption that the tra
iling slash would always be there.
> Code simply has to be uncommented.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:54 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