Skip to content

Instantly share code, notes, and snippets.

@nihen
Created December 3, 2009 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nihen/53853dc0cbdf73833519 to your computer and use it in GitHub Desktop.
Save nihen/53853dc0cbdf73833519 to your computer and use it in GitHub Desktop.
package Plack::Middleware::IERequestRearrange;
use strict;
use parent qw(Plack::Middleware);
sub call {
my($self, $env) = @_;
# IE sent wrong formatted value(i.e. "Thu, 03 Dec 2009 01:46:32 GMT; length=17936")
($env->{HTTP_IF_MODIFIED_SINCE}) = (split /;/, $env->{HTTP_IF_MODIFIED_SINCE});
$self->app->($env);
}
1;
__END__
=head1 NAME
Plack::Middleware::IERequestRearrange - fix IE request bug
=head1 SYNOPSIS
use Plack::Builder;
builder {
enable 'IERequestRearrange';
$app;
};
=head1 DESCRIPTION
Plack::Middleware::IERequestRearrange
=head1 AUTHOR
Masahiro Chiba
Steve Cook
=head1 SEE ALSO
L<Plack::Middleware> L<Plack::Builder>
=cut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment