|
@@ 256-258 (lines=3) @@
|
| 253 |
|
); |
| 254 |
|
|
| 255 |
|
$documentVersion = $this->remoteStorage->getVersion($path); |
| 256 |
|
if (null !== $ifMatch && !in_array($documentVersion, $ifMatch)) { |
| 257 |
|
throw new HttpException('version mismatch', 412); |
| 258 |
|
} |
| 259 |
|
|
| 260 |
|
if (null !== $ifNoneMatch && in_array('*', $ifNoneMatch) && null !== $documentVersion) { |
| 261 |
|
throw new HttpException('document already exists', 412); |
|
@@ 301-303 (lines=3) @@
|
| 298 |
|
|
| 299 |
|
// if document does not exist, and we have If-Match header set we should |
| 300 |
|
// return a 412 instead of a 404 |
| 301 |
|
if (null !== $ifMatch && !in_array($documentVersion, $ifMatch)) { |
| 302 |
|
throw new HttpException('version mismatch', 412); |
| 303 |
|
} |
| 304 |
|
|
| 305 |
|
if (null === $documentVersion) { |
| 306 |
|
throw new HttpException( |
|
@@ 315-317 (lines=3) @@
|
| 312 |
|
$ifMatch = $this->stripQuotes( |
| 313 |
|
$request->getHeader('If-Match', false, null) |
| 314 |
|
); |
| 315 |
|
if (null !== $ifMatch && !in_array($documentVersion, $ifMatch)) { |
| 316 |
|
throw new HttpException('version mismatch', 412); |
| 317 |
|
} |
| 318 |
|
|
| 319 |
|
$x = $this->remoteStorage->deleteDocument( |
| 320 |
|
$path, |