Commit 4e055e8a authored by tsl0922's avatar tsl0922

fix: UTF-8 encoding error

parent ef61d1f2
......@@ -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
......
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