[Twisted-web] Re: [Web-SIG] WSGI woes
py-web-sig at xhaus.com
Fri Sep 17 00:12:28 CEST 2004
> Though I suppose having the top
> component pulling input from an iterator chain mirrors nicely the
> situation where the server pulls output from an iterator chain.
Which also means that the top component must be prepared to receive ""
from the component below it in the input chain.
Say for example that the headers for a new chunk body arrive on the
client socket, but not a chunk-encoded body, yet.
The top iterator, e.g. the uploaded-file processor, pulls data from the
component below it, which is say the dechunker. The dechunker will read
the headers and get the relevant metadata for the chunk. But since there
is no actual data available now, it must yield "" to the next component up.
I was wondering if we might need to mirror the pause/resume facility on
the input stream. But it's not a required, because the application is
getting a callback directly from the server when there is data
available. It's just that the data on socket that gave rise to the
notification may not translate to actual data for the called application.
More information about the Web-SIG