completed port of the python plugin to the new writing api

This commit is contained in:
Roberto De Ioris
2013-01-20 14:17:54 +01:00
parent 4b3b3f9200
commit 874e8b5621
5 changed files with 33 additions and 7 deletions
+6 -1
View File
@@ -887,7 +887,6 @@ PyObject *py_uwsgi_advanced_sendfile(PyObject * self, PyObject * args) {
UWSGI_RELEASE_GIL
uwsgi_response_sendfile_do(wsgi_req, wsgi_req->sendfile_fd, wsgi_req->sendfile_fd_pos, wsgi_req->sendfile_fd_size);
UWSGI_GET_GIL
// revert to old values
wsgi_req->sendfile_fd = tmp_fd;
wsgi_req->sendfile_fd_size = tmp_filesize;
@@ -896,6 +895,12 @@ PyObject *py_uwsgi_advanced_sendfile(PyObject * self, PyObject * args) {
close(fd);
uwsgi_py_check_write_errors {
uwsgi_py_write_exception(wsgi_req);
return NULL;
}
Py_INCREF(Py_True);
return Py_True;