Sha256: 4bef193ead142fc492a9fa752a52e7c3a13dbf82f4296fcab9467bf8f19cd39f
Contents?: true
Size: 599 Bytes
Versions: 7
Compression:
Stored size: 599 Bytes
Contents
# Takes care of ensuring the Content-Type is set to application/xhtml+xml # for docomo devices as is required to use xhtml instead of text/html. If # text/html is used, the content is rendered as the vastly inferior i-mode # html (aka CHTML). class Galakei::Filter::ContentType < Galakei::Filter::Base # :stopdoc: def condition? request.docomo? && %r{text/html} =~ response.content_type end def filter Rails.logger.debug("[galakei] DoCoMo browser 1.0 and HTML detected, changing content type to application/xhtml+xml") response.content_type = 'application/xhtml+xml' end end
Version data entries
7 entries across 7 versions & 1 rubygems