diff options
Diffstat (limited to 'source3/web/cgi.c')
-rw-r--r-- | source3/web/cgi.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/web/cgi.c b/source3/web/cgi.c index 46654b1303..9931ca1468 100644 --- a/source3/web/cgi.c +++ b/source3/web/cgi.c @@ -665,3 +665,24 @@ char *cgi_pathinfo(void) return r; } +/*************************************************************************** +return the hostname of the client + ***************************************************************************/ +char *cgi_remote_host(void) +{ + if (baseurl) { + return client_name(1); + } + return getenv("REMOTE_HOST"); +} + +/*************************************************************************** +return the hostname of the client + ***************************************************************************/ +char *cgi_remote_addr(void) +{ + if (baseurl) { + return client_addr(1); + } + return getenv("REMOTE_ADDR"); +} |