def __init__(self, parent, piece_size, urlage, connection, id, outgoing): self.piece_size = piece_size self._header_lines = [] self.manual_close = False self.urlage = urlage self.batch_requests = BatchRequests() # pipeline tracker self.request_paths = [] scheme, host, path, params, query, fragment = urlparse(id) if path and path[0] == '/': path = path[1:] self.host = host self.prefix = path self.append = not(len(self.urlage.ranges) == 1 and path and path[-1] != '/') Connection.__init__(self, parent, connection, id, outgoing)
def close(self): self.manual_close = True Connection.close(self)