diff options
author | Patrick Murphy <Patrick.Murphy@multitech.com> | 2020-04-30 13:04:00 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2020-06-18 20:22:08 -0500 |
commit | 5724d72ffb2d6f4e44b65a92d5b69bcdf8551118 (patch) | |
tree | ff5b1f6243f931eccda3f378887681c086c0021e /recipes-core/lighttpd/files/0004_fastcgi_env_with_unixsocket.patch | |
parent | a3020c1257ad6bd653b5c619f1552b5e22fe7e0c (diff) | |
download | meta-mlinux-5724d72ffb2d6f4e44b65a92d5b69bcdf8551118.tar.gz meta-mlinux-5724d72ffb2d6f4e44b65a92d5b69bcdf8551118.tar.bz2 meta-mlinux-5724d72ffb2d6f4e44b65a92d5b69bcdf8551118.zip |
moved 5.2.1 changes to master
Diffstat (limited to 'recipes-core/lighttpd/files/0004_fastcgi_env_with_unixsocket.patch')
-rw-r--r-- | recipes-core/lighttpd/files/0004_fastcgi_env_with_unixsocket.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/recipes-core/lighttpd/files/0004_fastcgi_env_with_unixsocket.patch b/recipes-core/lighttpd/files/0004_fastcgi_env_with_unixsocket.patch new file mode 100644 index 0000000..c265066 --- /dev/null +++ b/recipes-core/lighttpd/files/0004_fastcgi_env_with_unixsocket.patch @@ -0,0 +1,57 @@ +From bdfb7f9c6ab29d2de3576f8bd845fa871bb44ead Mon Sep 17 00:00:00 2001 +From: Serhii Voloshynov <serhii.voloshynov@globallogic.com> +Date: Tue, 6 Nov 2018 13:50:04 +0200 +Subject: [PATCH] patch + +--- + src/http-header-glue.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/http-header-glue.c b/src/http-header-glue.c +index 1916ca6..d4f42ad 100644 +--- a/src/http-header-glue.c ++++ b/src/http-header-glue.c +@@ -1457,6 +1457,8 @@ int http_cgi_headers (server *srv, connection *con, http_cgi_opts *opts, http_cg + rc |= cb(vdata, CONST_STR_LEN("HTTPS"), CONST_STR_LEN("on")); + } + ++ if (srv_sock->addr.plain.sa_family != AF_UNIX) { ++ + addr = &srv_sock->addr; + li_utostrn(buf, sizeof(buf), sock_addr_get_port(addr)); + rc |= cb(vdata, CONST_STR_LEN("SERVER_PORT"), buf, strlen(buf)); +@@ -1482,6 +1484,7 @@ int http_cgi_headers (server *srv, connection *con, http_cgi_opts *opts, http_cg + } + force_assert(s); + rc |= cb(vdata, CONST_STR_LEN("SERVER_ADDR"), s, strlen(s)); ++ } + + if (!buffer_string_is_empty(con->server_name)) { + size_t len = buffer_string_length(con->server_name); +@@ -1497,15 +1500,23 @@ int http_cgi_headers (server *srv, connection *con, http_cgi_opts *opts, http_cg + rc |= cb(vdata, CONST_STR_LEN("SERVER_NAME"), + con->server_name->ptr, len); + } else { ++ if (srv_sock->addr.plain.sa_family != AF_UNIX) { + /* set to be same as SERVER_ADDR (above) */ + rc |= cb(vdata, CONST_STR_LEN("SERVER_NAME"), s, strlen(s)); + } ++ } ++ if (srv_sock->addr.plain.sa_family == AF_UNIX) { ++ rc |= cb(vdata, CONST_STR_LEN("SERVER_IPC"), CONST_STR_LEN("yes")); ++ } ++ ++ if (srv_sock->addr.plain.sa_family != AF_UNIX) { + + rc |= cb(vdata, CONST_STR_LEN("REMOTE_ADDR"), + CONST_BUF_LEN(con->dst_addr_buf)); + + li_utostrn(buf, sizeof(buf), sock_addr_get_port(&con->dst_addr)); + rc |= cb(vdata, CONST_STR_LEN("REMOTE_PORT"), buf, strlen(buf)); ++ } + + for (n = 0; n < con->request.headers->used; n++) { + data_string *ds = (data_string *)con->request.headers->data[n]; +-- +2.7.4 + |