From 3bffb585ba36753cf1ebd5c00e7a47f1974b0d85 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 22 Nov 2012 00:46:56 +0000 Subject: web_server: Create a string object for SERVER_PORT variable. This matches the behaviour of other wsgi server implementations. Reviewed-by: Matthieu Patou --- source4/web_server/wsgi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4') 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")) { -- cgit