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

CookieLimiter#call! does not end on response.finish leading to issues with downstream middleware #3

Open
kenmclennan opened this issue Oct 14, 2013 · 1 comment

Comments

@kenmclennan
Copy link

I hit a problem when using this piece of middleware along with galetahub-simple_captcha. The captcha gem uses a rack middle ware hook to respond to requests for captcha images written on the fly. With rack-policy in place the headers of these requests were being mangled so that the content length was zero giving a browser error.

I think that the issue lies in that by bypassing response.finish call the body does not get wrapped in a BodyProxy instance and cannot then be safely modified by rack middleware downstream of rack-policy in the middleware chain.

Hope that makes some sort of sense!

Ken

@piotrmurach
Copy link
Owner

Hi Ken, thanks for reporting this! Would you mind writing a test for it? For instance, in your test case, you could mock two middlewares that would expose the problem! Also if you could provide me with sample code that you are using to replicate the bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants