From 78f11d66a8521492a2fbca78c9e9c9e99ebc4a3e Mon Sep 17 00:00:00 2001 From: Azul Date: Sun, 10 Apr 2016 14:22:12 +0200 Subject: bugfix: 404 if no key matches, fixes #6789 I also separated the parsing of the hkp response from FetchKeyInfo. This way FetchKeyInfo has the EM specific code that has sideeffects and the logic is in a class without sideeffects and (almost) without state. The only state we keep is the KeyInfo array that contains all the information the server returns. This way we avoid parsing the response multiple times. --- lib/nickserver.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/nickserver.rb') diff --git a/lib/nickserver.rb b/lib/nickserver.rb index 951dae9..eb7eddb 100644 --- a/lib/nickserver.rb +++ b/lib/nickserver.rb @@ -5,9 +5,10 @@ require "nickserver/email_address" require "nickserver/couch/fetch_key" -require "nickserver/hkp/key_info" -require "nickserver/hkp/fetch_key_info" require "nickserver/hkp/fetch_key" +require "nickserver/hkp/fetch_key_info" +require "nickserver/hkp/parse_key_info" +require "nickserver/hkp/key_info" require "nickserver/server" require "nickserver/daemon" -- cgit v1.2.3