python - Can i inherit the twisted.web.http.Request.requestReceived? -
can inherit twisted.web.http.request.requestreceived ??
in comment, said "this method not intended users".
i has inherited rawdatareceived , this:
def rawdatareceived(self, data): self.resettimeout() if len(data) < self.length: self.requests[-1].content.send(data) self.length = self.length - len(data) else: self.requests[-1].content.send(data[:self.length]) self._finishrequestbody(data[self.length:])
the self.requests[-1].content.send(data)
send data in http connection. in fact, use httplib here.
all goes well, doesn't work @ last step in allcontentreceived. , it's req.requestreceived(command, path, version).
so can inherit method requestreceived. or go wrong?
my code here. can download if want me.
Comments
Post a Comment