On 05/05/2017 10:26 AM, Phil Mayers wrote:
On 04/05/17 16:30, Nagy, Attila wrote:
I would like to use the simplest (and correct of course) solution.
Juggling with buffering/data by hand seems even more risky to me.
The problem with the approach you've outlined is that it treats the
transport (a private member) in ways that I suspect are invalid. In
particular there's no handling of the length of the object or chunked
encodings - I suspect what you're doing will only work on simple HTTP
requests with no connection reuse.
What possible side effects do you see here? What problems could it cause?
So far I've tried to copy a lot of files in parallel, arbitrarily drop
connections. Everything seems OK.
The file is either transferred in its entirety or (in case of dropped
connections) not.
Your implementation seems to do things which twisted should do, which
(also) doesn't seem to be right. :)
It would be nice if this could be solved in an elegant way.
On that I completely agree. It could be that there's some simple idiom
or built-in code for this that I'm unaware of.
I couldn't find a complete example for this task, so it would be nice if
somebody more experienced could share the secret of doing this right and
nice. :)
Thanks,
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python