Plack-Middleware-FixIEXDomainRequestBug
view release on metacpan or search on metacpan
README.mkdn view on Meta::CPAN
vastly decreases the value of the feature. What happens is that any type of
attempt to use the XDomainRequest activeX control sets the request content type
to nothing or text/plain (the docs say text/plain is the only type allowed, but
web search and the experience we have seen is that the content type is empty).
As a result, when a framework like [Catalyst](http://search.cpan.org/perldoc?Catalyst) trys to parse the POST body, it
can't figure out what to do, so it punts, typically busting this code. Since
it is common with web applications to use a Javascript framework to paper over
browser differences, this means that an application doing cross domain access
might easily work with Firefox but totally bust with IE 8 or 9 (at the time of
this writing these browsers are still the most popular for people using Windows
on the desktop, and typically represent 20%+ total web traffic)
This distribution attempts to solve this problem at the middleware level. What
it does is check to see if the user agent identifies itself as Internet Explorer
8 or 9, AND the method is POST (only GET and POST http methods are allowed with
XDomainRequest anyway) AND content-type is nothing or text/plain, THEN we do
of the following:
We create the following custom key
$env->{'plack.middleware.fixiexdomainrequestbug.overrode_content_type'} = 1
lib/Plack/Middleware/FixIEXDomainRequestBug.pm view on Meta::CPAN
vastly decreases the value of the feature. What happens is that any type of
attempt to use the XDomainRequest activeX control sets the request content type
to nothing or text/plain (the docs say text/plain is the only type allowed, but
web search and the experience we have seen is that the content type is empty).
As a result, when a framework like L<Catalyst> trys to parse the POST body, it
can't figure out what to do, so it punts, typically busting this code. Since
it is common with web applications to use a Javascript framework to paper over
browser differences, this means that an application doing cross domain access
might easily work with Firefox but totally bust with IE 8 or 9 (at the time of
this writing these browsers are still the most popular for people using Windows
on the desktop, and typically represent 20%+ total web traffic)
This distribution attempts to solve this problem at the middleware level. What
it does is check to see if the user agent identifies itself as Internet Explorer
8 or 9, AND the method is POST (only GET and POST http methods are allowed with
XDomainRequest anyway) AND content-type is nothing or text/plain, THEN we do
of the following:
We create the following custom key
$env->{'plack.middleware.fixiexdomainrequestbug.overrode_content_type'} = 1
( run in 0.224 second using v1.01-cache-2.11-cpan-299005ec8e3 )