'Makes sure that self.http_headers is consistent with self.mime_type.
Assumes self is a static handler i.e. either self.static_dir or
self.static_files is set (to not None).
Raises:
appinfo_errors.ContentTypeSpecifiedMultipleTimes: Raised when
self.http_headers contains a Content-Type header, and self.mime_type is
set. For example, the following configuration would be rejected:
handlers:
- url: /static
static_dir: static
mime_type: text/html
http_headers:
content-type: text/html
As this example shows, a configuration will be rejected when
http_headers and mime_type specify a content type, even when they
specify the same content type.'

def AssertUniqueContentType(self):

    used_both_fields = (self.mime_type and self.http_headers)
    if (not used_both_fields):
        return
    content_type = self.http_headers.Get('Content-Type')
    if (content_type is not None):
        raise appinfo_errors.ContentTypeSpecifiedMultipleTimes(('http_header    specified    a    Content-Type    header    of    %r    in    a    handler    that    also    specified    a    mime_type    of    %r.' % (content_type, self.mime_type)))
