summaryrefslogtreecommitdiff
path: root/source4/web_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-06-01 23:02:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:22 -0500
commitb035f3416839bb75c059035d2a2f9bfe9b810b6f (patch)
tree709ef42821b1b49b1ca12e22e1275d01ab3f4958 /source4/web_server
parent2db5c6b1f8f65e1a74ffc73383bddda98a84dfb3 (diff)
downloadsamba-b035f3416839bb75c059035d2a2f9bfe9b810b6f.tar.gz
samba-b035f3416839bb75c059035d2a2f9bfe9b810b6f.tar.bz2
samba-b035f3416839bb75c059035d2a2f9bfe9b810b6f.zip
r7177: fill in REMOTE_ADDR correctly
metze (This used to be commit aab9b953da8e9416e0756f760a717cf9013b772b)
Diffstat (limited to 'source4/web_server')
-rw-r--r--source4/web_server/http.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/web_server/http.c b/source4/web_server/http.c
index 35da56a75c..5e47e9b50e 100644
--- a/source4/web_server/http.c
+++ b/source4/web_server/http.c
@@ -426,9 +426,10 @@ static void http_setup_arrays(struct esp_state *esp)
p = strrchr(web->input.url, '/');
SETVAR(ESP_REQUEST_OBJ, "SCRIPT_NAME", p+1);
SETVAR(ESP_REQUEST_OBJ, "SCRIPT_FILENAME", web->input.url);
+ p = socket_get_peer_addr(web->conn->socket, esp);
+ SETVAR(ESP_REQUEST_OBJ, "REMOTE_ADDR", p);
p = socket_get_peer_name(web->conn->socket, esp);
SETVAR(ESP_REQUEST_OBJ, "REMOTE_HOST", p);
- SETVAR(ESP_REQUEST_OBJ, "REMOTE_ADDR", p);
SETVAR(ESP_REQUEST_OBJ, "REMOTE_USER", "");
SETVAR(ESP_REQUEST_OBJ, "CONTENT_TYPE", web->input.content_type);
if (web->session) {