Re: [PATCH] RewriteCond and SSL environment variables

2004-03-04 Thread Mads Toftum
On Thu, Mar 04, 2004 at 07:41:54AM +0100, André Malo wrote: I'd prefer the %{SSL:...} variant and using ssl_var_lookup_ssl. All other Agreed. It makes sense to me to make a specific point out of where those variables came from. vh Mads Toftum -- `Darn it, who spiked my coffee with water?!' -

Re: [PATCH] RewriteCond and SSL environment variables

2004-03-04 Thread Joe Orton
On Thu, Mar 04, 2004 at 07:41:54AM +0100, André Malo wrote: * Mathihalli, Madhusudan [EMAIL PROTECTED] wrote: Here's a slightly modified version of Joe's patch to - not segfault if rewrite_ssl_var_lookup is not available (mod_ssl not loaded)- use SSL environment variables as

Re: [PATCH] RewriteCond and SSL environment variables

2004-03-04 Thread Andr Malo
* Joe Orton [EMAIL PROTECTED] wrote: I'm not really convinced about using ssl_var_lookup_ssl: that function does not handle the HTTPS variable, and it would be potentially confusing to users and hard to document since only some subset of the SSL variables could be used. (it would also need a

Re: [PATCH] RewriteCond and SSL environment variables

2004-03-04 Thread Joe Orton
On Thu, Mar 04, 2004 at 11:08:25AM +0100, André Malo wrote: * Joe Orton [EMAIL PROTECTED] wrote: I'm not really convinced about using ssl_var_lookup_ssl: that function does not handle the HTTPS variable, and it would be potentially confusing to users and hard to document since only some

Re: [PATCH] RewriteCond and SSL environment variables

2004-03-04 Thread Geoffrey Young
Maybe we should put the HTTPS check into an own function (we could use %{HTTPS} in mod_rewrite then). That way, other modules, that want to check (only) HTTPS, also don't need to run though all the mess of ssl_var_lookup. I'm not familiar with mod_ssl internals, but is there any reason we

RE: [PATCH] RewriteCond and SSL environment variables

