If the resource has an ETag (see :func:`get_etag`) the request
        headers ``If-Match`` and ``If-None-Match`` are verified. May abort the
        request with 304 or 412 response codes.

        :raises:
            - :class:`webob.exceptions.ResponseException` of status 304 if the
              ETag matches the ``If-None-Match`` request header (GET/HEAD
              requests only).
            - :class:`webob.exceptions.ResponseException` of status 412 if the
              ETag matches the ``If-None-Match`` request header (for requests
              other than GET/HEAD) or the ETag does not match the ``If-Match``
              header.

def assert_condition_etag(self):
        """If the resource has an ETag (see :func:`get_etag`) the request
        headers ``If-Match`` and ``If-None-Match`` are verified. May abort the
        request with 304 or 412 response codes.

        :raises:
            - :class:`webob.exceptions.ResponseException` of status 304 if the
              ETag matches the ``If-None-Match`` request header (GET/HEAD
              requests only).
            - :class:`webob.exceptions.ResponseException` of status 412 if the
              ETag matches the ``If-None-Match`` request header (for requests
              other than GET/HEAD) or the ETag does not match the ``If-Match``
              header.
        """
        if self.response.etag:
            etag = self.response.etag.replace('"', '')
            if not etag in self.request.if_match:
                raise_412(self,
                    'If-Match request header does not the resource ETag.')
            if etag in self.request.if_none_match:
                if self.request.method in ('GET', 'HEAD'):
                    raise_304(self)
                else:
                    raise_412(self,
                        'If-None-Match request header matches resource ETag.')