Returns the ``Content-Type`` header to be used for this request.

def get_content_type(self):
        """
        Returns the ``Content-Type`` header to be used for this request.
        """
        mime_type, encoding = mimetypes.guess_type(self.filepath)
        if encoding == "gzip":
            return "application/gzip"
        elif encoding is not None:
            return "application/octet-stream"
        elif mime_type is not None:
            return mime_type
        # if mime_type not detected, use application/octet-stream
        else:
            return "application/octet-stream"