Changeset 2012

Show
Ignore:
Timestamp:
11/04/2007 04:53:17 PM (10 months ago)
Author:
glen
Message:

- support for matching $HTTPscheme? in configs, patch from:

http://trac.lighttpd.net/trac/wiki/HowToRedirectHttpToHttps
apparently by swiergot/at/gmail.com, adjusted for current svn.

Location:
branches/lighttpd-1.4.x
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • branches/lighttpd-1.4.x/doc/configuration.txt

    r1371 r2012  
    8686$HTTP["cookie"] 
    8787  match on cookie 
     88$HTTP["scheme"] 
     89  match on scheme 
    8890$HTTP["host"] 
    8991  match on host 
  • branches/lighttpd-1.4.x/src/array.h

    r1942 r2012  
    9191        COMP_HTTP_REMOTEIP, 
    9292        COMP_HTTP_QUERYSTRING, 
     93        COMP_HTTP_SCHEME, 
    9394 
    9495        COMP_LAST_ELEMENT 
  • branches/lighttpd-1.4.x/src/configfile-glue.c

    r1942 r2012  
    342342                break; 
    343343        } 
     344        case COMP_HTTP_SCHEME: 
     345                l = con->uri.scheme; 
     346                break; 
     347 
    344348        case COMP_HTTP_URL: 
    345349                l = con->uri.path; 
  • branches/lighttpd-1.4.x/src/configparser.y

    r1987 r2012  
    423423      { COMP_HTTP_REMOTEIP,      CONST_STR_LEN("HTTP[\"remoteip\"]"   ) }, 
    424424      { COMP_HTTP_QUERYSTRING,   CONST_STR_LEN("HTTP[\"querystring\"]") }, 
     425      { COMP_HTTP_SCHEME,        CONST_STR_LEN("HTTP[\"scheme\"]"     ) }, 
    425426      { COMP_UNSET, NULL, 0 }, 
    426427    }; 
  • branches/lighttpd-1.4.x/src/response.c

    r1767 r2012  
    181181                buffer_to_lower(con->uri.authority); 
    182182 
     183                config_patch_connection(srv, con, COMP_HTTP_SCHEME);    /* Scheme:      */ 
    183184                config_patch_connection(srv, con, COMP_HTTP_HOST);      /* Host:        */ 
    184185                config_patch_connection(srv, con, COMP_HTTP_REMOTEIP);  /* Client-IP */