diff options
Diffstat (limited to 'server_fcgi.c')
-rw-r--r-- | server_fcgi.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/server_fcgi.c b/server_fcgi.c index d4135aa..7305eb0 100644 --- a/server_fcgi.c +++ b/server_fcgi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_fcgi.c,v 1.46 2015/01/16 06:40:17 deraadt Exp $ */ +/* $OpenBSD: server_fcgi.c,v 1.47 2015/01/18 14:01:17 florian Exp $ */ /* * Copyright (c) 2014 Florian Obser <florian@openbsd.org> @@ -259,6 +259,14 @@ server_fcgi(struct httpd *env, struct client *clt) goto fail; } + if (srv_conf->flags & SRVFLAG_AUTH_BASIC) { + if (fcgi_add_param(¶m, "REMOTE_USER", + clt->clt_fcgi_remote_user, clt) == -1) { + errstr = "failed to encode param"; + goto fail; + } + } + /* Add HTTP_* headers */ if (server_headers(clt, desc, server_fcgi_writeheader, ¶m) == -1) { errstr = "failed to encode param"; |