On redirect, only copy headers when they don't already exist in the redirected request
On redirect, only copy headers when they don't already exist in the redirected request

A changeset under consideration for Go 1.7 would automatically copy
headers on redirect. This change future-proofs our code so we won't make
duplicate copies of the headers if net/http does it automatically in the
future.

Signed-off-by: Aaron Lehmann <8ecfc6017a87905413dcd7d63696a2a4c351b604@docker.com>

aduermael/docker.github.io,shin-/docker.github.io,troy0820/docker.github.io,troy0820/docker.github.io,shubheksha/docker.github.io,docker/distribution,londoncalling/docker.github.io,JimGalasyn/docker.github.io,aduermael/docker.github.io,thaJeztah/docker.github.io,denverdino/docker.github.io,docker/docker.github.io,bdwill/docker.github.io,stevvooe/distribution,jwhonce/distribution,docker-zh/docker.github.io,joeuo/docker.github.io,alexisbellido/docker.github.io,bdwill/docker.github.io,thaJeztah/docker.github.io,jzwlqx/distribution,hopkings2008/distribution,dobril-stanga/distribution,sanscontext/docker.github.io,danix800/docker.github.io,shyr/distribution,gdevillele/docker.github.io,moxiegirl/distribution,aprajshekhar/distribution,londoncalling/docker.github.io,miminar/distribution,bdwill/docker.github.io,schu/distribution,schu/distribution,jzwlqx/distribution,danix800/docker.github.io,sanscontext/docker.github.io,phiroict/docker,johnstep/docker.github.io,docker/docker.github.io,alexisbellido/docker.github.io,menglingwei/denverdino.github.io,docker-zh/docker.github.io,kmala/distribution,aduermael/docker.github.io,jzwlqx/denverdino.github.io,johnstep/docker.github.io,denverdino/denverdino.github.io,thaJeztah/distribution,andrewnguyen/distribution,genedock/distribution,sanscontext/docker.github.io,denverdino/docker.github.io,mattrgreen/distribution,xiekeyang/distribution,joeuo/docker.github.io,JimGalasyn/docker.github.io,BSWANG/denverdino.github.io,jlhawn/distribution,cyli/distribution,nwt/distribution,moxiegirl/distribution,sergeyfd/distribution,anweiss/docker.github.io,andrewnguyen/distribution,joeuo/docker.github.io,menglingwei/denverdino.github.io,denverdino/denverdino.github.io,joaofnfernandes/docker.github.io,londoncalling/docker.github.io,docker/docker.github.io,estesp/distribution,jzwlqx/denverdino.github.io,dobril-stanga/distribution,anweiss/docker.github.io,thaJeztah/docker.github.io,estesp/distribution,menglingwei/denverdino.github.io,rillig/docker.github.io,dmcgowan/distribution,rillig/docker.github.io,xiekeyang/distribution,harrisonfeng/distribution,denverdino/denverdino.github.io,konstruktoid/distribution,docker/distribution,shubheksha/docker.github.io,joaofnfernandes/docker.github.io,LuisBosquez/docker.github.io,rillig/docker.github.io,hopkings2008/distribution,anweiss/docker.github.io,shin-/docker.github.io,deis/distribution,noxiouz/distribution,BrianBland/distribution,shin-/docker.github.io,huamai-io/distribution,denverdino/docker.github.io,denverdino/denverdino.github.io,sadlil/distribution,docker-zh/docker.github.io,JimGalasyn/docker.github.io,konstruktoid/distribution,gdevillele/docker.github.io,vdemeester/distribution,manoj535/distribution,spacexnice/distribution,johnstep/docker.github.io,troy0820/docker.github.io,shubheksha/docker.github.io,rillig/docker.github.io,johnstep/docker.github.io,RichardScothern/distribution,liubin/distribution,sanscontext/docker.github.io,denverdino/docker.github.io,joeuo/docker.github.io,harrisonfeng/distribution,JimGalasyn/docker.github.io,danix800/docker.github.io,yuwaMSFT2/distribution,huamai-io/distribution,konnase/distribution,jzwlqx/denverdino.github.io,bdwill/docker.github.io,jzwlqx/denverdino.github.io,gdevillele/docker.github.io,BSWANG/denverdino.github.io,denverdino/denverdino.github.io,anweiss/docker.github.io,gdevillele/docker.github.io,sanscontext/docker.github.io,sebrandon1/distribution,stevvooe/distribution,mbentley/distribution,danix800/docker.github.io,phiroict/docker,joeuo/docker.github.io,sadlil/distribution,alexisbellido/docker.github.io,londoncalling/docker.github.io,thaJeztah/docker.github.io,docker/docker.github.io,sergeyfd/distribution,shin-/docker.github.io,rbarlow/distribution,LuisBosquez/docker.github.io,konnase/distribution,aaronlehmann/distribution,BSWANG/denverdino.github.io,nwt/distribution,troy0820/docker.github.io,denverdino/docker.github.io,aaronlehmann/distribution,joaofnfernandes/docker.github.io,docker-zh/docker.github.io,mbentley/distribution,jlhawn/distribution,johnstep/docker.github.io,bdwill/docker.github.io,phiroict/docker,mattrgreen/distribution,aprajshekhar/distribution,JimGalasyn/docker.github.io,shyr/distribution,docker-zh/docker.github.io,Seb-Solon/distribution,shubheksha/docker.github.io,dmcgowan/distribution,docker/docker.github.io,alexisbellido/docker.github.io,shin-/docker.github.io,LuisBosquez/docker.github.io,vdemeester/distribution,spacexnice/distribution,joaofnfernandes/docker.github.io,sebrandon1/distribution,Seb-Solon/distribution,LuisBosquez/docker.github.io,miminar/distribution,liubin/distribution,jwhonce/distribution,deis/distribution,LuisBosquez/docker.github.io,phiroict/docker,mikebrow/distribution,thaJeztah/docker.github.io,genedock/distribution,duglin/distribution,alexisbellido/docker.github.io,RichardScothern/distribution,menglingwei/denverdino.github.io,shubheksha/docker.github.io,yuwaMSFT2/distribution,aduermael/docker.github.io,phiroict/docker,BSWANG/denverdino.github.io,mikebrow/distribution,kmala/distribution,londoncalling/docker.github.io,gdevillele/docker.github.io,duglin/distribution,thaJeztah/distribution,noxiouz/distribution,cezarsa/distribution,manoj535/distribution,BSWANG/denverdino.github.io,anweiss/docker.github.io,cyli/distribution,BrianBland/distribution,cezarsa/distribution,rbarlow/distribution,jzwlqx/denverdino.github.io,joaofnfernandes/docker.github.io,menglingwei/denverdino.github.io