<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Http on Kuldeep Pisda</title><link>https://kdpisda.in/tag/http/</link><description>Recent content in Http on Kuldeep Pisda</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 15 Oct 2026 08:30:00 +0530</lastBuildDate><atom:link href="https://kdpisda.in/tag/http/index.xml" rel="self" type="application/rss+xml"/><item><title>Go 1.27 Drains Unread HTTP/1 Bodies for 50 ms, and the Next Request Does Not Wait for It</title><link>https://kdpisda.in/go-1-27-http1-unread-body-drain-connection-reuse/</link><pubDate>Thu, 15 Oct 2026 08:30:00 +0530</pubDate><guid>https://kdpisda.in/go-1-27-http1-unread-body-drain-connection-reuse/</guid><description>&lt;p&gt;Go 1.27 changes what &lt;code&gt;resp.Body.Close()&lt;/code&gt; does when the body was not read to the end on an HTTP/1 connection. Through Go 1.26 the Transport threw the connection away. In 1.27 it drains the rest of the body in the background and, if that finishes in time, returns the connection to the idle pool. The &lt;a href="https://go.dev/blog/http-connection-reuse"&gt;Go blog post&lt;/a&gt; describes the change and reports about 710 ms on Go 1.26 versus about 150 ms on Go 1.27 for 100 sequential calls against index.golang.org with &lt;code&gt;GODEBUG=http2client=0&lt;/code&gt;. That is the Go team&amp;rsquo;s number from one machine, with no run count or variance given. I did not reproduce it against a remote host. What I did was measure where the drain stops working, because those limits decide how much of your own workaround code is now dead.&lt;/p&gt;</description></item></channel></rss>