Skip to content

Commit

Permalink
Revert "Merge pull request #305 from nadoshmado/gh-272"
Browse files Browse the repository at this point in the history
This reverts commit a4b0090, reversing
changes made to 5d5281a.
  • Loading branch information
monken committed Mar 20, 2014
1 parent 67b190e commit 397bf17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/MetaCPAN/Server/Controller/Source.pm
Expand Up @@ -5,7 +5,6 @@ use warnings;

use Moose;
use Plack::App::Directory;
use Plack::MIME;

BEGIN { extends 'MetaCPAN::Server::Controller' }

Expand Down Expand Up @@ -33,7 +32,7 @@ sub get : Chained('index') : PathPart('') : Args {
}
else {
$c->stash->{path} = $file;
$c->res->content_type(Plack::MIME->mime_type($file) || 'text/plain');
$c->res->content_type('text/plain');
$c->res->body( $file->openr );
}
}
Expand Down
2 changes: 1 addition & 1 deletion t/server/controller/source.t
Expand Up @@ -22,7 +22,7 @@ test_psgi app, sub {
if ( $k eq '/source/Moose' ) {
like( $res->content, qr/package Moose/, 'Moose source' );
is( $res->header('content-type'),
'text/x-script.perl-module; charset=UTF-8',
'text/plain; charset=UTF-8',
'Content-type'
);
}
Expand Down

0 comments on commit 397bf17

Please sign in to comment.