def _header_callback(self, buf):
        if self._logfile:
            self._logfile.write(buf)
        if buf.startswith("HTTP"):
            if self._responseline and self._responseline.find("302") >= 0:
                self._headers = [] # clear headers if redirected.
            self._responseline = buf
        else:
            self._headers.append(buf)
dataset/ETHPy150Open kdart/pycopia/WWW/pycopia/WWW/client.py/HTTPResponse._header_callback/original