summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-11-22 00:46:56 +0000
committerMatthieu Patou <mat@matws.net>2012-11-22 14:57:33 -0800
commit3bffb585ba36753cf1ebd5c00e7a47f1974b0d85 (patch)
treea9274a7a8a16fcd1ce661305192a57230a4c37e9 /source4
parent31f0e24fbe5f3da7e1a3e4b0ae234c0803123501 (diff)
downloadsamba-3bffb585ba36753cf1ebd5c00e7a47f1974b0d85.tar.gz
samba-3bffb585ba36753cf1ebd5c00e7a47f1974b0d85.tar.bz2
samba-3bffb585ba36753cf1ebd5c00e7a47f1974b0d85.zip
web_server: Create a string object for SERVER_PORT variable.
This matches the behaviour of other wsgi server implementations. Reviewed-by: Matthieu Patou <mat@matws.net>
Diffstat (limited to 'source4')
-rw-r--r--source4/web_server/wsgi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c
index 3f8141c5e2..4d2b36358b 100644
--- a/source4/web_server/wsgi.c
+++ b/source4/web_server/wsgi.c
@@ -301,7 +301,7 @@ static PyObject *create_environ(bool tls, int content_length, struct http_header
}
PyDict_SetItemString(env, "SERVER_NAME", PyString_FromString(servername));
- PyDict_SetItemString(env, "SERVER_PORT", PyInt_FromLong(serverport));
+ PyDict_SetItemString(env, "SERVER_PORT", PyString_FromFormat("%d", serverport));
for (hdr = headers; hdr; hdr = hdr->next) {
char *name;
if (!strcasecmp(hdr->name, "Content-Type")) {