/** * Check multipart headers. * * @param Request $request * @param array $headers * @throws \SRIO\RestUploadBundle\Exception\UploadProcessorException */ protected function checkHeaders(Request $request, array $headers = array()) { list($contentType) = $this->parseContentTypeAndBoundary($request); $expectedContentType = 'multipart/related'; if ($contentType != $expectedContentType) { throw new UploadProcessorException(sprintf('Content-Type must be %s', $expectedContentType)); } parent::checkHeaders($request, array('Content-Type', 'Content-Length')); }