add mr option in keyserver class before query (code simplification)
This commit is contained in:
@@ -216,9 +216,9 @@ public class HkpKeyServer extends KeyServer {
|
|||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String request = "/pks/lookup?op=index&search=" + encodedQuery + "&options=mr";
|
String request = "/pks/lookup?op=index&options=mr&search=" + encodedQuery;
|
||||||
|
|
||||||
String data = null;
|
String data;
|
||||||
try {
|
try {
|
||||||
data = query(request);
|
data = query(request);
|
||||||
} catch (HttpError e) {
|
} catch (HttpError e) {
|
||||||
@@ -279,7 +279,7 @@ public class HkpKeyServer extends KeyServer {
|
|||||||
HttpClient client = new DefaultHttpClient();
|
HttpClient client = new DefaultHttpClient();
|
||||||
try {
|
try {
|
||||||
HttpGet get = new HttpGet("http://" + mHost + ":" + mPort
|
HttpGet get = new HttpGet("http://" + mHost + ":" + mPort
|
||||||
+ "/pks/lookup?op=get&search=" + PgpKeyHelper.convertKeyIdToHex(keyId) + "&options=mr");
|
+ "/pks/lookup?op=get&options=mr&search=" + PgpKeyHelper.convertKeyIdToHex(keyId));
|
||||||
|
|
||||||
HttpResponse response = client.execute(get);
|
HttpResponse response = client.execute(get);
|
||||||
if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
|
if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
|
||||||
|
|||||||
Reference in New Issue
Block a user