According to convention and httpd.conf(5), the $DOCUMENT_URI macro for
FastCGI calls should expand to the request path instead of the path
alias. This isn't a major issue because only "block return code uri"
options make use of path aliases at the moment, and those use a separate
macro-expansion function, server_expand_http(), which correctly expands
$DOCUMENT_URI.
Index: server_fcgi.c
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/server_fcgi.c,v
retrieving revision 1.67
diff -u -p -r1.67 server_fcgi.c
--- server_fcgi.c 23 Nov 2015 20:56:15 -0000 1.67
+++ server_fcgi.c 14 Apr 2016 03:41:30 -0000
@@ -254,7 +254,7 @@ server_fcgi(struct httpd *env, struct cl
errstr = "failed to encode param";
goto fail;
}
- if (fcgi_add_param(¶m, "DOCUMENT_URI", alias,
+ if (fcgi_add_param(¶m, "DOCUMENT_URI", desc->http_path,
clt) == -1) {
errstr = "failed to encode param";
goto fail;