Skip to content
Snippets Groups Projects
Unverified Commit 75c3272a authored by Andreas Gohr's avatar Andreas Gohr Committed by GitHub
Browse files

Merge pull request #2309 from splitbrain/fix204HTTPResult

DokuHTTPClient: Add handling for 204: No Content responses
parents 62035cbb 079e0137
No related branches found
No related tags found
No related merge requests found
......@@ -442,7 +442,9 @@ class HTTPClient {
$r_body = $this->_readData($socket, $length, 'response (content-length limited)', true);
}elseif( !isset($this->resp_headers['transfer-encoding']) && $this->max_bodysize && !$this->keep_alive){
$r_body = $this->_readData($socket, $this->max_bodysize, 'response (content-length limited)', true);
}else{
} elseif ((int)$this->status === 204) {
// request has no content
} else{
// read entire socket
while (!feof($socket)) {
$r_body .= $this->_readData($socket, 4096, 'response (unlimited)', true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment