6.0.0-beta1
7/6/25

[#13913] http request fails
Summary http request fails
Queue Horde Framework Packages
Type Bug
State Duplicate
Priority 1. Low
Owners
Requester o+horde (at) immerda (dot) ch
Created 03/13/2015 (3768 days ago)
Due
Updated 03/13/2015 (3768 days ago)
Assigned
Resolved 03/13/2015 (3768 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/13/2015 04:32:30 PM Michael Rubinsky Comment #2
State ⇒ Duplicate
Priority ⇒ 1. Low
Reply to this comment
Duplicate Bug: 13897
03/13/2015 04:19:53 PM o+horde (at) immerda (dot) ch Comment #1
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ http request fails
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
Reply to this comment
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...

Saved Queries