'Returns the ``Content-Type`` header to be used for this request.
.. versionadded:: 3.1'

def get_content_type(self):

    (mime_type, encoding) = mimetypes.guess_type(self.absolute_path)
    if (encoding == 'gzip'):
        return 'application/gzip'
    elif (encoding is not None):
        return 'application/octet-stream'
    elif (mime_type is not None):
        return mime_type
    else:
        return 'application/octet-stream'
