[core] Accept additional "successful" 2xx status codes (#2310)

This commit is contained in:
Martin Leyrer 2021-10-29 22:38:25 +02:00 committed by GitHub
parent 0ba0e2de4e
commit 3764348b76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -160,7 +160,9 @@ function getContents($url, $header = array(), $opts = array(), $returnHeader = f
}
switch($errorCode) {
case 200: // Contents received
case 200: // Contents OK
case 201: // Contents Created
case 202: // Contents Accepted
Debug::log('New contents received');
$data = substr($data, $headerSize);
// Disable caching if the server responds with "Cache-Control: no-cache"