Klaus Demo bjoern / 023830b
Fix #160 (follow-up fix for #158) Jonas Haag 3 months ago
1 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
347347 PyDict_SetItemString(wsgi_base_dict, "SERVER_NAME", server_info->host);
348348
349349 if (server_info->port == Py_None) {
350 PyDict_SetItemString(wsgi_base_dict, "SERVER_PORT", PyString_FromFormat(""));
350 PyDict_SetItemString(wsgi_base_dict, "SERVER_PORT", _PEP3333_String_FromFormat(""));
351351 } else {
352 PyDict_SetItemString(wsgi_base_dict, "SERVER_PORT", PyString_FromFormat("%i", server_info->port));
352 PyDict_SetItemString(wsgi_base_dict, "SERVER_PORT", _PEP3333_String_FromFormat("%i", server_info->port));
353353 }
354354 } else {
355355 /* SERVER_NAME is required, but not usefull with UNIX type sockets */
356 PyDict_SetItemString(wsgi_base_dict, "SERVER_NAME", PyString_FromFormat(""));
357 PyDict_SetItemString(wsgi_base_dict, "SERVER_PORT", PyString_FromFormat(""));
358 }
359 }
360 }
356 PyDict_SetItemString(wsgi_base_dict, "SERVER_NAME", _PEP3333_String_FromFormat(""));
357 PyDict_SetItemString(wsgi_base_dict, "SERVER_PORT", _PEP3333_String_FromFormat(""));
358 }
359 }
360 }