It seems like http.Client's CheckRedirect hook only populates the
via[n].Response for n>0 (i.e., not for the first hop). This is useful if,
for instance, you want to check the status code (301, 302, etc) of each
redirect.

Here's a playground demo: https://play.golang.org/p/cKoWVhdjKwf

I can file an issue, but I feel like I'm missing something, because this is
the most obvious thing to want to do with CheckRedirect and nobody else
seems to have complained about it. Can someone clue me in?

Caleb

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to