lib/rfm/server.rb in ginjo-rfm-2.0.pre31 vs lib/rfm/server.rb in ginjo-rfm-2.0.0

- old
+ new

@@ -191,11 +191,11 @@ # :password => '12345', # :root_cert_name => 'example.pem' # :root_cert_path => '/usr/cert_file/' # }) def initialize(options) - raise Rfm::Error::RfmError.new(0, "New instance of Rfm::Server has no host name.") if options[:host].to_s == '' + raise Rfm::Error::RfmError.new(0, "New instance of Rfm::Server has no host name. Attempted name '#{options[:host]}'.") if options[:host].to_s == '' @state = { :host => 'localhost', :port => 80, :ssl => true, @@ -288,11 +288,13 @@ def http_fetch(host_name, port, path, account_name, password, post_data, limit=10) raise Rfm::CommunicationError.new("While trying to reach the Web Publishing Engine, RFM was redirected too many times.") if limit == 0 if @state[:log_actions] == true - qs = post_data.collect{|key,val| "#{CGI::escape(key.to_s)}=#{CGI::escape(val.to_s)}"}.join("&") - warn "#{@scheme}://#{@host_name}:#{@port}#{path}?#{qs}" + #qs = post_data.collect{|key,val| "#{CGI::escape(key.to_s)}=#{CGI::escape(val.to_s)}"}.join("&") + qs_unescaped = post_data.collect{|key,val| "#{key.to_s}=#{val.to_s}"}.join("&") + #warn "#{@scheme}://#{@host_name}:#{@port}#{path}?#{qs}" + warn "#{@scheme}://#{@host_name}:#{@port}#{path}?#{qs_unescaped}" end request = Net::HTTP::Post.new(path) request.basic_auth(account_name, password) request.set_form_data(post_data) \ No newline at end of file