projects
/
plack-app-gruntmaster.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
77a593a
)
Use Content-Type: text/plain for all sources
author
Marius Gavrilescu
<marius@ieval.ro>
Mon, 20 Apr 2015 14:27:39 +0000
(17:27 +0300)
committer
Marius Gavrilescu
<marius@ieval.ro>
Mon, 20 Apr 2015 14:27:39 +0000
(17:27 +0300)
lib/Plack/App/Gruntmaster.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Plack/App/Gruntmaster.pm
b/lib/Plack/App/Gruntmaster.pm
index c02e7dd3f023cbdbd84c402f36cc0d85cabbcd06..2ccbeb50d8e216211e656d9b0046a0e469ee5d84 100644
(file)
--- a/
lib/Plack/App/Gruntmaster.pm
+++ b/
lib/Plack/App/Gruntmaster.pm
@@
-21,21
+21,6
@@
no warnings 'illegalproto';
use constant USER_REGEX => qr/^\w{2,20}$/a;
use constant USER_REGEX => qr/^\w{2,20}$/a;
-use constant CONTENT_TYPES => +{
- c => 'text/x-csrc',
- cpp => 'text/x-c++src',
- cs => 'text/x-csharp', # Used by GNOME. Not in mime.types.
- go => 'text/plain', # ?
- gs => 'text/plain',
- hs => 'text/x-haskell',
- java => 'text/x-java',
- pas => 'text/x-pascal',
- pl => 'text/x-perl',
- py => 'text/x-python',
- rb => 'application/x-ruby',
- l => 'text/plain',
-};
-
use constant FORMAT_EXTENSION => {
C => 'c',
CPP => 'cpp',
use constant FORMAT_EXTENSION => {
C => 'c',
CPP => 'cpp',
@@
-103,7
+88,7
@@
sub dispatch_request{
my $private = job->private || job->problem->private || job->contest && job->contest->is_running;
forbid !$isowner && $private;
my $privacy = $private ? 'private' : 'public';
my $private = job->private || job->problem->private || job->contest && job->contest->is_running;
forbid !$isowner && $private;
my $privacy = $private ? 'private' : 'public';
- my @headers = ('X-Forever' => 1, 'Cache-Control' => "$privacy, max-age=604800", 'Content-Type' =>
CONTENT_TYPES->{job->extension}
);
+ my @headers = ('X-Forever' => 1, 'Cache-Control' => "$privacy, max-age=604800", 'Content-Type' =>
'text/plain'
);
push @headers, (Vary => 'Authorization') if $private;
[200, \@headers, [job->source]]
},
push @headers, (Vary => 'Authorization') if $private;
[200, \@headers, [job->source]]
},
This page took
0.01139 seconds
and
4
git commands to generate.