Skip to content

Commit

Permalink
No need to built the URL each time.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Feb 12, 2016
1 parent 62af7e7 commit 32904aa
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions framework/Pgp/lib/Horde/Pgp/Keyserver.php
Expand Up @@ -144,15 +144,15 @@ public function getKeyByEmail($address)
{
$output = null;

/* Connect to the public keyserver. */
$url = $this->_createUrl('/pks/lookup', array(
'op' => 'index',
'options' => 'mr',
'search' => $address
));

// Some keyservers are broken, third time's a charm.
for ($i = 0; $i < 3; $i++) {
/* Connect to the public keyserver. */
$url = $this->_createUrl('/pks/lookup', array(
'op' => 'index',
'options' => 'mr',
'search' => $address
));

try {
$response = $this->_http->get($url);
// Some keyservers return HTML, try again.
Expand Down

0 comments on commit 32904aa

Please sign in to comment.