|
@@ 283-285 (lines=3) @@
|
| 280 |
|
); |
| 281 |
|
|
| 282 |
|
$documentVersion = $this->remoteStorage->getVersion($path); |
| 283 |
|
if (null !== $ifMatch && !in_array($documentVersion, $ifMatch)) { |
| 284 |
|
throw new HttpException('version mismatch', 412); |
| 285 |
|
} |
| 286 |
|
|
| 287 |
|
if (null !== $ifNoneMatch && in_array('*', $ifNoneMatch) && null !== $documentVersion) { |
| 288 |
|
throw new HttpException('document already exists', 412); |
|
@@ 328-330 (lines=3) @@
|
| 325 |
|
|
| 326 |
|
// if document does not exist, and we have If-Match header set we should |
| 327 |
|
// return a 412 instead of a 404 |
| 328 |
|
if (null !== $ifMatch && !in_array($documentVersion, $ifMatch)) { |
| 329 |
|
throw new HttpException('version mismatch', 412); |
| 330 |
|
} |
| 331 |
|
|
| 332 |
|
if (null === $documentVersion) { |
| 333 |
|
throw new HttpException( |
|
@@ 342-344 (lines=3) @@
|
| 339 |
|
$ifMatch = $this->stripQuotes( |
| 340 |
|
$request->getHeader('If-Match', false, null) |
| 341 |
|
); |
| 342 |
|
if (null !== $ifMatch && !in_array($documentVersion, $ifMatch)) { |
| 343 |
|
throw new HttpException('version mismatch', 412); |
| 344 |
|
} |
| 345 |
|
|
| 346 |
|
$x = $this->remoteStorage->deleteDocument( |
| 347 |
|
$path, |