[uWSGI] uWSGI and uwsgi_sendfile

michal at balor.pl michal at balor.pl
Tue Jul 20 18:07:38 CEST 2010


>
> Il giorno 20/lug/2010, alle ore 17.51, michal at balor.pl ha scritto:
>
>> Hi,
>> While playing with uWSGI and bottle I discovered that when calling
>> function uwsgi_sendfile the second parameter (buffer size) is not
>> optional (that caused exception). According to PEP333 second argument
>> should be optional. Or maybe I'm missing something?
>>
>> Cheers!
>> Balor
>>
>
>
> This is a bug
> change in sendfile.c:
>
> if (!PyArg_ParseTuple(args, "Oi:uwsgi_sendfile",
> &wsgi_req->async_sendfile, &wsgi_req->sendfile_fd_chunk)) {
>
> to
>
> if (!PyArg_ParseTuple(args, "O|i:uwsgi_sendfile",
> &wsgi_req->async_sendfile, &wsgi_req->sendfile_fd_chunk)) {
>
> just fixed it in the mercurial repository
>
> --
> Roberto De Ioris
> http://unbit.it
> JID: roberto at jabber.unbit.it
>
> _______________________________________________
> uWSGI mailing list
> uWSGI at lists.unbit.it
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>

Thank you. I'll wait for official release including bugfix, till then my
dirty path in bottle will do.

Cheers!



More information about the uWSGI mailing list