summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-08-25 06:15:18 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-08-25 06:15:18 -0700
commit6e520d9caeaf3d0427854b701b7f5bb0fcac1d73 (patch)
treefeb4dcf6ff5ad064802574ed348284dc7ab085ae /config
parent6d4ae75f544d9819954865c105414a722344336a (diff)
parent74d65bb8238923d04dde6eefc657a40995c8e4ff (diff)
downloadgitlab-ce-6e520d9caeaf3d0427854b701b7f5bb0fcac1d73.tar.gz
Merge pull request #1297 from SaitoWu/issues/1269
fix git push body bigger than 112k problem
Diffstat (limited to 'config')
-rw-r--r--config/initializers/grack_auth.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/config/initializers/grack_auth.rb b/config/initializers/grack_auth.rb
index 5995b873de9..4f77c327373 100644
--- a/config/initializers/grack_auth.rb
+++ b/config/initializers/grack_auth.rb
@@ -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