2004-03-04 Thread Mathihalli, Madhusudan
-Original Message- From: Geoffrey Young [mailto:[EMAIL PROTECTED] [SNIP] I'm not familiar with mod_ssl internals, but is there any reason we can't move subprocess_env population to something early like post-read-request? as a per-connection thingy, HTTPS ought to be know before

Re: RewriteCond and SSL environment variables

2004-03-03 Thread Joe Orton
On Tue, Mar 02, 2004 at 08:42:36PM +0100, André Malo wrote: * Joe Orton [EMAIL PROTECTED] wrote: On Mon, Mar 01, 2004 at 10:37:46AM -0800, Mathihalli, Madhusudan wrote: Hi, Question: Can we use the environment variables setup by mod_ssl in the RewriteCond directive ? Not

Re: RewriteCond and SSL environment variables

2004-03-03 Thread Andr Malo
* Joe Orton [EMAIL PROTECTED] wrote: Sounds good. But we'd need to hook the variable creation earlier anyway, since ssl_var_lookup finally just uses r-subprocess_env. I don't see how that follows; if you're just trying to retrieve a non-SSL subprocess_env var via ssl_var_lookup(), why

Re: RewriteCond and SSL environment variables

2004-03-03 Thread Joe Orton
On Wed, Mar 03, 2004 at 07:47:21PM +0100, André Malo wrote: * Joe Orton [EMAIL PROTECTED] wrote: Sounds good. But we'd need to hook the variable creation earlier anyway, since ssl_var_lookup finally just uses r-subprocess_env. I don't see how that follows; if you're just trying to

Re: RewriteCond and SSL environment variables

2004-03-03 Thread Andr Malo
* Joe Orton [EMAIL PROTECTED] wrote: I think you've got it backwards: ssl_var_lookup always generates the SSL variables on the fly; it is used by the fixup handler to populate r-subprocess_env if +StdEnvVars, but works exactly the same regardless of that config option. I must have been blind

RE: RewriteCond and SSL environment variables

2004-03-03 Thread Mathihalli, Madhusudan
-Original Message- From: Joe Orton [mailto:[EMAIL PROTECTED] [SNIP] What I'm proposing is something as simple as below, which lets you do RewriteCond %{SSL:HTTPS} =on without needing +StdEnvVars... are we on the same page? I'd suggest having %{ENV:HTTPS}, %{ENV:SSL_CIPHER_...} - to

[PATCH] RewriteCond and SSL environment variables

2004-03-03 Thread Mathihalli, Madhusudan
Here's a slightly modified version of Joe's patch to - not segfault if rewrite_ssl_var_lookup is not available (mod_ssl not loaded) - use SSL environment variables as %{ENV:HTTPS} or %{ENV:SSL_PROTOCOL} I tested the patch with the following rules, and it appeared to work without causing any

Re: [PATCH] RewriteCond and SSL environment variables

2004-03-03 Thread Geoffrey Young
Mathihalli, Madhusudan wrote: Here's a slightly modified version of Joe's patch to - not segfault if rewrite_ssl_var_lookup is not available (mod_ssl not loaded) - use SSL environment variables as %{ENV:HTTPS} or %{ENV:SSL_PROTOCOL} I tested the patch with the following rules, and it

Re: [PATCH] RewriteCond and SSL environment variables

2004-03-03 Thread Justin Erenkrantz
--On Wednesday, March 3, 2004 3:04 PM -0800 Mathihalli, Madhusudan [EMAIL PROTECTED] wrote: +/* support for ssl_var_lookup() */ +APR_DECLARE_OPTIONAL_FN(char *, ssl_var_lookup, +(apr_pool_t *, server_rec *, + conn_rec *, request_rec *, +

RE: [PATCH] RewriteCond and SSL environment variables

2004-03-03 Thread Mathihalli, Madhusudan
-Original Message- From: Justin Erenkrantz [mailto:[EMAIL PROTECTED] [SNIP] --On Wednesday, March 3, 2004 3:04 PM -0800 Mathihalli, Madhusudan [EMAIL PROTECTED] wrote: +/* support for ssl_var_lookup() */ +APR_DECLARE_OPTIONAL_FN(char *, ssl_var_lookup, +

RE: [PATCH] RewriteCond and SSL environment variables

2004-03-03 Thread Justin Erenkrantz
--On Wednesday, March 3, 2004 4:24 PM -0800 Mathihalli, Madhusudan [EMAIL PROTECTED] wrote: I thought it'll be a little too much :) What if I don't compile with mod_ssl - I'll have a whole bunch of declarations with no definitions associated with it. Besides, mod_proxy.c follows the same logic.

RE: [PATCH] RewriteCond and SSL environment variables

2004-03-03 Thread Mathihalli, Madhusudan
-Original Message- From: Justin Erenkrantz [mailto:[EMAIL PROTECTED] [SNIP] --On Wednesday, March 3, 2004 4:24 PM -0800 Mathihalli, Madhusudan [EMAIL PROTECTED] wrote: I thought it'll be a little too much :) What if I don't compile with mod_ssl - I'll have a whole bunch of

Re: [PATCH] RewriteCond and SSL environment variables

2004-03-03 Thread Andr Malo
* Mathihalli, Madhusudan [EMAIL PROTECTED] wrote: Here's a slightly modified version of Joe's patch to - not segfault if rewrite_ssl_var_lookup is not available (mod_ssl not loaded)- use SSL environment variables as %{ENV:HTTPS} or %{ENV:SSL_PROTOCOL} I'd prefer the %{SSL:...} variant and

Re: RewriteCond and SSL environment variables

2004-03-02 Thread Joe Orton
On Mon, Mar 01, 2004 at 10:37:46AM -0800, Mathihalli, Madhusudan wrote: Hi, Question: Can we use the environment variables setup by mod_ssl in the RewriteCond directive ? Not like in 1.3; in 2.0 you can use %{LA-U:ENV:...} to fetch the SSL variables via a subrequest; a better

Re: RewriteCond and SSL environment variables

2004-03-02 Thread Andr Malo
* Joe Orton [EMAIL PROTECTED] wrote: On Mon, Mar 01, 2004 at 10:37:46AM -0800, Mathihalli, Madhusudan wrote: Hi, Question: Can we use the environment variables setup by mod_ssl in the RewriteCond directive ? Not like in 1.3; in 2.0 you can use %{LA-U:ENV:...} to fetch the SSL

RE: RewriteCond and SSL environment variables

2004-03-02 Thread Mathihalli, Madhusudan
-Original Message- From: André Malo [mailto:[EMAIL PROTECTED] [SNIP] * Joe Orton [EMAIL PROTECTED] wrote: On Mon, Mar 01, 2004 at 10:37:46AM -0800, Mathihalli, Madhusudan wrote: Hi, Question: Can we use the environment variables setup by mod_ssl in the RewriteCond

RewriteCond and SSL environment variables

2004-03-01 Thread Mathihalli, Madhusudan
Hi, Question: Can we use the environment variables setup by mod_ssl in the RewriteCond directive ? I believe there's some inconsistency there - the SSL environment variables are setup in the r-subprocess_env during the hook_fixup phase, where as the RewriteCond evaluates/expands the

RE: RewriteCond and SSL environment variables

2004-03-01 Thread Mathihalli, Madhusudan
Message- From: Mathihalli, Madhusudan Sent: Monday, March 01, 2004 10:38 AM To: [EMAIL PROTECTED] Subject: RewriteCond and SSL environment variables Hi, Question: Can we use the environment variables setup by mod_ssl in the RewriteCond directive ? I believe there's some inconsistency