Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Error in Rack when using halt with page cache #973
I'm receiving the following error on every other page request when calling
Steps to Reproduce:
I can verify that it happens when the cached value is being retrieved and if you're returning a number or the result of halt 404 which ends up being a Fixnum after its cached.
However that's a half truth because your cached answer there is actually a 200 response! What happens is that Padrino's cache gets the 404 Fixnum and sends it to Sinatra to be served as a 200 response with its body's content set to 404 but the Fixnum not a String. So the caching mechanism might be failing to cache the status code, although I don't know if that's its responsibility or not.
If you want to see this working a bit further, try changing Sinatra's body implementation for