IStreamIterator can't use chunking
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Opinion
|
Wishlist
|
Unassigned |
Bug Description
In order to get ZServer to use http 1.1 chunking, these conditions must be met:
1. A Content-Length header must not be set.
2. The request must be HTTP 1.1
3. You must be streaming (i.e. RESPONSE._streaming must be true)
4. No 'Connection: close' header has been set during the request
It would be nice to be able to create an implementation of IStreamIterator() that used chunking, if e.g. you can't know ahead of time the size of data that you will return. But ZServerHTTPResp
I *think* this could be fixed with some simple changes to setBody(); just check conditions 1,2, and 4 above, and if they are met, set self._streaming true and use the iterator; otherwise fall back to the current behavior.
But I don't have an urgent need for this, and we can just use response.write() instead, so I'm not planning to work on it anytime soon; but I thought I'd better put this in the collector before I forget about it entirely.
Changed in zope2: | |
importance: | Low → Wishlist |
status: | New → Opinion |