1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s4:web_server/wsgi.c - fix "asprintf" call

This commit is contained in:
Matthias Dieter Wallnöfer 2010-05-27 17:45:19 +02:00
parent fe2a607640
commit ce99f9e734

View File

@ -300,7 +300,9 @@ static PyObject *create_environ(bool tls, int content_length, struct http_header
if (!strcasecmp(hdr->name, "Content-Type")) {
PyDict_SetItemString(env, "CONTENT_TYPE", PyString_FromString(hdr->value));
} else {
asprintf(&name, "HTTP_%s", hdr->name);
if (asprintf(&name, "HTTP_%s", hdr->name) < 0) {
continue;
}
PyDict_SetItemString(env, name, PyString_FromString(hdr->value));
free(name);
}