Skip to content

Commit

Permalink
try fix [500 Parse Error: Expected HTTP/] in Vercel
Browse files Browse the repository at this point in the history
  • Loading branch information
qkqpttgf committed Aug 7, 2021
1 parent c862409 commit ee33e30
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions disk/Onedrive.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ public function Delete($file) {
//echo $filename;
$result = $this->MSAPI('DELETE', $filename);
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) {
$filename = path_format($folder['path'] . '/' . urlencode($passfilename));
Expand All @@ -365,7 +365,7 @@ public function Encrypt($folder, $passfilename, $pass) {
if ($path1!='/'&&substr($path1, -1)=='/') $path1 = substr($path1, 0, -1);
savecache('path_' . $path1 . '/?password', '', $this->disktag, 1);
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) {
$filename = spurlencode($file['name']);
Expand All @@ -376,7 +376,7 @@ public function Move($file, $folder) {
if ($path2!='/'&&substr($path2, -1)=='/') $path2 = substr($path2, 0, -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($result['body'], $result['stat']);
//return output($result['body'], $result['stat']);
}
public function Copy($file) {
$filename = spurlencode($file['name']);
Expand Down Expand Up @@ -405,7 +405,7 @@ public function Copy($file) {
$result = $this->MSAPI('copy', $filename, $data);
}*/
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) {
/*TXT一般不会超过4M,不用二段上传
Expand All @@ -432,7 +432,7 @@ public function Create($parent, $type, $name, $content = '') {
}
//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($result['body'], $result['stat']);
//return output($result['body'], $result['stat']);
}

public function AddDisk() {
Expand Down

0 comments on commit ee33e30

Please sign in to comment.