httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: httpd-2.0/docs/manual/mod mod_setenvif.html
Date Tue, 12 Jun 2001 17:06:07 GMT
stoddard    01/06/12 10:06:07

  Modified:    .        CHANGES
               modules/metadata mod_setenvif.c
               docs/manual/mod mod_setenvif.html
  Log:
  Extend mod_setenvif to support specifying regular expressions
  on the SetEnvIf (and SetEnvIfNoCase) directive attribute field.
  Example:  SetEnvIf ^TS*  [a-z].* HAVE_TS
  will cause HAVE_TS to be set if any of the request headers begins
  with "TS" and has a value that begins with any character in the
  set [a-z]. [Bill Stoddard]
  
  Revision  Changes    Path
  1.224     +7 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.223
  retrieving revision 1.224
  diff -u -r1.223 -r1.224
  --- CHANGES	2001/06/11 21:41:23	1.223
  +++ CHANGES	2001/06/12 17:05:55	1.224
  @@ -1,4 +1,11 @@
   Changes with Apache 2.0.19-dev
  +  *) Extend mod_setenvif to support specifying regular expressions
  +     on the SetEnvIf (and SetEnvIfNoCase) directive attribute field.
  +     Example:  SetEnvIf ^TS*  [a-z].* HAVE_TS 
  +     will cause HAVE_TS to be set if any of the request headers begins 
  +     with "TS" and has a value that begins with any character in the
  +     set [a-z]. [Bill Stoddard]
  +
     *) httpd children now re-bind themselves to a random CPU on
        multiprocessor systems on AIX via bindprocessor() in 2.0.
        [Victor J. Orlikowski]
  
  
  
  1.30      +9 -3      httpd-2.0/modules/metadata/mod_setenvif.c
  
  Index: mod_setenvif.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_setenvif.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- mod_setenvif.c	2001/06/09 15:57:06	1.29
  +++ mod_setenvif.c	2001/06/12 17:06:01	1.30
  @@ -75,9 +75,10 @@
    *   SetEnvIf name regex var ...
    *
    * where name is either a HTTP request header name, or one of the
  - * special values (see below). The 'value' of the header (or the
  - * value of the special value from below) are compared against the
  - * regex argument. If this is a simple string, a simple sub-string
  + * special values (see below). 'name' may be a regex when it is used
  + * to specify an HTTP request header name. The 'value' of the header 
  + & (or the value of the special value from below) are compared against
  + * the regex argument. If this is a simple string, a simple sub-string
    * match is performed. Otherwise, a request expression match is
    * done. If the value matches the string or regular expression, the
    * environment variables listed as var ... are set. Each var can 
  @@ -113,6 +114,11 @@
    * This could be written as:
    *
    *    SetEnvIf remote_addr (127.0.0.1|192.168.10.) LOCAL
  + *
  + * To set HAVE_TS if the client request contains any header beginning
  + * with "TS" with a value beginning with a lower case alphabet:
  + *
  + *    SetEnvIf ^TS* ^[a-z].* HAVE_TS
    */
   
   #include "apr.h"
  
  
  
  1.14      +13 -1     httpd-2.0/docs/manual/mod/mod_setenvif.html
  
  Index: mod_setenvif.html
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/mod/mod_setenvif.html,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mod_setenvif.html	2001/04/23 12:43:16	1.13
  +++ mod_setenvif.html	2001/06/12 17:06:04	1.14
  @@ -338,6 +338,12 @@
      scope.</STRONG>
     </BLOCKQUOTE>
     <P>
  +  <EM>attribute</EM> may be a regular expression when used to match a request
header.
  +  If <EM>attribute</EM> is a regular expression and it doesn't match any of
the
  +  request's header names, then <EM>attribute</EM> is not tested against the
request's
  +  environment variable list.
  +  </P>
  +  <P>
     Example:
     </P>
     <PRE>
  @@ -348,14 +354,20 @@
      SetEnvIf Referer www\.mydomain\.com intra_site_referral
           :
      SetEnvIf object_is_image xbm XBIT_PROCESSING=1
  +        :
  +   SetEnvIf ^TS*  ^[a-z].*  HAVE_TS
     </PRE>
     <P>
     The first three will set the environment variable <SAMP>object_is_image</SAMP>
if the
     request was for an image file, and the fourth sets
     <SAMP>intra_site_referral</SAMP> if the referring page was somewhere
     on the <SAMP>www.mydomain.com</SAMP> Web site.
  +  </P>
  +  <P>
  +  The last example will set environment variable <SAMP>HAVE_TS</SAMP> if the
request
  +  contains any headers that begin with "TS" whose values begins with any character
  +  in the set [a-z].
     </P>
  -
     <HR> <!-- the HR is part of the directive description -->
     <H2>
      <A NAME="SetEnvIfNoCase">SetEnvIfNoCase directive
  
  
  

Mime
View raw message