| Moxy documentation | Contained in the Moxy distribution. |
Moxy::Plugin::XMLisHTML - XML is HTML
- module: XMLisHTML
If you want to use the CSS, DoCoMo UA needs to use 'application/xhtml+xml' for Content-Type. But, DoCoMo's XHTML is not valid, likes '<a href="/login" utn>login</a>', Firefox reject this... orz.
This plugin replace Content-Type header.
Tokuhiro Matsuno
| Moxy documentation | Contained in the Moxy distribution. |
package Moxy::Plugin::XMLisHTML; use strict; use warnings; use base qw/Moxy::Plugin/; sub response_filter :Hook { my ($self, $context, $args) = @_; $args->{response}->header( 'Content-Type' => 'text/html' ) if $args->{response}->header( 'Content-Type' ) =~ /xml/; } 1; __END__