[Web-SIG] WSGI and sendfile()
Andrew Eland
andrew at andreweland.org
Tue Aug 24 12:57:32 CEST 2004
Phillip J. Eby wrote:
> At 10:37 AM 8/23/04 +0100, Andrew Eland wrote:
>
> we could amend the spec to indicate that if the returned iterable has a
> 'fileno()' attribute, the server *may* use OS facilities to read data
directly
> from the descriptor, but must still call the iterable's close()
method, rather
> than closing the file descriptor.
That sounds fine to me.
> Perhaps it should be mentioned that the server *is* allowed to buffer
> the input stream to e.g. a temporary file, *before* invoking the
> application.
Another solution would be to feed the request body to the application as
it arrives, via some callback function. It's probably not worth the
extra complexity, as the number of applications that stream a response
based on incremental processing of the request body will be pretty small.
-- Andrew (http://www.andreweland.org)
More information about the Web-SIG
mailing list