summaryrefslogtreecommitdiff
path: root/inc/HTTPClient.php
diff options
context:
space:
mode:
authorTom N Harris <tnharris@whoopdedo.org>2012-06-19 23:42:00 -0400
committerTom N Harris <tnharris@whoopdedo.org>2012-06-19 23:42:00 -0400
commit288188afa98cd0ff65b2c2bf529fba0bff15f634 (patch)
tree2c1d5a88029d99d079e4410f2746fdf5e94b1905 /inc/HTTPClient.php
parent50d1968dceb92179b9a581e34a84d516b81511ce (diff)
downloadrpg-288188afa98cd0ff65b2c2bf529fba0bff15f634.tar.gz
rpg-288188afa98cd0ff65b2c2bf529fba0bff15f634.tar.bz2
HTTP headers are already parsed, there is no need for regexp
Diffstat (limited to 'inc/HTTPClient.php')
-rw-r--r--inc/HTTPClient.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index ea9b42862..534ba220c 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -400,7 +400,8 @@ class HTTPClient {
//read body (with chunked encoding if needed)
$r_body = '';
- if(preg_match('/transfer\-(en)?coding:\s*chunked\r\n/i',$r_headers)){
+ if((isset($this->resp_headers['transfer-encoding']) && $this->resp_headers['transfer-encoding'] == 'chunked')
+ || (isset($this->resp_headers['transfer-coding']) && $this->resp_headers['transfer-coding'] == 'chunked')){
do {
$chunk_size = '';
do {