httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Morris <supp...@bettercgi.com>
Subject Re: Making mod_auth_digest mysql
Date Fri, 06 Feb 2009 20:04:57 GMT
> I'm thinking about adding a -e flag for environment 
> variable does not exist to httpd on my server.  
> It would return true if the variable exists 
> or false, otherwise. Is there a way to already 
> do this?


  For your purpose, you can use:
RewriteCond %{REMOTE_USER} !.
or as appropriate:
RewriteCond %{REMOTE_USER} .

That will check for any non-empty value 
by matching at least any single character.


> It looks like: RewriteCond ${REMOTE_USER} !="" always 
> evaluates to true if REMOTE_USER does not exist.  
> Am I wrong?


  That's correct, if it doesn't exist, it's not
the empty string.  What's in that bucket on your 
desk?  "There is no bucket" is a different answer 
than "the bucket is empty".  Since you apparently 
understand SQL, let me explain that by saying it's 
the same thing as the difference between trying 
to get the value of a column which doesn't exist, 
which is an outright error, versus a column with 
the value 0, versus a text column with empty 
text (""), versus an unknown value, represented 
by NULL.  Not existing isn't the same thing as
existing and being empty.
--
Ray B. Morris
support@bettercgi.com

Strongbox - The next generation in site security:
http://www.bettercgi.com/strongbox/

Throttlebox - Intelligent Bandwidth Control
http://www.bettercgi.com/throttlebox/

Strongbox / Throttlebox affiliate program:
http://www.bettercgi.com/affiliates/user/register.php


On 02/05/2009 10:43:57 PM, Michele Waldman wrote:
> RewriteCond has flags -f -d ...
> But not -e for exists.
> It looks like:
> RewriteCond ${REMOTE_USER} !="" always evaluates to true if
> REMOTE_USER does
> not exist.  Am I wrong?
> I'm thinking about adding a -e flag for environment variable does not
> exist
> to httpd on my server.  It would return true if the variable exists 
> or
> false, otherwise.
> Is there a way to already do this?
> Thoughts?
> 
> Michele
> 
> 
> 



Mime
View raw message