try fix [500 Parse Error: Expected HTTP/] in Vercel

pull/397/merge
qkqpttgf 2021-08-07 20:30:45 +08:00 committed by GitHub
parent c862409072
commit ee33e30cbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -352,7 +352,7 @@ class Onedrive {
//echo $filename; //echo $filename;
$result = $this->MSAPI('DELETE', $filename); $result = $this->MSAPI('DELETE', $filename);
return output(json_encode($this->files_format(json_decode($result['body'], true))), $result['stat']); return output(json_encode($this->files_format(json_decode($result['body'], true))), $result['stat']);
return output($result['body'], $result['stat']); //return output($result['body'], $result['stat']);
} }
public function Encrypt($folder, $passfilename, $pass) { public function Encrypt($folder, $passfilename, $pass) {
$filename = path_format($folder['path'] . '/' . urlencode($passfilename)); $filename = path_format($folder['path'] . '/' . urlencode($passfilename));
@ -365,7 +365,7 @@ class Onedrive {
if ($path1!='/'&&substr($path1, -1)=='/') $path1 = substr($path1, 0, -1); if ($path1!='/'&&substr($path1, -1)=='/') $path1 = substr($path1, 0, -1);
savecache('path_' . $path1 . '/?password', '', $this->disktag, 1); savecache('path_' . $path1 . '/?password', '', $this->disktag, 1);
return output(json_encode($this->files_format(json_decode($result['body'], true))), $result['stat']); return output(json_encode($this->files_format(json_decode($result['body'], true))), $result['stat']);
return output($result['body'], $result['stat']); //return output($result['body'], $result['stat']);
} }
public function Move($file, $folder) { public function Move($file, $folder) {
$filename = spurlencode($file['name']); $filename = spurlencode($file['name']);
@ -376,7 +376,7 @@ class Onedrive {
if ($path2!='/'&&substr($path2, -1)=='/') $path2 = substr($path2, 0, -1); if ($path2!='/'&&substr($path2, -1)=='/') $path2 = substr($path2, 0, -1);
savecache('path_' . $path2, json_decode('{}', true), $this->disktag, 1); savecache('path_' . $path2, json_decode('{}', true), $this->disktag, 1);
return output(json_encode($this->files_format(json_decode($result['body'], true))), $result['stat']); return output(json_encode($this->files_format(json_decode($result['body'], true))), $result['stat']);
return output($result['body'], $result['stat']); //return output($result['body'], $result['stat']);
} }
public function Copy($file) { public function Copy($file) {
$filename = spurlencode($file['name']); $filename = spurlencode($file['name']);
@ -405,7 +405,7 @@ class Onedrive {
$result = $this->MSAPI('copy', $filename, $data); $result = $this->MSAPI('copy', $filename, $data);
}*/ }*/
return output(json_encode($this->files_format(json_decode($result['body'], true))), $result['stat']); return output(json_encode($this->files_format(json_decode($result['body'], true))), $result['stat']);
return output($result['body'], $result['stat']); //return output($result['body'], $result['stat']);
} }
public function Edit($file, $content) { public function Edit($file, $content) {
/*TXT一般不会超过4M不用二段上传 /*TXT一般不会超过4M不用二段上传
@ -432,7 +432,7 @@ class Onedrive {
} }
//savecache('path_' . $path1, json_decode('{}',true), $_SERVER['disktag'], 1); //savecache('path_' . $path1, json_decode('{}',true), $_SERVER['disktag'], 1);
return output(json_encode($this->files_format(json_decode($result['body'], true))), $result['stat']); return output(json_encode($this->files_format(json_decode($result['body'], true))), $result['stat']);
return output($result['body'], $result['stat']); //return output($result['body'], $result['stat']);
} }
public function AddDisk() { public function AddDisk() {