decoder.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:flickr_downloader 作者: Denisolt 项目源码 文件源码
def __init__(self, content, encoding):
        self.encoding = encoding
        headers = {}
        # Split into header section (if any) and the content
        if b'\r\n\r\n' in content:
            first, self.content = _split_on_find(content, b'\r\n\r\n')
            if first != b'':
                headers = _header_parser(first.lstrip(), encoding)
        else:
            raise ImproperBodyPartContentException(
                'content does not contain CR-LF-CR-LF'
            )
        self.headers = CaseInsensitiveDict(headers)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号