Commit 74d65bb8238923d04dde6eefc657a40995c8e4ff
1 parent
1ef1a4ae
Exists in
master
and in
4 other branches
fix git push body bigger than 112k problem
Showing
1 changed file
with
5 additions
and
5 deletions
Show diff stats
config/initializers/grack_auth.rb
@@ -42,13 +42,13 @@ module Grack | @@ -42,13 +42,13 @@ module Grack | ||
42 | 42 | ||
43 | def current_ref | 43 | def current_ref |
44 | if @env["HTTP_CONTENT_ENCODING"] =~ /gzip/ | 44 | if @env["HTTP_CONTENT_ENCODING"] =~ /gzip/ |
45 | - input = Zlib::GzipReader.new(@request.body).string | 45 | + input = Zlib::GzipReader.new(@request.body).read |
46 | else | 46 | else |
47 | - input = @request.body.string | 47 | + input = @request.body.read |
48 | end | 48 | end |
49 | - | ||
50 | - oldrev, newrev, ref = input.split(' ') | ||
51 | - /refs\/heads\/([\w-]+)/.match(ref).to_a.last | 49 | + # Need to reset seek point |
50 | + @request.body.rewind | ||
51 | + /refs\/heads\/([\w-]+)/.match(input).to_a.first | ||
52 | end | 52 | end |
53 | end# Auth | 53 | end# Auth |
54 | end# Grack | 54 | end# Grack |