Klaus Demo bjoern / 78175f2
Fix #111 yanxurui 2 years ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
215215 static void
216216 wsgi_getheaders(Request* request, PyObject** buf, Py_ssize_t *length)
217217 {
218 Py_ssize_t length_upperbound = strlen("HTTP/1.1 ") + _Bytes_GET_SIZE(request->status) + strlen("\r\nTransfer-Encoding: chunked") + strlen("\r\n\rn");
218 Py_ssize_t length_upperbound = strlen("HTTP/1.1 ") + _Bytes_GET_SIZE(request->status) + strlen("\r\nConnection: Keep-Alive") + strlen("\r\nTransfer-Encoding: chunked") + strlen("\r\n\r\n");
219219 for(Py_ssize_t i=0; i<PyList_GET_SIZE(request->headers); ++i) {
220220 PyObject* tuple = PyList_GET_ITEM(request->headers, i);
221221 PyObject* field = PyTuple_GET_ITEM(tuple, 0);
356356 return NULL;
357357 }
358358
359 Py_INCREF(request->status);
359360 Py_INCREF(request->headers);
360361
361362 request->state.start_response_called = true;