New submission from Christian Heimes <>: changed how http.client sends request. 
endheaders() no longer sends header and message body in one TCP package if the 
total payload is smaller than TCP max segment size. uses 
two send calls to send header and body. This causes very simple HTTP servers in 
embedded devices to fail.

Matthew Garrett noticed the bug, see /

We should try to send requests as one TCP package again. TCP_CORK may do the 
trick. Or we should fix our custom implementation of send. It has multiple 
issues, e.g. a fixed buffer. The buffer size is suboptimal for small MTU and 
jumbo frames.

components: Library (Lib)
keywords: 3.5regression
messages: 313743
nosy: benjamin.peterson, christian.heimes
priority: normal
severity: normal
status: open
title: http.client no longer sends HTTP request in one TCP package
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

Python tracker <>
Python-bugs-list mailing list

Reply via email to