[PATCH Audrey] Fix for 500 on HTTP PUT
gblomqui at redhat.com
gblomqui at redhat.com
Wed Dec 14 20:34:48 UTC 2011
From: Greg Blomquist <gblomqui at redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=766967
Now, configserver will ignore "empty" parameters on a PUT instead of throwing up
with a 500 error
---
configserver/aeolus-configserver.spec.in | 5 ++++-
configserver/src/lib/config_handler.rb | 6 +++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/configserver/aeolus-configserver.spec.in b/configserver/aeolus-configserver.spec.in
index 8ebdd2b..7cc7250 100644
--- a/configserver/aeolus-configserver.spec.in
+++ b/configserver/aeolus-configserver.spec.in
@@ -17,7 +17,7 @@
Name: aeolus-configserver
Version: @VERSION@
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: The Aeolus Config Server
Group: Applications/System
@@ -169,6 +169,9 @@ fi
%doc COPYING
%changelog
+* Mon Dec 12 2011 Greg Blomquist <gblomqui at redhat.com> 0.4.3-2
+- Fix 500 on audrey-agent HTTP PUT of partial params
+- https://bugzilla.redhat.com/show_bug.cgi?id=766967
* Fri Dec 09 2011 Greg Blomquist <gblomqui at redhat.com> 0.4.3-1
- Fix 500 on HTTP DELETE of deployment data
- (https://bugzilla.redhat.com/show_bug.cgi?id=766012)
diff --git a/configserver/src/lib/config_handler.rb b/configserver/src/lib/config_handler.rb
index e98d996..26f83c0 100644
--- a/configserver/src/lib/config_handler.rb
+++ b/configserver/src/lib/config_handler.rb
@@ -220,7 +220,11 @@ module ConfigServer
(data.split "|").map do |d|
next if d.nil? or d.empty?
k, v = d.split "&"
- {k => v.b64_decode}
+ # the value for "k" can be nil if the audrey-agent hasn't been able to
+ # collect this value yet
+ if v
+ {k => v.b64_decode}
+ end
end.compact.inject(:merge)
end
--
1.7.7.4
More information about the aeolus-devel
mailing list