about summary refs log tree commit homepage
path: root/lib/PublicInbox/RepoGitPatch.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-03-03 00:55:07 +0000
committerEric Wong <e@80x24.org>2017-03-03 00:55:07 +0000
commitb9b12ac92230cc6807623293b93cc22e5eb33684 (patch)
treee05c029ebd6a16bbd9dd5045dcff7d2701794235 /lib/PublicInbox/RepoGitPatch.pm
parent16b1fbe36cc39a351ef9810b9018d36df833a941 (diff)
downloadpublic-inbox-b9b12ac92230cc6807623293b93cc22e5eb33684.tar.gz
For everything with relevant content, we'll try to set
UTF-8 charset and reduce duplication when generating
response headers.
Diffstat (limited to 'lib/PublicInbox/RepoGitPatch.pm')
-rw-r--r--lib/PublicInbox/RepoGitPatch.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/RepoGitPatch.pm b/lib/PublicInbox/RepoGitPatch.pm
index cd5bf13c..1c9ec45f 100644
--- a/lib/PublicInbox/RepoGitPatch.pm
+++ b/lib/PublicInbox/RepoGitPatch.pm
@@ -31,8 +31,8 @@ sub call_git_patch {
         my $qsp = PublicInbox::Qspawn->new($cmd);
         $qsp->psgi_return($env, undef, sub {
                 my ($r) = @_;
-                my $h = ['Content-Type', 'text/plain; charset=UTF-8'];
-                $r ? [ 200, $h ] : [ 500, $h, [ "format-patch error\n" ] ];
+                $r ? $self->rt(200, 'plain') :
+                        $self->rt(500, 'plain', "format-patch error\n");
         });
 }