head	1.2;
access;
symbols;
locks; strict;
comment	@# @;


1.2
date	2013.02.01.15.41.59;	author svnexp;	state Exp;
branches;
next	1.1;

1.1
date	2012.06.16.22.28.41;	author mm;	state Exp;
branches;
next	;


desc
@@


1.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/311381
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@diff -urN src/array.h src/array.h
--- src/array.h	2010-02-01 18:28:20.000000000 -0500
+++ src/array.h	2012-04-22 13:25:16.000000000 -0400
@@@@ -96,6 +96,7 @@@@
 	COMP_HTTP_QUERY_STRING,
 	COMP_HTTP_SCHEME,
 	COMP_HTTP_REQUEST_METHOD,
+	COMP_HTTP_REMOTE_USER,
 
 	COMP_LAST_ELEMENT
 } comp_key_t;
diff -urN src/configfile-glue.c src/configfile-glue.c
--- src/configfile-glue.c	2010-08-17 05:04:38.000000000 -0400
+++ src/configfile-glue.c	2012-04-22 13:25:16.000000000 -0400
@@@@ -455,6 +455,14 @@@@
 		}
 		break;
 	}
+	case COMP_HTTP_REMOTE_USER: {
+		if (NULL != con->authed_user) {
+			l = con->authed_user;
+		} else {
+			l = srv->empty_string;
+		}
+		break;
+	}
 	default:
 		return COND_RESULT_FALSE;
 	}
diff -urN src/configparser.c src/configparser.c
--- src/configparser.c	2011-12-18 09:54:21.000000000 -0500
+++ src/configparser.c	2012-04-22 13:25:16.000000000 -0400
@@@@ -1221,6 +1221,8 @@@@
       { COMP_HTTP_QUERY_STRING,  CONST_STR_LEN("HTTP[\"query-string\"]") },
       { COMP_HTTP_REQUEST_METHOD, CONST_STR_LEN("HTTP[\"request-method\"]") },
       { COMP_HTTP_SCHEME,        CONST_STR_LEN("HTTP[\"scheme\"]"     ) },
+      { COMP_HTTP_REMOTE_USER,   CONST_STR_LEN("HTTP[\"remoteuser\"]" ) },
+      { COMP_HTTP_REMOTE_USER,   CONST_STR_LEN("HTTP[\"remote-user\"]" ) },
       { COMP_UNSET, NULL, 0 },
     };
     size_t i;
diff -urN src/configparser.y src/configparser.y
--- src/configparser.y	2010-02-01 18:28:20.000000000 -0500
+++ src/configparser.y	2012-04-22 13:25:16.000000000 -0400
@@@@ -435,6 +435,8 @@@@
       { COMP_HTTP_QUERY_STRING,  CONST_STR_LEN("HTTP[\"query-string\"]") },
       { COMP_HTTP_REQUEST_METHOD, CONST_STR_LEN("HTTP[\"request-method\"]") },
       { COMP_HTTP_SCHEME,        CONST_STR_LEN("HTTP[\"scheme\"]"     ) },
+      { COMP_HTTP_REMOTE_USER,   CONST_STR_LEN("HTTP[\"remoteuser\"]" ) },
+      { COMP_HTTP_REMOTE_USER,   CONST_STR_LEN("HTTP[\"remote-user\"]" ) },
       { COMP_UNSET, NULL, 0 },
     };
     size_t i;
diff -urN src/response.c src/response.c
--- src/response.c	2010-08-17 05:04:38.000000000 -0400
+++ src/response.c	2012-04-22 13:25:30.000000000 -0400
@@@@ -280,6 +280,7 @@@@
 		config_patch_connection(srv, con, COMP_HTTP_LANGUAGE);  /* Accept-Language:  */
 		config_patch_connection(srv, con, COMP_HTTP_COOKIE);    /* Cookie:  */
 		config_patch_connection(srv, con, COMP_HTTP_REQUEST_METHOD); /* REQUEST_METHOD */
+		config_patch_connection(srv, con, COMP_HTTP_REMOTE_USER); /* REMOTE_USER */
 
 		/** their might be a fragment which has to be cut away */
 		if (NULL != (qstr = strchr(con->request.uri->ptr, '#'))) {
@


1.1
log
@Add 3rd party remoteuser patch (optional)
http://redmine.lighttpd.net/issues/2415

PR:		ports/167209
Submitted by:	Ryan Steinmetz <rpsfa@@rit.edu>
@
text
@d64 1
a64 1
 		if (NULL != (qstr = strchr(con->request.uri->ptr, '#'))) {@

