You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Peter Melvyn <pe...@gmail.com> on 2007/08/21 13:15:01 UTC
[users@httpd] Missing 1st segment in PATH_INFO using mod_python
Hi all,
I am trying to move my Django application from development server to
Apache Server 2.2 with mod_python 3.3.1 on Windows and I encountered a
problem with value of PATH_INFO - if I navigate to
http://localhost/wss/user/home/, I get
PATH_INFO=/user/home/ instead of /wss/user/home/
I found-out a discussion concerning similiar problem in mod_python
community saying that value of PATH_INFO is supplied by Apache in
dependance on directory and/or file exist. I tried to use
AcceptPathInfo, but unsuccessfully.
###
I have two locations:
<Location "/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE bizweb.server_settings
PythonDebug On
PythonPath "[r'C:\\.WKS-PF\\PRJ\\ECLIPSE\\Django\\src'] + sys.path"
</Location>
<Location "/wssmedia">
SetHandler default-handler
</Location>
The first is for content generated by Django frameword, the second one is for
statically served files like .css, images etc...
###
mod_python shows values as follow:
DocumentRoot: 'V:/WWW-ROOT/bizweb'
URI: '/wss/user/home/'
Location: '/'
Directory: None
Filename: 'V:/WWW-ROOT/bizweb/wss'
PathInfo: '/user/home/'
###
Please, could anybody advice how to achieve the PATH_INFO will contain
full path if request is routed to mod_python
Thank you in advance,
Peter
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Missing 1st segment in PATH_INFO using mod_python
Posted by Peter Melvyn <pe...@gmail.com>.
> On 8/21/07, Peter Melvyn <pe...@gmail.com> wrote:
>
> > Please, could anybody advice how to achieve the PATH_INFO will contain
> > full path if request is routed to mod_python
>
> Well, I'm not sure what the "correct" value for PATH_INFO is in this
> case
Yes, you are right - it would be probably said explicitelly for each
virtual locations.
> but why not just use REQUEST_URI instead?
Because we made a bad decission: if we learned Django framework, we
probably studied incorrect descendant of http.request, which assignes
PATH_INFO into request.path attribute. Reviewing Django sources again,
I found that correct mod_python's request assignes REQUEST_URI to
path.
OK, we will replace PATH_INFO by REQUEST_URI.
Thanks for your help,
Peter
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Missing 1st segment in PATH_INFO using mod_python
Posted by Joshua Slive <jo...@slive.ca>.
On 8/21/07, Peter Melvyn <pe...@gmail.com> wrote:
> Please, could anybody advice how to achieve the PATH_INFO will contain
> full path if request is routed to mod_python
Well, I'm not sure what the "correct" value for PATH_INFO is in this
case, but why not just use REQUEST_URI instead?
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org