diff options
author | Andreas Gohr <andi@splitbrain.org> | 2023-08-31 15:04:10 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2023-08-31 15:04:10 +0200 |
commit | 7d34963b3e75ea04c63ec066a6b7a692e123cb53 (patch) | |
tree | dbcc4e2398997a0c61fc0d528a3075c0d5f00d96 /inc/HTTP | |
parent | cb7312c0f5cb7e9e97681814090f1eab6df43b58 (diff) | |
download | dokuwiki-7d34963b3e75ea04c63ec066a6b7a692e123cb53.tar.gz dokuwiki-7d34963b3e75ea04c63ec066a6b7a692e123cb53.zip |
coding style: control flow line breaks
Diffstat (limited to 'inc/HTTP')
-rw-r--r-- | inc/HTTP/HTTPClient.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/inc/HTTP/HTTPClient.php b/inc/HTTP/HTTPClient.php index 354d03e83..861bb5124 100644 --- a/inc/HTTP/HTTPClient.php +++ b/inc/HTTP/HTTPClient.php @@ -167,10 +167,12 @@ class HTTPClient $unencodedData = $data; // don't accept gzip if truncated bodies might occur - if ($this->max_bodysize && + if ( + $this->max_bodysize && !$this->max_bodysize_abort && isset($this->headers['Accept-encoding']) && - $this->headers['Accept-encoding'] == 'gzip') { + $this->headers['Accept-encoding'] == 'gzip' + ) { unset($this->headers['Accept-encoding']); } @@ -474,17 +476,21 @@ class HTTPClient return false; } - if (!$this->keep_alive || - (isset($this->resp_headers['connection']) && $this->resp_headers['connection'] == 'Close')) { + if ( + !$this->keep_alive || + (isset($this->resp_headers['connection']) && $this->resp_headers['connection'] == 'Close') + ) { // close socket fclose($socket); unset(self::$connections[$connectionId]); } // decode gzip if needed - if (isset($this->resp_headers['content-encoding']) && + if ( + isset($this->resp_headers['content-encoding']) && $this->resp_headers['content-encoding'] == 'gzip' && - strlen($r_body) > 10 && substr($r_body, 0, 3) == "\x1f\x8b\x08") { + strlen($r_body) > 10 && substr($r_body, 0, 3) == "\x1f\x8b\x08" + ) { $this->resp_body = @gzinflate(substr($r_body, 10)); if ($this->resp_body === false) { $this->error = 'Failed to decompress gzip encoded content'; |