def evaluate_preconditions(self, request):
if request.method.upper() in self.precondition_map.keys():<EOL><INDENT>required_headers = self.precondition_map.get(request.method.upper(), [])<EOL>for header in required_headers:<EOL><INDENT>if not request.META.get(prepare_header_name(header)):<EOL><INDENT>logger.warning('<STR_LIT>', request.path,<EOL>extra={<EOL>'<STR_LIT>': status.HTTP_428_PRECONDITION_REQUIRED,<EOL>'<STR_LIT>': request<EOL>}<EOL>)<EOL>raise PreconditionRequiredException(detail='<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>' % (request.method, header)<EOL>)<EOL><DEDENT><DEDENT><DEDENT>return True<EOL>
Evaluate whether the precondition for the request is met.