[issue21790] Change blocksize in http.client to the value of resource.getpagesize

Clay Gerrard report at bugs.python.org
Mon May 1 14:13:15 EDT 2017


Clay Gerrard added the comment:

I don't think the default is bad/wrong so much as it's an inflexible magic number.

I think blocksize should be parameterized as an attribute on the connection - or at least a class attribute or module level constant so we can monkey patch it without having to create a subclass and redefine the *entire* send method (!?).

Not having a good string to pull at here is causing a non-trivial amount of pain:

https://github.com/sigmavirus24/requests-toolbelt/pull/84/files
https://github.com/sigmavirus24/requests-toolbelt/issues/75
https://webcache.googleusercontent.com/search?q=cache:WPSngjyUzg4J:https://technology.jana.com/2015/12/30/dont-use-python-httplib-or-any-library-that-uses-it-to-transfer-large-files-especially-to-china/+&cd=5&hl=en&ct=clnk&gl=us
https://bugs.launchpad.net/python-swiftclient/+bug/1671621

----------
nosy: +Clay Gerrard

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21790>
_______________________________________


More information about the Python-bugs-list mailing list