summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/xmlrpc
diff options
context:
space:
mode:
authorIan Taylor <ian@lorf.org>2009-06-05 12:39:04 -0400
committerJames Turnbull <james@lovedthanlost.net>2009-06-06 09:12:00 +1000
commit4f2c066a97e59a89df64af4b25beac6f3f0553c2 (patch)
tree126540beec3c65448e01e1b48d27275ec4ee6ea4 /lib/puppet/network/xmlrpc
parent97e6975d69f239e24993315a25a3117b1daa48c3 (diff)
downloadpuppet-4f2c066a97e59a89df64af4b25beac6f3f0553c2.tar.gz
puppet-4f2c066a97e59a89df64af4b25beac6f3f0553c2.tar.xz
puppet-4f2c066a97e59a89df64af4b25beac6f3f0553c2.zip
Removed extra whitespace from end of lines
Diffstat (limited to 'lib/puppet/network/xmlrpc')
-rw-r--r--lib/puppet/network/xmlrpc/client.rb10
-rw-r--r--lib/puppet/network/xmlrpc/webrick_servlet.rb12
2 files changed, 11 insertions, 11 deletions
diff --git a/lib/puppet/network/xmlrpc/client.rb b/lib/puppet/network/xmlrpc/client.rb
index 678ab6c00..ee2c008eb 100644
--- a/lib/puppet/network/xmlrpc/client.rb
+++ b/lib/puppet/network/xmlrpc/client.rb
@@ -82,7 +82,7 @@ module Puppet::Network
if detail.message.include?(str)
Puppet.warning "Certificate validation failed; consider using the certname configuration option"
end
- end
+ end
raise XMLRPCClientError, "Certificates were not trusted: %s" % detail
end
@@ -90,7 +90,7 @@ module Puppet::Network
if detail.message.to_s =~ /^Wrong size\. Was \d+, should be \d+$/
Puppet.warning "XMLRPC returned wrong size. Retrying."
return :retry
- end
+ end
Puppet.err "Could not call %s.%s: %s" % [namespace, method, detail.inspect]
error = XMLRPCClientError.new(detail.to_s)
error.set_backtrace detail.backtrace
@@ -107,7 +107,7 @@ module Puppet::Network
if detail.message.include?(str)
Puppet.warning "Certificate validation failed; consider using the certname configuration option"
end
- end
+ end
raise XMLRPCClientError, "Certificates were not trusted: %s" % detail
end
@@ -185,7 +185,7 @@ module Puppet::Network
)
@http = Puppet::Network::HttpPool.http_instance(@host, @port)
end
-
+
# Get rid of our existing connection, replacing it with a new one.
# This should only happen if we lose our connection somehow (e.g., an EPIPE)
# or we've just downloaded certs and we need to create new http instances
@@ -197,7 +197,7 @@ module Puppet::Network
@http = nil
self.http # force a new one
end
-
+
def start
begin
@http.start unless @http.started?
diff --git a/lib/puppet/network/xmlrpc/webrick_servlet.rb b/lib/puppet/network/xmlrpc/webrick_servlet.rb
index 9a46ffb7c..ec64c1c60 100644
--- a/lib/puppet/network/xmlrpc/webrick_servlet.rb
+++ b/lib/puppet/network/xmlrpc/webrick_servlet.rb
@@ -42,7 +42,7 @@ module Puppet::Network::XMLRPC
# we need to pass a ClientRequest object to process() so we can do
# authorization. It's the only way to stay thread-safe.
def service(request, response)
- if @valid_ip
+ if @valid_ip
raise WEBrick::HTTPStatus::Forbidden unless @valid_ip.any? { |ip| request.peeraddr[3] =~ ip }
end
@@ -51,9 +51,9 @@ module Puppet::Network::XMLRPC
"unsupported method `#{request.request_method}'."
end
- if parse_content_type(request['Content-type']).first != "text/xml"
+ if parse_content_type(request['Content-type']).first != "text/xml"
raise WEBrick::HTTPStatus::BadRequest
- end
+ end
length = (request['Content-length'] || 0).to_i
@@ -66,14 +66,14 @@ module Puppet::Network::XMLRPC
end
resp = process(data, client_request(request))
- if resp.nil? or resp.size <= 0
+ if resp.nil? or resp.size <= 0
raise WEBrick::HTTPStatus::InternalServerError
end
response.status = 200
response['Content-Length'] = resp.size
response['Content-Type'] = "text/xml; charset=utf-8"
- response.body = resp
+ response.body = resp
end
private
@@ -97,7 +97,7 @@ module Puppet::Network::XMLRPC
if cert = request.client_cert
nameary = cert.subject.to_a.find { |ary|
ary[0] == "CN"
- }
+ }
if nameary.nil?
Puppet.warning "Could not retrieve server name from cert"