gitprep / templates / raw.html.ep /
Newer Older
30 lines | 0.829kb
cleanup
Yuki Kimoto authored on 2013-05-03
1
<%
added branch long name featu...
Yuki Kimoto authored on 2013-05-12
2
  # Git
revert encoding support
Yuki Kimoto authored on 2013-11-22
3
  my $git = app->git;
added branch long name featu...
Yuki Kimoto authored on 2013-05-12
4

            
fixed bug that raw page is e...
Yuki Kimoto authored on 2013-02-08
5
  # Parameters
cleanup
Yuki Kimoto authored on 2013-05-03
6
  my $user = param('user');
7
  my $project = param('project');
added branch long name featu...
Yuki Kimoto authored on 2013-05-12
8
  my $rev_file = param('rev_file');
cleanup parse_rev_path
Yuki Kimoto authored on 2016-04-16
9
  my ($rev, $file) = $git->parse_rev_path(app->rep_info($user, $project), $rev_file);
added raw content rendering
Yuki Kimoto authored on 2013-01-29
10
  
cleanup blob and raw page an...
Yuki Kimoto authored on 2013-05-02
11
  # Blob raw
cleanup blob_raw
Yuki Kimoto authored on 2016-04-16
12
  my $blob_raw = $git->blob_raw(app->rep_info($user, $project), $rev, $file);
added raw content rendering
Yuki Kimoto authored on 2013-01-29
13
  
14
  # Content type
cleanup rep_info
Yuki Kimoto authored on 2016-04-16
15
  my $type = $git->blob_content_type(app->rep_info($user, $project), $rev, $file);
added raw content rendering
Yuki Kimoto authored on 2013-01-29
16

            
17
  # File name
cleanup
Yuki Kimoto authored on 2013-04-29
18
  my $file_name = $rev;
19
  if (defined $file) { $file_name = $file }
20
  elsif ($type =~ m/^text\//) { $file_name .= '.txt' }
added raw content rendering
Yuki Kimoto authored on 2013-01-29
21
  
cleanup blob and raw page an...
Yuki Kimoto authored on 2013-05-02
22
  # Content disposition
remove provent_xss option
Yuki Kimoto authored on 2013-06-04
23
  my $content_disposition = "inline; filename=$file_name";
added raw content rendering
Yuki Kimoto authored on 2013-01-29
24
  
cleanup blob and raw page an...
Yuki Kimoto authored on 2013-05-02
25
  # Response
added raw content rendering
Yuki Kimoto authored on 2013-01-29
26
  $self->res->headers->content_disposition($content_disposition);
27
  $self->res->headers->content_type($type);
added branch deleting featur...
Yuki Kimoto authored on 2013-05-05
28
  $self->render(data => $blob_raw);
cleanup
Yuki Kimoto authored on 2013-05-03
29
  return;
added branch deleting featur...
Yuki Kimoto authored on 2013-05-05
30
%>