[Tickets #13913] http request fails

noreply at bugs.horde.org noreply at bugs.horde.org
Fri Mar 13 16:19:53 UTC 2015


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: https://bugs.horde.org/ticket/13913
------------------------------------------------------------------------------
  Ticket             | 13913
  Created By         | o+horde at immerda.ch
  Summary            | http request fails
  Queue              | Horde Framework Packages
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


o+horde at immerda.ch (2015-03-13 16:19) wrote:

Hi,

we have a problem with failing pecl2 http requests.

By catching the exception in imp/lib/Crypt/Pgp.php:427 I was able to  
get the following backtrace:

2015-03-13T16:59:13+01:00 INFO: HORDE [imp] ++ Exception exception  
'http\Exception\RuntimeException' with message 'http\Client::enqueue()  
[<a href='http\client.enqueue'>http\client.enqueue</a>]: Cannot  
request empty URL' in pear/php/Horde/Http/Request/Peclhttp2.php:78
Stack trace:
#0 pear/php/Horde/Http/Request/Peclhttp2.php(78):  
http\Client->enqueue(Object(http\Client\Request))
#1 pear/php/Horde/Http/Client.php(220): Horde_Http_Request_Peclhttp2->send()
#2 pear/php/Horde/Http/Client.php(117):  
Horde_Http_Client->request('GET', Object(Horde_Url), NULL, Array)
#3 pear/php/Horde/Crypt/Pgp/Keyserver.php(162):  
Horde_Http_Client->get(Object(Horde_Url))
#4 www/imp/lib/Crypt/Pgp.php(251): Horde_Crypt_Pgp_Keyserver->getKeyId(...')
#5 www/imp/lib/Crypt/Pgp.php(394): IMP_Crypt_Pgp->getPublicKey('...')
#6 www/imp/lib/Mime/Viewer/Pgp.php(286):  
IMP_Crypt_Pgp->decryptMessage('-----BEGIN PGP ...', 'personal', Array)
#7 pear/php/Horde/Mime/Viewer/Base.php(298):  
IMP_Mime_Viewer_Pgp->_getEmbeddedMimeParts()
#8 pear/php/Horde/Mime/Viewer/Base.php(297):  
Horde_Mime_Viewer_Base->getEmbeddedMimeParts()
#9 www/imp/lib/Contents.php(1114):  
Horde_Mime_Viewer_Base->getEmbeddedMimeParts()
#10 www/imp/lib/Contents.php(1186): IMP_Contents->_buildMessage()
#11 www/imp/lib/Contents.php(1423): IMP_Contents->getContentTypeMap()
#12 www/imp/lib/Ajax/Application/ShowMessage.php(296):  
IMP_Contents->getInlineOutput(Array)
#13 www/imp/lib/Ajax/Queue.php(451):  
IMP_Ajax_Application_ShowMessage->showMessage(Array)
#14 www/imp/lib/Ajax/Application/Handler/Common.php(681):  
IMP_Ajax_Queue->message(Object(IMP_Indices_Mailbox), '1', NULL)
#15 [internal function]: IMP_Ajax_Application_Handler_Common->showMessage()
#16 pear/php/Horde/Core/Ajax/Application.php(175): call_user_func(Array)
#17 www/services/ajax.php(61): Horde_Core_Ajax_Application->doAction()
#18 {main} [pid 13928 on line 398 of "www/imp/lib/Crypt/Pgp.php"]

Somehow it seems to be picky about a non-string uri argument. I was  
able to patch it by adding a string cast in:

Horde/Http/Request/Peclhttp2.php:73

$httpRequest = new \http\Client\Request($this->method,  
(string)$this->uri, $this->headers, $body);


Also i think it would make sense to log those types of errors somehow.  
In our case not even for logging set to DEBUG a log entry was  
produced...





More information about the bugs mailing list