plack / Plack

PSGI toolkit and server adapters
http://plackperl.org/
Other
486 stars 214 forks source link

Plack::MiddleWare::SimpleContentFilter throws warning on redirect. #376

Open earino opened 11 years ago

earino commented 11 years ago

P::M::SCF triggers the following warning:

Use of uninitialized value in pattern match (m//) at [MY PATH]/local-lib/lib/perl5/Plack/Middleware/SimpleContentFilter.pm line 18.

This is being caused because our request object is simply:

[ 301, [ 'Location', 'stuff to redirect to' ], [] ] ];

So there is no Content-Type header to introspect.

miyagawa commented 11 years ago

Content-Type is a required header in PSGI response per spec.

earino commented 11 years ago

What is the appropriate content-type header for an HTTP 301?

miyagawa commented 11 years ago

You should be just able to use text/html for 301.