Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16 - wsgi_intercept can't handle functions that stream chunked encoding data infinitely #16

Open
mmulich opened this issue Dec 22, 2011 · 0 comments
Labels

Comments

@mmulich
Copy link
Owner

mmulich commented Dec 22, 2011

What steps will reproduce the problem?
1. Write a WSGI application that returns an iterator that streams infinitely.
2. Try to test the WSGI application.

What is the expected output?
It'd be great if it could give you an iterator.

What do you see instead?
It tries to buffer everything.

What version of the product are you using?
0.4

On what operating system?
Linux jjinux 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 2 02:41:37 UTC 2010 x86_64 GNU/Linux

Please provide any additional information below.
A WSGI application can return an iterator.  It knows how to output things using a chunked encoding.  That's useful to stream a possibly infinite amount of data.  My application is like that.  Unfortunately, this is not currently supported by wsgi_intercept.

I ended up using WebOb to test my application:

```
    request = webob.Request.blank('/')
    response = request.get_response(server.Handler.handle)
    assert response.app_iter.next() == "\n"
    assert response.app_iter.next() == '{"test": "data"}\n'
```


Original link: http://code.google.com/p/wsgi-intercept/issues/detail?id=16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant