durusmail: quixote-users: Re: [PATCH] fix for mod_pythonDirtectory/VirtualHost
Having Quixote serve entire website
2004-05-04
2004-05-04
[PATCH] fix for mod_python Dirtectory/VirtualHost
2004-05-05
Shahms King (2 parts)
Re: [PATCH] fix for mod_python Dirtectory/VirtualHost
2004-05-05
Re: [PATCH] fix for mod_pythonDirtectory/VirtualHost
2004-05-05
2004-05-05
2004-05-05
Re: [PATCH] fix for mod_pythonDirtectory/VirtualHost
Eric Floehr
2004-05-05
Shahms,

Spoke to soon...adding that breaks the LocationMatch case.  Removing it
and putting an explicit DocumentRoot with a trailing slash in the
VirtualHost case works, but it should we insist on a trailing slash?  It
is a small price to pay for such goodness ;-).

Regards,
Eric

Eric Floehr said:
> Shahms,
>
> Thank you!  I have tested both cases: in a VirtualHost, and in a
> LocationMatch.  There was only one hitch.  I didn't have a DocumentRoot,
> so the default was passed in to the VirtualHost.  It didn't have a
> trailing slash.  It seems if you have any DocumentRoot without a trailing
> slash, the script puts doc_root and script_name together missing a slash
> between the two.  I fixed it by adding a line in your build_cgi_env method
> like so:
>
>     doc_root = env.get('DOCUMENT_ROOT')
>     if (doc_root[-1] <> "/"):
>         doc_root = doc_root + "/"
>
> Which takes the doc_root and ensures there is a trailing slash.  That
> caused the following comparison to work, and everything else works great.
>
>     if doc_root + script_name[1:] == filename:
>
> Thanks again for the patch!  I'll continue running with this and if I
> discover any other issues, I'll let you know.  It seems to be running
> great!
>
> Regards,
> Eric
>
> Shahms King said:
>> Attached is a patch which "fixes" Quixote and mod_python when used from
>> a VirtualHost or Directory directive.  I've tested it using both typical
>> and bizarrely 'Alias'ed setups inside and outside of virtual hosts and
>> everything I found works correctly.  I'm not making any promises though
>> ;-P  Essentially, it tries to figure out what parts of 'SCRIPT_NAME'
>> really belong in PATH_INFO and moves them accordingly.  After that it
>> checks to see if the current script is being served from 'DOCUMENT_ROOT'
>> and, if so, assumes it's handling the entire site and sets up
>> SCRIPT_NAME and PATH_INFO accordingly.  I'd appreciate some testing.
>>
>> The second "hunk" of the patch fixes the config file reading, and I've
>> heard that's already been changed in CVS.
>> --
>> Shahms King 
>>
>
>
> _______________________________________________
> Quixote-users mailing list
> Quixote-users@mems-exchange.org
> http://mail.mems-exchange.org/mailman/listinfo/quixote-users
>



reply