Skip to content
Snippets Groups Projects
Commit 4e055e8a authored by tsl0922's avatar tsl0922
Browse files

fix: UTF-8 encoding error

parent ef61d1f2
No related branches found
No related tags found
1 merge request!3634fix http push 401 and 500 with some git clients
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment