diff --git a/lib/webmachine/errors.rb b/lib/webmachine/errors.rb index e25ac53f..413bbef9 100644 --- a/lib/webmachine/errors.rb +++ b/lib/webmachine/errors.rb @@ -16,6 +16,9 @@ module Webmachine # the response body def self.render_error(code, req, res, options={}) res.code = code + # The response cannot be encoded in render_error so the Content-Encoding + # header is removed here. + res.headers.delete CONTENT_ENCODING unless res.body title, message = t(["errors.#{code}.title", "errors.#{code}.message"], { :method => req.method,