{"action":"created","issue":{"url":"https://api.github.com/repos/zendframework/zf1/issues/582","labels_url":"https://api.github.com/repos/zendframework/zf1/issues/582/labels{/name}","comments_url":"https://api.github.com/repos/zendframework/zf1/issues/582/comments","events_url":"https://api.github.com/repos/zendframework/zf1/issues/582/events","html_url":"https://github.com/zendframework/zf1/issues/582","id":92567321,"number":582,"title":"Incorrect application of timeout option in curl http client adapter","user":{"login":"tasso85","id":655560,"avatar_url":"https://avatars.githubusercontent.com/u/655560?v=3","gravatar_id":"","url":"https://api.github.com/users/tasso85","html_url":"https://github.com/tasso85","followers_url":"https://api.github.com/users/tasso85/followers","following_url":"https://api.github.com/users/tasso85/following{/other_user}","gists_url":"https://api.github.com/users/tasso85/gists{/gist_id}","starred_url":"https://api.github.com/users/tasso85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasso85/subscriptions","organizations_url":"https://api.github.com/users/tasso85/orgs","repos_url":"https://api.github.com/users/tasso85/repos","events_url":"https://api.github.com/users/tasso85/events{/privacy}","received_events_url":"https://api.github.com/users/tasso85/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zendframework/zf1/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/zendframework/zf1/labels/Zend_Http_Client","name":"Zend_Http_Client","color":"008000"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/zendframework/zf1/milestones/11","html_url":"https://github.com/zendframework/zf1/milestones/1.12.14","labels_url":"https://api.github.com/repos/zendframework/zf1/milestones/11/labels","id":1120280,"number":11,"title":"1.12.14","description":"","creator":{"login":"froschdesign","id":103362,"avatar_url":"https://avatars.githubusercontent.com/u/103362?v=3","gravatar_id":"","url":"https://api.github.com/users/froschdesign","html_url":"https://github.com/froschdesign","followers_url":"https://api.github.com/users/froschdesign/followers","following_url":"https://api.github.com/users/froschdesign/following{/other_user}","gists_url":"https://api.github.com/users/froschdesign/gists{/gist_id}","starred_url":"https://api.github.com/users/froschdesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/froschdesign/subscriptions","organizations_url":"https://api.github.com/users/froschdesign/orgs","repos_url":"https://api.github.com/users/froschdesign/repos","events_url":"https://api.github.com/users/froschdesign/events{/privacy}","received_events_url":"https://api.github.com/users/froschdesign/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":4,"state":"open","created_at":"2015-05-20T07:48:57Z","updated_at":"2015-07-02T07:59:11Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-07-02T07:13:22Z","updated_at":"2015-07-02T07:59:42Z","closed_at":null,"body":"Hi,\r\n\r\nafter upgrade to the latest version of ZF1, I noticed that the `connect()` code for `Zend_Http_Client_Adapter_Curl` partially changed, from\r\n\r\n    [...]\r\n    // Set timeout\r\n    curl_setopt($this->_curl, CURLOPT_CONNECTTIMEOUT, $this->_config['timeout']);\r\n    [...]\r\n\r\nto\r\n\r\n    [...]\r\n    if (defined('CURLOPT_CONNECTTIMEOUT_MS')) {\r\n        curl_setopt($this->_curl, CURLOPT_CONNECTTIMEOUT_MS, $this->_config['timeout'] * 1000);\r\n    } else {\r\n        curl_setopt($this->_curl, CURLOPT_CONNECTTIMEOUT, $this->_config['timeout']);\r\n    }\r\n    \r\n    if (defined('CURLOPT_TIMEOUT_MS')) {\r\n        curl_setopt($this->_curl, CURLOPT_TIMEOUT_MS, $this->_config['timeout'] * 1000);\r\n    } else {\r\n        curl_setopt($this->_curl, CURLOPT_TIMEOUT, $this->_config['timeout']);\r\n    }\r\n    [...]\r\n\r\nHowever, the second version seems to incorrectly apply the timeout parameter, which the docs states is the **connection** timeout, also as a general timeout.\r\n\r\nThis broke a part of our application, which relied on it to behave as stated in the docs, and now behaviour has changed.\r\n\r\nI would therefore like to propose to split such option to `timeout` and `connecttimeout`, or something like that, to keep the behaviour separate, and also I think that the option should be set only where different from `NULL`."},"comment":{"url":"https://api.github.com/repos/zendframework/zf1/issues/comments/117950385","html_url":"https://github.com/zendframework/zf1/issues/582#issuecomment-117950385","issue_url":"https://api.github.com/repos/zendframework/zf1/issues/582","id":117950385,"user":{"login":"froschdesign","id":103362,"avatar_url":"https://avatars.githubusercontent.com/u/103362?v=3","gravatar_id":"","url":"https://api.github.com/users/froschdesign","html_url":"https://github.com/froschdesign","followers_url":"https://api.github.com/users/froschdesign/followers","following_url":"https://api.github.com/users/froschdesign/following{/other_user}","gists_url":"https://api.github.com/users/froschdesign/gists{/gist_id}","starred_url":"https://api.github.com/users/froschdesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/froschdesign/subscriptions","organizations_url":"https://api.github.com/users/froschdesign/orgs","repos_url":"https://api.github.com/users/froschdesign/repos","events_url":"https://api.github.com/users/froschdesign/events{/privacy}","received_events_url":"https://api.github.com/users/froschdesign/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T07:59:42Z","updated_at":"2015-07-02T07:59:42Z","body":"See also: #402"}}