apps/dav/lib/Upload/ChunkingPlugin.php 1 location
|
@@ 98-107 (lines=10) @@
|
| 95 |
|
/** |
| 96 |
|
* @throws BadRequest |
| 97 |
|
*/ |
| 98 |
|
private function verifySize() { |
| 99 |
|
$expectedSize = $this->server->httpRequest->getHeader('OC-Total-Length'); |
| 100 |
|
if ($expectedSize === null) { |
| 101 |
|
return; |
| 102 |
|
} |
| 103 |
|
$actualSize = $this->sourceNode->getSize(); |
| 104 |
|
if ($expectedSize != $actualSize) { |
| 105 |
|
throw new BadRequest("Chunks on server do not sum up to $expectedSize but to $actualSize"); |
| 106 |
|
} |
| 107 |
|
} |
| 108 |
|
} |
| 109 |
|
|
apps/dav/lib/Upload/ChunkingPluginZsync.php 1 location
|
@@ 158-167 (lines=10) @@
|
| 155 |
|
/** |
| 156 |
|
* @throws BadRequest |
| 157 |
|
*/ |
| 158 |
|
private function verifySize() { |
| 159 |
|
$expectedSize = $this->server->httpRequest->getHeader('OC-Total-Length'); |
| 160 |
|
if ($expectedSize === null) { |
| 161 |
|
return; |
| 162 |
|
} |
| 163 |
|
$actualSize = $this->sourceNode->getSize(); |
| 164 |
|
if ((int)$expectedSize !== $actualSize) { |
| 165 |
|
throw new BadRequest("Chunks on server do not sum up to $expectedSize but to $actualSize"); |
| 166 |
|
} |
| 167 |
|
} |
| 168 |
|
} |
| 169 |
|
|