def got_end_of_body(self): if self.request: utils.safe_seek(self.request.body, 0) prettyprintbody(self.request, "<") self.parent.got_request(self, self.request) self.request = None else: self.close()
def got_end_of_body(self): if self.requests: request = self.requests.popleft() utils.safe_seek(request.response.body, 0) prettyprintbody(request.response, "<") self.parent.got_response(self, request, request.response) if (request["connection"] == "close" or request.response["connection"] == "close"): self.close() else: self.close()
def serialize_body(self): prettyprintbody(self, ">") return self.body