• Eivind Uggedal's avatar
    http: make HEAD client request follow redirects · 092f34fe
    Eivind Uggedal authored
    HEAD requests should in my opinion have the ability to follow redirects
    like the implementation of GET requests does. My use case is polling
    several thousand severs to check if they respond with 200 status codes.
    Using GET requests is neither efficient in running time of the task nor
    for bandwidth consumption.
    
    This suggested patch changes the return signature of http.Head() to match
    that of http.Get(), providing the final URL in a redirect chain.
    
    `curl -IL http://google.com` follows redirects with HEAD requests just fine.
    
    Fixes #1806.
    
    R=golang-dev, bradfitz, rsc
    CC=golang-dev
    https://golang.org/cl/4517058
    092f34fe
Name
Last commit
Last update
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.ccmd Loading commit data...
Make.clib Loading commit data...
Make.cmd Loading commit data...
Make.common Loading commit data...
Make.inc Loading commit data...
Make.pkg Loading commit data...
all-qemu.bash Loading commit data...
all.bash Loading commit data...
clean.bash Loading commit data...
env.bash Loading commit data...
make.bash Loading commit data...
quietgcc.bash Loading commit data...
run.bash Loading commit data...
sudo.bash Loading commit data...
version.bash Loading commit data...