mirror of
https://github.com/mistergibson/gxg-server.git
synced 2026-08-15 02:15:59 -07:00
uri-unescape bug fix
This commit is contained in:
parent
4d31b7dadf
commit
5ef335298f
1 changed files with 3 additions and 2 deletions
|
|
@ -848,15 +848,16 @@ module GxGwww
|
||||||
end
|
end
|
||||||
#
|
#
|
||||||
operations = []
|
operations = []
|
||||||
|
the_parser = URI::Parser.new
|
||||||
case the_method
|
case the_method
|
||||||
when :get
|
when :get
|
||||||
if the_request.params["details"].to_s.size > 0
|
if the_request.params["details"].to_s.size > 0
|
||||||
operations = (::JSON::parse(URI.unescape(URI.unescape(the_request.params["details"].to_s.decode64)), {:symbolize_names => true}))
|
operations = (::JSON::parse(the_parser.unescape(the_parser.unescape(the_request.params["details"].to_s.decode64)), {:symbolize_names => true}))
|
||||||
end
|
end
|
||||||
when :put
|
when :put
|
||||||
if the_request.body.respond_to?(:rewind) && the_request.body.respond_to?(:read)
|
if the_request.body.respond_to?(:rewind) && the_request.body.respond_to?(:read)
|
||||||
the_request.body.rewind
|
the_request.body.rewind
|
||||||
operations = (::JSON::parse(URI.unescape(URI.unescape(the_request.body.read())), {:symbolize_names => true}))
|
operations = (::JSON::parse(the_parser.unescape(the_parser.unescape(the_request.body.read())), {:symbolize_names => true}))
|
||||||
else
|
else
|
||||||
log_warn("Abnormal PUT Body #{the_request.body.inspect}")
|
log_warn("Abnormal PUT Body #{the_request.body.inspect}")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue