Closed noonat closed 7 years ago
Thanks for reporting this. I suspect the fix is to make the conditional test for not None
.
That code came over from the initial import of everything when I did the port to python 3. I'm surprised the issue hasn't shown up before.
I'll cook up a fix soon, unless you want to do it?
This line has a check for whether the first return value of the application function's returned iterable is falsey: https://github.com/cdent/wsgi-intercept/blob/ac5f41a/wsgi_intercept/__init__.py#L490
I ran into this bug because the first item in my application's returned iterable was an empty bytestring, and this caused the body to be skipped entirely. This seems incorrect, as PEP-3333 includes specific references to empty byte strings being present in the returned iterable.