diff options
author | Tom N Harris <tnharris@whoopdedo.org> | 2012-06-19 23:42:00 -0400 |
---|---|---|
committer | Tom N Harris <tnharris@whoopdedo.org> | 2012-06-19 23:42:00 -0400 |
commit | 288188afa98cd0ff65b2c2bf529fba0bff15f634 (patch) | |
tree | 2c1d5a88029d99d079e4410f2746fdf5e94b1905 | |
parent | 50d1968dceb92179b9a581e34a84d516b81511ce (diff) | |
download | rpg-288188afa98cd0ff65b2c2bf529fba0bff15f634.tar.gz rpg-288188afa98cd0ff65b2c2bf529fba0bff15f634.tar.bz2 |
HTTP headers are already parsed, there is no need for regexp
-rw-r--r-- | inc/HTTPClient.php | 3 |
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 { |