OSDN Git Service
(root)
/
wvm
/
gitlab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef61d1f
)
fix: UTF-8 encoding error
author
tsl0922
<tsl0922@gmail.com>
Sat, 20 Apr 2013 01:18:37 +0000
(09:18 +0800)
committer
tsl0922
<tsl0922@gmail.com>
Fri, 3 May 2013 02:58:53 +0000
(10:58 +0800)
lib/gitlab/backend/grack_auth.rb
patch
|
blob
|
history
diff --git
a/lib/gitlab/backend/grack_auth.rb
b/lib/gitlab/backend/grack_auth.rb
index
8b43b60
..
6d87df1
100644
(file)
--- a/
lib/gitlab/backend/grack_auth.rb
+++ b/
lib/gitlab/backend/grack_auth.rb
@@
-109,6
+109,8
@@
module Grack
else
input = @request.body.read
end
+ # force utf-8 encoding
+ input.encode!('UTF-8', 'UTF-8', invalid: :replace, undef: :replace, replace: '')
# Need to reset seek point
@request.body.rewind
/refs\/heads\/([\w\.-]+)/.match(input).to_a.last