Commit 74d65bb8238923d04dde6eefc657a40995c8e4ff

Authored by Saito
1 parent 1ef1a4ae

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 42  
43 43 def current_ref
44 44 if @env["HTTP_CONTENT_ENCODING"] =~ /gzip/
45   - input = Zlib::GzipReader.new(@request.body).string
  45 + input = Zlib::GzipReader.new(@request.body).read
46 46 else
47   - input = @request.body.string
  47 + input = @request.body.read
48 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 52 end
53 53 end# Auth
54 54 end# Grack
... ...