Handle https proxy's CONNECT response
Handle https proxy's CONNECT response

When using a https proxy, an extra HTTP 200 header will be generated.
So we can't rely on detecting the first http header.

$curlHeaders with https proxy:
"HTTP/1.0 200 Connection established  <-- the https proxy's response

HTTP/1.1 307 Temporary Redirect
...
"

See https://stackoverflow.com/a/34537988/889429

Fixes #34131

Signed-off-by: Jacob Wen <7568f2e94ed170d8618606da6292179f0e1b678f@oracle.com>

miminar/docker,nalind/docker,laijs/docker,scotttlin/docker,madhanrm/docker,laijs/moby,mixja/docker,noironetworks/docker,pradipd/moby,ibuildthecloud/docker,miminar/docker,sterchelen/docker,unclejack/docker,moby/moby,kojiromike/docker,AkihiroSuda/docker,duglin/docker,cyphar/docker,srust/docker,vdemeester/docker,yosifkit/docker,coolljt0725/docker,pramodhkp/moby,jthelin/docker,dsheets/moby,scotttlin/docker,raja-sami-10p/moby,KarthikNayak/docker,yongtang/docker,dims/docker,moul/docker,madhanrm/docker,YuPengZTE/docker,amatsus/docker,kojiromike/docker,paralin/docker,ibuildthecloud/docker,pradipd/moby,nalind/docker,dsheets/moby,mahak/docker,moul/docker,kolyshkin/moby,cpuguy83/docker,vdemeester/docker,djs55/docker,nalind/docker,naveed-jamil-tenpearls/moby,KingEmet/docker,laijs/moby,konstruktoid/docker-1,Mokolea/docker,shishir-a412ed/docker,cpuguy83/docker,Mokolea/docker,ibuildthecloud/docker,crosbymichael/docker,mixja/docker,cyphar/docker,liaoqingwei/docker,moby/moby,jvanz/docker,dmcgowan/docker,x1022as/docker,dims/docker,x1022as/docker,nawawi/docker,mike1729/docker,AkihiroSuda/docker,gnailuy/docker,ripcurld0/moby,unclejack/docker,docker/docker,moby/moby,rancher/docker,Ramzec/docker,moul/docker,nalind/docker,kolyshkin/docker,danyalKhaliq10p/moby,flavio/docker,jimjag/docker,dccurtis/docker,dims/docker,liaoqingwei/docker,yosifkit/docker,yummypeng/docker,rremer/moby,crosbymichael/docker,tklauser/docker,justincormack/docker,paralin/docker,ripcurld0/moby,jvanz/docker,cyphar/docker,gnailuy/docker,rancher/docker,rancher/docker,konstruktoid/docker-upstream,SvenDowideit/docker,djs55/docker,mkumatag/docker,rremer/moby,tonistiigi/docker,mike1729/docker,jwhonce/docker,jlhawn/docker,shishir-a412ed/docker,bearstech/moby,KarthikNayak/docker,flavio/docker,hqhq/moby,docker/docker,naveed-jamil-tenpearls/moby,whuwxl/docker,ripcurld0/moby,haveatry/docker,jimjag/docker,duglin/docker,YuPengZTE/docker,fcrisciani/docker,jlhawn/docker,pramodhkp/moby,Mokolea/docker,mikebrow/docker,shishir-a412ed/docker,paralin/docker,dmcgowan/docker,rhatdan/docker,jvanz/docker,ibuildthecloud/docker,KingEmet/docker,nawawi/docker,rhatdan/docker,johnstep/moby-moby,allencloud/docker,konstruktoid/docker-1,laijs/docker,mahak/docker,trebonian/docker,flavio/docker,tklauser/docker,SvenDowideit/docker,tonistiigi/docker,coreos/docker,ndeloof/docker,trebonian/docker,dsheets/moby,kojiromike/docker,PatrickLang/moby,liaoqingwei/docker,coreos/docker,bearstech/moby,estesp/docker,sterchelen/docker,maxamillion/docker,estesp/docker,laijs/docker,hqhq/moby,gnailuy/docker,x1022as/docker,dccurtis/docker,unclejack/docker,tklauser/docker,docker/docker,jimjag/docker,estesp/docker,sterchelen/docker,konstruktoid/docker-1,thaJeztah/docker,mikebrow/docker,ndeloof/docker,mike1729/docker,thaJeztah/docker,hqhq/moby,jwhonce/docker,moby/moby,madhanrm/docker,PatrickLang/moby,konstruktoid/docker-upstream,danyalKhaliq10p/moby,YuPengZTE/docker,yongtang/docker,yummypeng/docker,tmp6154/docker,moul/docker,mahak/docker,laijs/moby,mkumatag/docker,paralin/docker,trebonian/docker,cpuguy83/docker,rhatdan/docker,KarthikNayak/docker,kolyshkin/docker,flavio/docker,amatsus/docker,thaJeztah/docker,trebonian/docker,mixja/docker,AkihiroSuda/docker,jameszhan/docker,pradipd/moby,ndeloof/docker,mahak/docker,tonistiigi/docker,vdemeester/docker,nawawi/docker,Ramzec/docker,mkumatag/docker,tophj-ibm/docker,allencloud/docker,jthelin/docker,thaJeztah/docker,PatrickLang/moby,yosifkit/docker,justincormack/docker,rremer/moby,johnstep/moby-moby,maxamillion/docker,raja-sami-10p/moby,pramodhkp/moby,amatsus/docker,naveed-jamil-tenpearls/moby,mikebrow/docker,srust/docker,bearstech/moby,KingEmet/docker,SvenDowideit/docker,haveatry/docker,bearstech/moby,kolyshkin/moby,jimjag/docker,jwhonce/docker,Ramzec/docker,dccurtis/docker,tmp6154/docker,allencloud/docker,tophj-ibm/docker,justincormack/docker,yongtang/docker,noironetworks/docker,crosbymichael/docker,jlhawn/docker,cpuguy83/docker,whuwxl/docker,tophj-ibm/moby,maxamillion/docker,yummypeng/docker,jameszhan/docker,dmcgowan/docker,Mokolea/docker,danyalKhaliq10p/moby,yosifkit/docker,noironetworks/docker,konstruktoid/docker-upstream,tophj-ibm/moby,gnailuy/docker,tophj-ibm/moby,coreos/docker,fcrisciani/docker,scotttlin/docker,johnstep/moby-moby,tophj-ibm/docker,jameszhan/docker,haveatry/docker,Ramzec/docker,duglin/docker,coolljt0725/docker,nawawi/docker,whuwxl/docker,coolljt0725/docker,tmp6154/docker,AkihiroSuda/docker,miminar/docker,fcrisciani/docker,djs55/docker,srust/docker,konstruktoid/docker-upstream,raja-sami-10p/moby,ibuildthecloud/docker,kolyshkin/moby