Fix accidental reuse of Parser object in Rack Middleware. #23

merged 1 commit into from Sep 6, 2013


None yet

5 participants


The current Rack middleware implementation does not always assign a new parser instance to the environment.

If the Rack server reuses the same "env" instance between requests (e.g., Unicorn) this can cause parsers created for previous requests to incorrectly be re-used for the current request.



Thank you!

I spent an hour or so trying to figure out what the heck was going on before seeing this request.

drewB commented May 20, 2013

Can someone confirm this fixed their problem? I have tried using it and am still seeing what appears to be unicorn reusing previous ACCEPT_LANGUAGE headers.


@drewB This did work for me at the time but I forget the exact circumstances. I'm assuming you didn't forget to reboot your rails/unicorn env after applying this patch?

drewB commented May 20, 2013

thanks @seedifferently. I did remember to reboot. I wonder if it is a conflict with #19 which I also applied. I will look into it some more.


Fixes for me.

@DouweM DouweM merged commit cbcf57c into iain:master Sep 6, 2013


DouweM commented Sep 6, 2013

@iain made me a maintainer, so I'll be resolving all outstanding issues today, and hopefully release a new version :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment