Project

General

Profile

Feature #2415 ยป lighttpd-1.4.30-remoteuser.diff

zi, 2012-04-22 19:39

View differences:

./lighttpd-1.4.30/src/array.h 2012-04-22 13:25:16.000000000 -0400
96 96
	COMP_HTTP_QUERY_STRING,
97 97
	COMP_HTTP_SCHEME,
98 98
	COMP_HTTP_REQUEST_METHOD,
99
	COMP_HTTP_REMOTE_USER,
99 100

  
100 101
	COMP_LAST_ELEMENT
101 102
} comp_key_t;
./lighttpd-1.4.30/src/configfile-glue.c 2012-04-22 13:25:16.000000000 -0400
455 455
		}
456 456
		break;
457 457
	}
458
	case COMP_HTTP_REMOTE_USER: {
459
		if (NULL != con->authed_user) {
460
			l = con->authed_user;
461
		} else {
462
			l = srv->empty_string;
463
		}
464
		break;
465
	}
458 466
	default:
459 467
		return COND_RESULT_FALSE;
460 468
	}
./lighttpd-1.4.30/src/configparser.c 2012-04-22 13:25:16.000000000 -0400
1221 1221
      { COMP_HTTP_QUERY_STRING,  CONST_STR_LEN("HTTP[\"query-string\"]") },
1222 1222
      { COMP_HTTP_REQUEST_METHOD, CONST_STR_LEN("HTTP[\"request-method\"]") },
1223 1223
      { COMP_HTTP_SCHEME,        CONST_STR_LEN("HTTP[\"scheme\"]"     ) },
1224
      { COMP_HTTP_REMOTE_USER,   CONST_STR_LEN("HTTP[\"remoteuser\"]" ) },
1225
      { COMP_HTTP_REMOTE_USER,   CONST_STR_LEN("HTTP[\"remote-user\"]" ) },
1224 1226
      { COMP_UNSET, NULL, 0 },
1225 1227
    };
1226 1228
    size_t i;
./lighttpd-1.4.30/src/configparser.y 2012-04-22 13:25:16.000000000 -0400
435 435
      { COMP_HTTP_QUERY_STRING,  CONST_STR_LEN("HTTP[\"query-string\"]") },
436 436
      { COMP_HTTP_REQUEST_METHOD, CONST_STR_LEN("HTTP[\"request-method\"]") },
437 437
      { COMP_HTTP_SCHEME,        CONST_STR_LEN("HTTP[\"scheme\"]"     ) },
438
      { COMP_HTTP_REMOTE_USER,   CONST_STR_LEN("HTTP[\"remoteuser\"]" ) },
439
      { COMP_HTTP_REMOTE_USER,   CONST_STR_LEN("HTTP[\"remote-user\"]" ) },
438 440
      { COMP_UNSET, NULL, 0 },
439 441
    };
440 442
    size_t i;
./lighttpd-1.4.30/src/response.c 2012-04-22 13:25:30.000000000 -0400
280 280
		config_patch_connection(srv, con, COMP_HTTP_LANGUAGE);  /* Accept-Language:  */
281 281
		config_patch_connection(srv, con, COMP_HTTP_COOKIE);    /* Cookie:  */
282 282
		config_patch_connection(srv, con, COMP_HTTP_REQUEST_METHOD); /* REQUEST_METHOD */
283
		config_patch_connection(srv, con, COMP_HTTP_REMOTE_USER); /* REMOTE_USER */
283 284

  
284 285
		/** their might be a fragment which has to be cut away */
285 286
		if (NULL != (qstr = strchr(con->request.uri->ptr, '#'))) {
    (1-1/1)