fixed uwsgi.sendfile()

This commit is contained in:
roberto@precise64
2012-05-12 10:47:04 +02:00
parent 99d9e8cd67
commit b2abccd302
10 changed files with 368 additions and 1601 deletions
+5
View File
@@ -794,6 +794,11 @@ PyObject *py_uwsgi_advanced_sendfile(PyObject * self, PyObject * args) {
wsgi_req->sendfile_fd_chunk = chunk;
wsgi_req->sendfile_fd_pos = pos;
// send the headers if not already sent
if (!wsgi_req->headers_sent && wsgi_req->headers_hvec > 0) {
uwsgi_python_do_send_headers(wsgi_req);
}
// do sendfile
if (uwsgi.async > 1) {
ssize_t sf_len = uwsgi_sendfile(wsgi_req);