Skip to content

Commit 397bf17

Browse files
committed
Revert "Merge pull request #305 from nadoshmado/gh-272"
This reverts commit a4b0090, reversing changes made to 5d5281a.
1 parent 67b190e commit 397bf17

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/MetaCPAN/Server/Controller/Source.pm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use warnings;
55

66
use Moose;
77
use Plack::App::Directory;
8-
use Plack::MIME;
98

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

@@ -33,7 +32,7 @@ sub get : Chained('index') : PathPart('') : Args {
3332
}
3433
else {
3534
$c->stash->{path} = $file;
36-
$c->res->content_type(Plack::MIME->mime_type($file) || 'text/plain');
35+
$c->res->content_type('text/plain');
3736
$c->res->body( $file->openr );
3837
}
3938
}

t/server/controller/source.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ test_psgi app, sub {
2222
if ( $k eq '/source/Moose' ) {
2323
like( $res->content, qr/package Moose/, 'Moose source' );
2424
is( $res->header('content-type'),
25-
'text/x-script.perl-module; charset=UTF-8',
25+
'text/plain; charset=UTF-8',
2626
'Content-type'
2727
);
2828
}

0 commit comments

Comments
 (0)