]> granicus.if.org Git - pdns/commitdiff
Move force_encoding to earlier position
authorAki Tuomi <cmouse@desteem.org>
Fri, 30 May 2014 19:10:00 +0000 (22:10 +0300)
committerAki Tuomi <cmouse@desteem.org>
Fri, 30 May 2014 19:10:00 +0000 (22:10 +0300)
modules/remotebackend/regression-tests/dnsbackend.rb

index 6ce2e5a6fa24d20505a2fe5cb9dbfd7c70a1b263..de28ec9fa47b9e8636e3e5d03a7481ff226698d4 100644 (file)
@@ -82,7 +82,7 @@ class DNSBackendHandler < WEBrick::HTTPServlet::AbstractServlet
      tmp = req.path[/dns\/(.*)/,1]
      return 400, "Bad request" if (tmp.nil?)
 
-     method, args = parse_url(tmp)
+     method, args = parse_url(tmp.force_encoding("UTF-8"))
 
      method = "do_#{method}"
     
@@ -105,7 +105,6 @@ class DNSBackendHandler < WEBrick::HTTPServlet::AbstractServlet
      end
 
      args = parse_arrays args
-     args.map do |name,arg| if (arg.respond_to? :force_encoding) then arg = arg.force_encoding("UTF-8") end end
  
      @@f.puts "#{Time.now.to_f} [http]: #{({:method=>method,:parameters=>args}).to_json}"