Skip to content

sendfile example does not use sendfile #2279

@hmoffatt

Description

@hmoffatt

The sendfile example application does not actually result in a call to sendfile. I verified this by adding code to http/wsgi.py and also looking at the output of strace.

It works if I remove the @validator decorator on the app method in sendfile.py.

I guess this is because the worker is checking for an instance of the write type, but the type is not the same with the validator wrapper. workers/sync.py handle_request() says

if isinstance(respiter, environ['wsgi.file_wrapper']):

Metadata

Metadata

Assignees

Labels

To Schedulegood first issueOpen for everyone. A good first issue to become familiar with codebase.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions