[ 
http://issues.apache.org/jira/browse/MODPYTHON-94?page=comments#action_12366945 
] 

Graham Dumpleton commented on MODPYTHON-94:
-------------------------------------------

Changes as contained in requestobject.c.patch and modpython4.tex.patch applied 
to mod_python SVN trunk in revision 378837.

Note though that req.ssl_var_lookup() used instead of req.ssl_var() as 
commented on already and req.is_https() changed to return integer instead of 
bool. Latter is in part because of lack of bool support in Python 2.2, but also 
because all other wrappers for Apache functions returning true/false still 
return an integer. Thus have made it consistent and if we are going to starting 
using bool type all should perhaps be changed to make them consistent.

Finally, change allowed argument type for req.ssl_var_lookup() to string and 
disallowed passing of None. If None was allowed, the null pointer may cause 
internal Apache function to crash.

No specific test added to test suite, as can't reasonably produce a generic 
test because of need to have SSL compiled into Apache and possible need to have 
a client side SSL certificate. I don't know this stuff, but if someone else can 
come up with a test then great.

> Calling APR optional functions provided by mod_ssl
> --------------------------------------------------
>
>          Key: MODPYTHON-94
>          URL: http://issues.apache.org/jira/browse/MODPYTHON-94
>      Project: mod_python
>         Type: New Feature
>   Components: core
>  Environment: Apache 2
>     Reporter: Deron Meranda
>      Fix For: 3.3
>  Attachments: modpython4.tex.patch, requestobject.c.patch
>
> mod_python is not able to invoke APR Optional Functions.  There are
> some cases however where this could be of great benifit.
> For example, consider writing an authentication or authorization handler
> which needs to determine SSL properties (even if to just answer the
> simple question: is the connection SSL encrypted).  The normal way of
> looking in the subprocess_env for SSL_* variables does not work in those
> early handler phases because those variables are not set until the fixup 
> phase.
> The mod_ssl module though does provide both a ssl_is_https() and
> ssl_var_lookup() optional functions which can be used in earlier
> phases.  For example look at how mod_rewrite calls those; using
> the APR_DECLARE_OPTIONAL_FN and APR_RETRIEVE_OPTIONAL_FN
> macros.
> I can see how it might be very hard to support optional functions in
> general because of the C type linkage issue, but perhaps a select few
> could be coded directly into mod_python.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to