benoitc/restkit — pull request #123 by alanjds (2013-04-26 01:57:43+00:00)
Title: contrib.webob_api and contrib.wsgi_proxy fixes

I found two issues with wsgi_proxy code/docs:

1) webob_api.Request.get_response() does not have an 'application' parameter as Webob one have (http://docs.webob.org/en/latest/modules/webob.html), so http://benoitc.github.io/restkit/wsgi_proxy.html 1st example does not work. This pull request adds support for webob_api.Request.get_response(application=proxy), as original webob.Request hangs on 2nd chunk of the request

In fact, this page of the docs needs some more updates as TConnectionManager does not exist anymore, and wsgi_proxy now lives on contrib module, but its matter for another doc patch. At least, the example can now work with restkit/examples/couchdbproxy.py

2) wsgi_proxy.Proxy hangs until all the request body got downloaded, if you wrap it into some other WSGI, as ones provided by Werkzeug for example. This pull request patches Proxy.__call__ from request.tee() to response.body_stream() .

This solves the Proxy class issue, but smells like a bug in TeeInput for me.

Sorry as I cannot investigate more now.
Thanks, Alan.