Commit 6e520d9c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #1297 from SaitoWu/issues/1269

fix git push body bigger than 112k problem
parents 6d4ae75f 74d65bb8
......@@ -42,13 +42,13 @@ module Grack
def current_ref
if @env["HTTP_CONTENT_ENCODING"] =~ /gzip/
input = Zlib::GzipReader.new(@request.body).string
input = Zlib::GzipReader.new(@request.body).read
else
input = @request.body.string
input = @request.body.read
end
oldrev, newrev, ref = input.split(' ')
/refs\/heads\/([\w-]+)/.match(ref).to_a.last
# Need to reset seek point
@request.body.rewind
/refs\/heads\/([\w-]+)/.match(input).to_a.first
end
end# Auth
end# Grack
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment