Amos Jeffries, le mer. 14 janv. 2026 11:47:31 +1300, a ecrit: > On 14/01/2026 11:23, Samuel Thibault wrote: > > Amos Jeffries, le mer. 14 janv. 2026 10:50:45 +1300, a ecrit: > > > Per my earlier reply, I do advise keeping the HEAD initial request. > > > > I don't see the use of it. You have no guarantee that the GET will get > > the same server response header. > > It is a bandwidth efficient way to detect and handle 3xx/4xx/5xx status.
? This is not what httpfs uses it for. It uses it for just for netfs_attempt_read to be able to ignore the header returned by GET. > The way the translator is currently implemented with different TCP > connections for HEAD and GET is almost guaranteed to hit different servers > with potentially different response headers. And thus you don't want to make to requests, just one. > Moving to keep-alive on the same TCP connection ensures the same server > supplies both HEAD and GET. Thus, flipping the probability to almost > certainly having the same headers on both. Not quite guarantee, but much > better than the current code. My point is that we should just make the code *not* have to rely on such guarantee. You can just GET, and in netfs_attempt_read drop the server response header. Samuel
