... | ... |
@@ -208,6 +208,12 @@ If you want to upgrade by "git pull", you can do it. |
208 | 208 |
you create "gitprep.my.conf" copied from "gitprep.my.conf", |
209 | 209 |
and do "git pull" |
210 | 210 |
|
211 |
+### I can't push learge repository by http protocal |
|
212 |
+ |
|
213 |
+Manye http.postBuffer value of git config is small. Input the following command to increase this size. |
|
214 |
+ |
|
215 |
+ git config http.postBuffer 104857600 |
|
216 |
+ |
|
211 | 217 |
## Web Site |
212 | 218 |
|
213 | 219 |
[GitPrep Web Site](http://perlcodesample.sakura.ne.jp/gitprep-site/) |
... | ... |
@@ -1,3 +1,5 @@ |
1 |
+# 環境変数 |
|
2 |
+ |
|
1 | 3 |
use 5.008007; |
2 | 4 |
package Gitprep; |
3 | 5 |
use Mojo::Base 'Mojolicious'; |
... | ... |
@@ -28,8 +30,6 @@ has 'smart_http'; |
28 | 30 |
|
29 | 31 |
use constant BUFFER_SIZE => 8192; |
30 | 32 |
|
31 |
-$ENV{MOJO_MAX_MESSAGE_SIZE} = 1024 * 1024 * 100; |
|
32 |
- |
|
33 | 33 |
sub startup { |
34 | 34 |
my $self = shift; |
35 | 35 |
|
... | ... |
@@ -15,13 +15,11 @@ |
15 | 15 |
my $rep_dir = $git->rep($user, $project); |
16 | 16 |
my @cmd = $git->cmd($user, $project, $service, '--stateless-rpc', $rep_dir); |
17 | 17 |
|
18 |
- # Body |
|
19 |
- my $content = $self->req->content; |
|
20 |
- |
|
21 |
- # Read |
|
18 |
+ # Command |
|
22 | 19 |
my ($cout, $cerr) = (Symbol::gensym, Symbol::gensym); |
23 | 20 |
my $pid = IPC::Open3::open3(my $cin, $cout, $cerr, @cmd); |
24 | 21 |
my $pos = 0; |
22 |
+ my $content = $self->req->content; |
|
25 | 23 |
while (1) { |
26 | 24 |
my $chunk = $content->get_body_chunk($pos); |
27 | 25 |
last unless defined $chunk; |
... | ... |
@@ -52,11 +50,9 @@ |
52 | 50 |
while (sysread($handle, $buf, $buffer_size)) { |
53 | 51 |
if ($handle == $cerr) { |
54 | 52 |
$error .= $buf; |
55 |
- warn "error $buf"; |
|
56 | 53 |
} |
57 | 54 |
else { |
58 | 55 |
$output .= $buf; |
59 |
- warn "output $buf"; |
|
60 | 56 |
} |
61 | 57 |
} |
62 | 58 |
$s->remove($handle) if eof($handle); |