{"id":337,"date":"2010-07-11T00:29:52","date_gmt":"2010-07-10T15:29:52","guid":{"rendered":"https:\/\/deskplate.net\/blog\/2010\/07\/11\/zend-http-response-php%e3%81%ae%e3%82%a8%e3%83%a9%e3%83%bc\/"},"modified":"2010-07-11T00:29:52","modified_gmt":"2010-07-10T15:29:52","slug":"zend-http-response-php%e3%81%ae%e3%82%a8%e3%83%a9%e3%83%bc","status":"publish","type":"post","link":"https:\/\/deskplate.net\/blog\/archives\/337","title":{"rendered":"Zend\/Http\/Response.php\u306e\u30a8\u30e9\u30fc"},"content":{"rendered":"<p>\u3053\u3093\u306a\u30a8\u30e9\u30fc\u304c\u51fa\u3066Zend_Http_Client\u3067\u30c7\u30fc\u30bf\u304c\u53d6\u5f97\u3067\u304d\u306a\u3044\u5834\u5408<br \/>\nWarning: gzuncompress(): data error in Zend\/Http\/Response.php on line 601<br \/>\nZend\/Http\/Response.php \u306e 601\u884c\u3042\u305f\u308a\u3092\u3053\u3093\u306a\u98a8\u306b\u4fee\u6b63\u3059\u308b<br \/>\n\/**<br \/>\n* Decode a zlib deflated message (when Content-encoding = deflate)<br \/>\n*<br \/>\n* Currently requires PHP with zlib support<br \/>\n*<br \/>\n* @param string $body<br \/>\n* @return string<br \/>\n*\/<br \/>\npublic static function decodeDeflate($body)<br \/>\n{<br \/>\nif (! function_exists(&#8216;gzuncompress&#8217;)) {<br \/>\nrequire_once &#8216;Zend\/Http\/Exception.php&#8217;;<br \/>\nthrow new Zend_Http_Exception(&#8216;Unable to decode deflated response &#8216; .<br \/>\n&#8216;body: perhaps the zlib extension is not loaded?&#8217;);<br \/>\n}<br \/>\n\/\/return gzuncompress($body);<br \/>\n\/\/ \u2191\u3092\u30b3\u30e1\u30f3\u30c8\u306b\u3057\u3066\u3053\u3053\u304b\u3089\u4e0b\u306e\u90e8\u5206\u3092\u66f8\u304d\u52a0\u3048\u308b<br \/>\n$result = gzinflate($body);<br \/>\nif($result){<br \/>\nreturn $result;<br \/>\n}else{<br \/>\nreturn gzuncompress($body);<br \/>\n}<br \/>\n}<br \/>\n\u3053\u308c\u3067OK<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306a\u30a8\u30e9\u30fc\u304c\u51fa\u3066Zend_Http_C<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-337","post","type-post","status-publish","format-standard","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/posts\/337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/comments?post=337"}],"version-history":[{"count":0,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/posts\/337\/revisions"}],"wp:attachment":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/media?parent=337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/categories?post=337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/tags?post=337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}