{"action":"created","issue":{"url":"https://api.github.com/repos/Travelport/travelport-uapi-tutorial-php/issues/8","repository_url":"https://api.github.com/repos/Travelport/travelport-uapi-tutorial-php","labels_url":"https://api.github.com/repos/Travelport/travelport-uapi-tutorial-php/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/Travelport/travelport-uapi-tutorial-php/issues/8/comments","events_url":"https://api.github.com/repos/Travelport/travelport-uapi-tutorial-php/issues/8/events","html_url":"https://github.com/Travelport/travelport-uapi-tutorial-php/issues/8","id":144168013,"number":8,"title":"Implement gzip to request and response - PHP","user":{"login":"ratheepan","id":10045229,"avatar_url":"https://avatars.githubusercontent.com/u/10045229?v=3","gravatar_id":"","url":"https://api.github.com/users/ratheepan","html_url":"https://github.com/ratheepan","followers_url":"https://api.github.com/users/ratheepan/followers","following_url":"https://api.github.com/users/ratheepan/following{/other_user}","gists_url":"https://api.github.com/users/ratheepan/gists{/gist_id}","starred_url":"https://api.github.com/users/ratheepan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ratheepan/subscriptions","organizations_url":"https://api.github.com/users/ratheepan/orgs","repos_url":"https://api.github.com/users/ratheepan/repos","events_url":"https://api.github.com/users/ratheepan/events{/privacy}","received_events_url":"https://api.github.com/users/ratheepan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-29T06:18:10Z","updated_at":"2016-03-30T18:45:59Z","closed_at":null,"body":"Hello,\r\n\r\ni am trying to sen request with gzip compression. but i could not get any success result.\r\n\r\n And our server is already configured with gzip extension.\r\n\r\nhere header information for the request\r\n\r\nresponse header\r\n\r\n      Cache-Control\tno-store, no-cache, must-revalidate, post-check=0, pre-check=0\r\n      Connection\tKeep-Alive\r\n      Content-Encoding\tgzip\r\n      Content-Type\ttext/html; charset=UTF-8\r\n      Date\tTue, 29 Mar 2016 05:59:17 GMTExpires\t\r\n      Thu, 19 Nov 1981 08:52:00 GMTKeep-Alive\t\r\n      timeout=5, max=99\r\n      Pragma\tno-cache\r\n      Server\tApache/2.2.22 (Ubuntu)\r\n        Set-Cookie\tck_login_id_20=1; expires=Mon, 27-Jun-2016 05:59:17 GMT; path=/;    omain=104.43.11.233; httponly ck_login_language_20=en_us; expires=Mon, 27-Jun-2016 05:59:17 GMT; path=/;     domain=104.43.11.233; httponly\r\n\r\n      sugar_user_theme=TravelNote_custom; expires=Wed, 29-Mar-2017 05:59:17 GMT; httponly\r\n      Transfer-Encoding\tchunked\r\n      Vary\tAccept-Encoding\r\n     X-Powered-By\tPHP/5.3.10-1ubuntu3.21\r\n\r\n\r\n\r\nrequest header\r\n\r\n       Accept\ttext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n       Accept-Encoding\tgzip, deflate\r\n      Accept-Language\ten-US,en;q=0.5\r\n       Content-Length\t743\r\n      Content-Type\tapplication/x-www-form-urlencoded; charset=UTF-8\r\n      Cookie\tsugar_user_theme=TravelNote_custom;      mailGridWidths=0=10&1=10&2=150&3=250&4=175&5=125; EmailTreeLayout\r\n=732dca6d-95f2-b15b-ce39-568609a7faf7=false&7472241e-a5ee-7cff-3be3-566a7bfef705=false&83b84b33-4a21-b423-8bc3-566a7b0ce471 =false&9e677213-f8dc-7f1f-7024-566a7b7d2208=false&b8f761a9-e99e-8e09-9110-566a7b2799a6=false; ck_login_id_20 =1; ck_login_language_20=en_us; PHPSESSID=i6clh7cfkon0pvksp6e4jl0pd7\r\n   Host\t104.43.11.233\r\n\r\n\r\nPlease find below the soap header in php\r\n\r\n     if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start(\"ob_gzhandler\");\r\n\r\n     else ob_start();\r\n\r\n        $auth = base64_encode(\"$CREDENTIALS\");\r\n        $soap_do = curl_init ($url);\r\n        $header = array(\r\n        \"Content-Type: text/xml;charset=UTF-8\",\r\n        \"Accept-Encoding: gzip\", \r\n        \"Cache-Control: no-cache\",\r\n        \"Pragma: no-cache\",\r\n        \"SOAPAction: \\\"\\\"\",\r\n        \"Connection: Close\",\r\n        \"Authorization: Basic $auth\",\r\n        \"Content-length: \".strlen($message),\r\n   \r\n        );\r\n\r\n\r\n                curl_setopt($soap_do, CURLOPT_CONNECTTIMEOUT, 60); \r\n                curl_setopt($soap_do, CURLOPT_TIMEOUT, 60); \r\n                curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false); \r\n                curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false); \r\n                curl_setopt($soap_do, CURLOPT_POST, true ); \r\n                curl_setopt($soap_do, CURLOPT_POSTFIELDS, $message); \r\n                curl_setopt($soap_do, CURLOPT_HTTPHEADER, $header);\r\n                curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true); // this will prevent the curl_exec to return result and will let us to capture output\r\n                \r\n                curl_setopt($soap_do,CURLOPT_ENCODING , 1);\r\n                \r\n                \r\n                return  $res =curl_exec($soap_do);  \r\n\r\nCan you please help to fix this?\r\n\r\n\r\nThanks in advance\r\n\r\ns ratheepan\r\n"},"comment":{"url":"https://api.github.com/repos/Travelport/travelport-uapi-tutorial-php/issues/comments/203574235","html_url":"https://github.com/Travelport/travelport-uapi-tutorial-php/issues/8#issuecomment-203574235","issue_url":"https://api.github.com/repos/Travelport/travelport-uapi-tutorial-php/issues/8","id":203574235,"user":{"login":"vivekjyotipramanik","id":7747713,"avatar_url":"https://avatars.githubusercontent.com/u/7747713?v=3","gravatar_id":"","url":"https://api.github.com/users/vivekjyotipramanik","html_url":"https://github.com/vivekjyotipramanik","followers_url":"https://api.github.com/users/vivekjyotipramanik/followers","following_url":"https://api.github.com/users/vivekjyotipramanik/following{/other_user}","gists_url":"https://api.github.com/users/vivekjyotipramanik/gists{/gist_id}","starred_url":"https://api.github.com/users/vivekjyotipramanik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vivekjyotipramanik/subscriptions","organizations_url":"https://api.github.com/users/vivekjyotipramanik/orgs","repos_url":"https://api.github.com/users/vivekjyotipramanik/repos","events_url":"https://api.github.com/users/vivekjyotipramanik/events{/privacy}","received_events_url":"https://api.github.com/users/vivekjyotipramanik/received_events","type":"User","site_admin":false},"created_at":"2016-03-30T18:45:59Z","updated_at":"2016-03-30T18:45:59Z","body":"Hi Ratheepan,\r\n\r\nI am checking and will provide an update soon. Thanks.\r\n\r\nThanks & Regards\r\nVivekjyoti Pramanik"}}