summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-05-27 12:28:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:06 -0500
commit67a38fc159a137134b9be0703d25ab32abddd564 (patch)
treef083c8ae98a06f98d3255eb8d384d90584aa3b8f /source4
parentf466b722224d15a9674e04eca1175975d73e7d7a (diff)
downloadsamba-67a38fc159a137134b9be0703d25ab32abddd564.tar.gz
samba-67a38fc159a137134b9be0703d25ab32abddd564.tar.bz2
samba-67a38fc159a137134b9be0703d25ab32abddd564.zip
r7017: added a esp variable server['TLS_SUPPORT'] which tells the script if the server
can support TLS. This will allow us to auto-redirect if a user connects using the wrong protocol (This used to be commit fbf4552cd5e27863ee1de7d03e4da0fc10f429df)
Diffstat (limited to 'source4')
-rw-r--r--source4/web_server/http.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/web_server/http.c b/source4/web_server/http.c
index 36704a1370..a072970597 100644
--- a/source4/web_server/http.c
+++ b/source4/web_server/http.c
@@ -409,6 +409,7 @@ invalid:
static void http_setup_arrays(struct esp_state *esp)
{
struct websrv_context *web = esp->web;
+ struct esp_data *edata = talloc_get_type(web->task->private, struct esp_data);
struct EspRequest *req = esp->req;
char *p;
@@ -424,6 +425,7 @@ static void http_setup_arrays(struct esp_state *esp)
SETVAR(ESP_REQUEST_OBJ, "REQUEST_URI", web->input.url);
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_name(web->conn->socket, esp);
SETVAR(ESP_REQUEST_OBJ, "REMOTE_HOST", p);
SETVAR(ESP_REQUEST_OBJ, "REMOTE_ADDR", p);
@@ -450,7 +452,7 @@ static void http_setup_arrays(struct esp_state *esp)
SETVAR(ESP_SERVER_OBJ, "SERVER_PROTOCOL", web->tls_session?"https":"http");
SETVAR(ESP_SERVER_OBJ, "SERVER_SOFTWARE", "SWAT");
SETVAR(ESP_SERVER_OBJ, "GATEWAY_INTERFACE", "CGI/1.1");
- SETVAR(ESP_REQUEST_OBJ, "SCRIPT_FILENAME", web->input.url);
+ SETVAR(ESP_SERVER_OBJ, "TLS_SUPPORT", edata->tls_data?"True":"False");
}
#if HAVE_SETJMP_H