keepalive.py 文件源码

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

项目:autoscan 作者: b01u 项目源码 文件源码
def endheaders(self):
        """Indicate that the last header line has been sent to the server."""

        if self.__state == _CS_REQ_STARTED:
            self.__state = _CS_REQ_SENT
        else:
            raise CannotSendHeader()

        for header in ('Host', 'Accept-Encoding'):
            if header in self._headers:
                str = '%s: %s' % (header, self._headers[header])
                self._output(str)
                del self._headers[header]

        for header, value in self._headers.items():
            str = '%s: %s' % (header, value)
            self._output(str)

        self._send_output()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号