lib/git/semaphore/api.rb in git-semaphore-2.3.0 vs lib/git/semaphore/api.rb in git-semaphore-2.3.1
- old
+ new
@@ -103,11 +103,12 @@
raise 'Unsupported action'
end
end
def response.json_body
- raise 'JSON response expected' \
- unless self['content-type'].match?(%r{application/json})
+ # "application/json; charset=utf-8"
+ raise 'JSON body expected' \
+ unless self['content-type'] =~ %r{\Aapplication/json}
JSON.parse(body)
end
response
end