[Pkg-privacy-commits] [msva-perl] 191/356: ensure that every response returns a server identifier
Ximin Luo
infinity0 at moszumanska.debian.org
Mon Aug 24 07:41:55 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository msva-perl.
commit 7597f40e6846fb879508ed9581f3610d990dab4d
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Thu Oct 28 17:48:03 2010 -0400
ensure that every response returns a server identifier
---
Changelog | 2 ++
Crypt/Monkeysphere/MSVA.pm | 9 +++++++--
msva-query-agent | 1 +
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Changelog b/Changelog
index 455cb7c..25dde74 100644
--- a/Changelog
+++ b/Changelog
@@ -10,6 +10,8 @@ msva-perl (0.6~pre) upstream;
* Added tests/basic, as a simple test of a few functions (closes MS #2537)
* fixed double-prompting on sites that have more than one User ID
(closes MS #2567)
+ * report server implementation name and version with every query (closes
+ MS # 2564)
-- Daniel Kahn Gillmor <dkg at fifthhorseman.net> Thu, 28 Oct 2010 17:14:35 -0400
diff --git a/Crypt/Monkeysphere/MSVA.pm b/Crypt/Monkeysphere/MSVA.pm
index 72061ab..c0858e0 100755
--- a/Crypt/Monkeysphere/MSVA.pm
+++ b/Crypt/Monkeysphere/MSVA.pm
@@ -39,7 +39,7 @@
# we need the version of GnuPG::Interface that knows about pubkey_data, etc:
use GnuPG::Interface 0.42.02;
- my $version = '0.1';
+ my $VERSION = '0.6';
my $gnupg = GnuPG::Interface->new();
$gnupg->options->quiet(1);
@@ -132,7 +132,7 @@
my $cgi = shift;
return '200 OK', { available => JSON::true,
protoversion => 1,
- server => "MSVA-Perl ".$version };
+ };
}
# returns an empty list if bad key found.
@@ -355,6 +355,11 @@
};
my ($status, $object) = $handler->{handler}($data, $clientinfo);
+ if (ref($object) eq 'HASH' &&
+ ! defined $object->{server}) {
+ $object->{server} = sprintf("MSVA-Perl %s", $VERSION);
+ }
+
my $ret = to_json($object);
msvalog('info', "returning: %s\n", $ret);
printf("HTTP/1.0 %s\r\nDate: %s\r\nContent-Type: application/json\r\n\r\n%s",
diff --git a/msva-query-agent b/msva-query-agent
index fbe692b..0ec01c0 100755
--- a/msva-query-agent
+++ b/msva-query-agent
@@ -42,6 +42,7 @@ $client->log('info', "status: %s\n", $status);
if (defined $ret) {
$client->log('info', "valid: %s\n", $ret->{valid});
$client->log('fatal', "message: %s\n", $ret->{message});
+ $client->log('info', "server: %s\n", $ret->{server});
exit 0
if ($ret->{valid});
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/msva-perl.git
More information about the Pkg-privacy-commits
mailing list