proxy: on error, only send 503 if headers not sent
proxy: on error, only send 503 if headers not sent

Otherwise there's an ugly "Can't render headers after they are sent to
the client" crash.

Fixes #4253. Fixes #4750.

somallg/meteor,arunoda/meteor,luohuazju/meteor,benstoltz/meteor,saisai/meteor,lorensr/meteor,shadedprofit/meteor,qscripter/meteor,aldeed/meteor,lpinto93/meteor,evilemon/meteor,vacjaliu/meteor,daltonrenaldo/meteor,cherbst/meteor,elkingtonmcb/meteor,guazipi/meteor,luohuazju/meteor,colinligertwood/meteor,Urigo/meteor,jdivy/meteor,tdamsma/meteor,DAB0mB/meteor,vacjaliu/meteor,mjmasn/meteor,cog-64/meteor,judsonbsilva/meteor,newswim/meteor,akintoey/meteor,whip112/meteor,udhayam/meteor,HugoRLopes/meteor,servel333/meteor,brdtrpp/meteor,mubassirhayat/meteor,brettle/meteor,qscripter/meteor,daslicht/meteor,shmiko/meteor,IveWong/meteor,justintung/meteor,imanmafi/meteor,ndarilek/meteor,yonas/meteor-freebsd,guazipi/meteor,akintoey/meteor,dev-bobsong/meteor,Paulyoufu/meteor-1,lpinto93/meteor,iman-mafi/meteor,wmkcc/meteor,ashwathgovind/meteor,dboyliao/meteor,iman-mafi/meteor,dfischer/meteor,Profab/meteor,vacjaliu/meteor,henrypan/meteor,vjau/meteor,esteedqueen/meteor,chasertech/meteor,shmiko/meteor,daltonrenaldo/meteor,fashionsun/meteor,neotim/meteor,arunoda/meteor,aldeed/meteor,yalexx/meteor,eluck/meteor,evilemon/meteor,yonglehou/meteor,brettle/meteor,namho102/meteor,williambr/meteor,Puena/meteor,sitexa/meteor,bhargav175/meteor,namho102/meteor,codedogfish/meteor,shmiko/meteor,dandv/meteor,Profab/meteor,brdtrpp/meteor,youprofit/meteor,paul-barry-kenzan/meteor,daslicht/meteor,lorensr/meteor,meonkeys/meteor,Jeremy017/meteor,qscripter/meteor,newswim/meteor,udhayam/meteor,jdivy/meteor,oceanzou123/meteor,aramk/meteor,codingang/meteor,colinligertwood/meteor,emmerge/meteor,fashionsun/meteor,calvintychan/meteor,Prithvi-A/meteor,SeanOceanHu/meteor,karlito40/meteor,meteor-velocity/meteor,mjmasn/meteor,tdamsma/meteor,qscripter/meteor,justintung/meteor,chmac/meteor,codingang/meteor,cherbst/meteor,TechplexEngineer/meteor,modulexcite/meteor,allanalexandre/meteor,fashionsun/meteor,cherbst/meteor,benstoltz/meteor,arunoda/meteor,yonas/meteor-freebsd,AlexR1712/meteor,cherbst/meteor,aldeed/meteor,meonkeys/meteor,emmerge/meteor,steedos/meteor,johnthepink/meteor,yinhe007/meteor,ljack/meteor,akintoey/meteor,calvintychan/meteor,D1no/meteor,somallg/meteor,Urigo/meteor,namho102/meteor,ericterpstra/meteor,eluck/meteor,daltonrenaldo/meteor,sitexa/meteor,mauricionr/meteor,rozzzly/meteor,shmiko/meteor,ndarilek/meteor,kengchau/meteor,hristaki/meteor,somallg/meteor,vacjaliu/meteor,allanalexandre/meteor,Theviajerock/meteor,jg3526/meteor,modulexcite/meteor,AlexR1712/meteor,hristaki/meteor,yanisIk/meteor,AnthonyAstige/meteor,bhargav175/meteor,meteor-velocity/meteor,Eynaliyev/meteor,mirstan/meteor,sclausen/meteor,iman-mafi/meteor,youprofit/meteor,kengchau/meteor,luohuazju/meteor,DAB0mB/meteor,cherbst/meteor,SeanOceanHu/meteor,whip112/meteor,h200863057/meteor,IveWong/meteor,rozzzly/meteor,dandv/meteor,ashwathgovind/meteor,alexbeletsky/meteor,h200863057/meteor,henrypan/meteor,eluck/meteor,yalexx/meteor,sclausen/meteor,rabbyalone/meteor,brettle/meteor,yinhe007/meteor,Theviajerock/meteor,yyx990803/meteor,iman-mafi/meteor,kencheung/meteor,Profab/meteor,chiefninew/meteor,oceanzou123/meteor,papimomi/meteor,HugoRLopes/meteor,newswim/meteor,newswim/meteor,nuvipannu/meteor,msavin/meteor,esteedqueen/meteor,IveWong/meteor,justintung/meteor,sunny-g/meteor,evilemon/meteor,neotim/meteor,shrop/meteor,dev-bobsong/meteor,whip112/meteor,yonglehou/meteor,youprofit/meteor,baysao/meteor,neotim/meteor,EduShareOntario/meteor,brettle/meteor,colinligertwood/meteor,henrypan/meteor,whip112/meteor,elkingtonmcb/meteor,alexbeletsky/meteor,lassombra/meteor,lpinto93/meteor,mjmasn/meteor,baiyunping333/meteor,rabbyalone/meteor,zdd910/meteor,servel333/meteor,fashionsun/meteor,AlexR1712/meteor,Ken-Liu/meteor,neotim/meteor,vjau/meteor,dfischer/meteor,papimomi/meteor,michielvanoeffelen/meteor,judsonbsilva/meteor,PatrickMcGuinness/meteor,Puena/meteor,sdeveloper/meteor,youprofit/meteor,AnthonyAstige/meteor,iman-mafi/meteor,meonkeys/meteor,michielvanoeffelen/meteor,karlito40/meteor,zdd910/meteor,ericterpstra/meteor,mubassirhayat/meteor,D1no/meteor,yanisIk/meteor,katopz/meteor,bhargav175/meteor,joannekoong/meteor,D1no/meteor,dandv/meteor,jg3526/meteor,allanalexandre/meteor,jdivy/meteor,mjmasn/meteor,aleclarson/meteor,4commerce-technologies-AG/meteor,mirstan/meteor,Jeremy017/meteor,zdd910/meteor,karlito40/meteor,ljack/meteor,yalexx/meteor,emmerge/meteor,Jeremy017/meteor,fashionsun/meteor,D1no/meteor,luohuazju/meteor,ashwathgovind/meteor,yinhe007/meteor,namho102/meteor,PatrickMcGuinness/meteor,emmerge/meteor,aramk/meteor,daslicht/meteor,iman-mafi/meteor,emmerge/meteor,AnthonyAstige/meteor,deanius/meteor,guazipi/meteor,yalexx/meteor,EduShareOntario/meteor,yiliaofan/meteor,Ken-Liu/meteor,ashwathgovind/meteor,chengxiaole/meteor,Quicksteve/meteor,chiefninew/meteor,Ken-Liu/meteor,hristaki/meteor,udhayam/meteor,codedogfish/meteor,brettle/meteor,rabbyalone/meteor,DAB0mB/meteor,johnthepink/meteor,planet-training/meteor,yyx990803/meteor,dfischer/meteor,alexbeletsky/meteor,Quicksteve/meteor,SeanOceanHu/meteor,deanius/meteor,tdamsma/meteor,Urigo/meteor,steedos/meteor,williambr/meteor,baysao/meteor,kengchau/meteor,chmac/meteor,saisai/meteor,nuvipannu/meteor,lawrenceAIO/meteor,oceanzou123/meteor,shrop/meteor,joannekoong/meteor,cbonami/meteor,Jeremy017/meteor,Ken-Liu/meteor,chengxiaole/meteor,mirstan/meteor,chasertech/meteor,sdeveloper/meteor,h200863057/meteor,vacjaliu/meteor,Hansoft/meteor,yinhe007/meteor,judsonbsilva/meteor,youprofit/meteor,sunny-g/meteor,yonas/meteor-freebsd,henrypan/meteor,akintoey/meteor,aleclarson/meteor,ndarilek/meteor,shrop/meteor,Profab/meteor,eluck/meteor,dev-bobsong/meteor,daslicht/meteor,fashionsun/meteor,IveWong/meteor,zdd910/meteor,colinligertwood/meteor,namho102/meteor,jg3526/meteor,michielvanoeffelen/meteor,allanalexandre/meteor,Prithvi-A/meteor,lawrenceAIO/meteor,tdamsma/meteor,elkingtonmcb/meteor,chiefninew/meteor,DAB0mB/meteor,AnthonyAstige/meteor,deanius/meteor,yalexx/meteor,tdamsma/meteor,justintung/meteor,framewr/meteor,rozzzly/meteor,steedos/meteor,saisai/meteor,Paulyoufu/meteor-1,msavin/meteor,papimomi/meteor,wmkcc/meteor,kidaa/meteor,chiefninew/meteor,emmerge/meteor,rabbyalone/meteor,TechplexEngineer/meteor,daltonrenaldo/meteor,kencheung/meteor,justintung/meteor,baiyunping333/meteor,servel333/meteor,codingang/meteor,servel333/meteor,Hansoft/meteor,lawrenceAIO/meteor,ndarilek/meteor,nuvipannu/meteor,elkingtonmcb/meteor,qscripter/meteor,daltonrenaldo/meteor,brdtrpp/meteor,shmiko/meteor,rozzzly/meteor,bhargav175/meteor,mauricionr/meteor,yalexx/meteor,chasertech/meteor,joannekoong/meteor,cbonami/meteor,kidaa/meteor,esteedqueen/meteor,rozzzly/meteor,imanmafi/meteor,oceanzou123/meteor,michielvanoeffelen/meteor,sunny-g/meteor,lorensr/meteor,kidaa/meteor,kidaa/meteor,Theviajerock/meteor,johnthepink/meteor,newswim/meteor,deanius/meteor,Hansoft/meteor,TechplexEngineer/meteor,meteor-velocity/meteor,Puena/meteor,calvintychan/meteor,lawrenceAIO/meteor,jeblister/meteor,yanisIk/meteor,jdivy/meteor,luohuazju/meteor,TechplexEngineer/meteor,brettle/meteor,allanalexandre/meteor,shadedprofit/meteor,yanisIk/meteor,4commerce-technologies-AG/meteor,modulexcite/meteor,somallg/meteor,ljack/meteor,Eynaliyev/meteor,DAB0mB/meteor,mauricionr/meteor,emmerge/meteor,Prithvi-A/meteor,alexbeletsky/meteor,mubassirhayat/meteor,Ken-Liu/meteor,chengxiaole/meteor,sdeveloper/meteor,sclausen/meteor,jeblister/meteor,AnthonyAstige/meteor,servel333/meteor,udhayam/meteor,cherbst/meteor,Quicksteve/meteor,steedos/meteor,arunoda/meteor,alexbeletsky/meteor,framewr/meteor,aramk/meteor,chiefninew/meteor,mubassirhayat/meteor,devgrok/meteor,chmac/meteor,juansgaitan/meteor,brdtrpp/meteor,akintoey/meteor,yonas/meteor-freebsd,vjau/meteor,yiliaofan/meteor,rozzzly/meteor,dboyliao/meteor,yyx990803/meteor,Eynaliyev/meteor,SeanOceanHu/meteor,HugoRLopes/meteor,brettle/meteor,calvintychan/meteor,dandv/meteor,rabbyalone/meteor,lawrenceAIO/meteor,planet-training/meteor,yiliaofan/meteor,udhayam/meteor,ashwathgovind/meteor,HugoRLopes/meteor,bhargav175/meteor,framewr/meteor,kidaa/meteor,benstoltz/meteor,DCKT/meteor,hristaki/meteor,judsonbsilva/meteor,benstoltz/meteor,EduShareOntario/meteor,kengchau/meteor,vjau/meteor,vjau/meteor,benstoltz/meteor,codingang/meteor,Puena/meteor,lawrenceAIO/meteor,yiliaofan/meteor,mubassirhayat/meteor,neotim/meteor,framewr/meteor,h200863057/meteor,dandv/meteor,saisai/meteor,Theviajerock/meteor,SeanOceanHu/meteor,yinhe007/meteor,paul-barry-kenzan/meteor,ndarilek/meteor,kencheung/meteor,codedogfish/meteor,yyx990803/meteor,vjau/meteor,Ken-Liu/meteor,Prithvi-A/meteor,imanmafi/meteor,baysao/meteor,jeblister/meteor,yonas/meteor-freebsd,Paulyoufu/meteor-1,mauricionr/meteor,brdtrpp/meteor,baiyunping333/meteor,Eynaliyev/meteor,bhargav175/meteor,brdtrpp/meteor,ndarilek/meteor,hristaki/meteor,Quicksteve/meteor,yonglehou/meteor,michielvanoeffelen/meteor,mjmasn/meteor,nuvipannu/meteor,yinhe007/meteor,ericterpstra/meteor,judsonbsilva/meteor,aldeed/meteor,aldeed/meteor,cbonami/meteor,Jeremy017/meteor,cog-64/meteor,planet-training/meteor,PatrickMcGuinness/meteor,baysao/meteor,modulexcite/meteor,hristaki/meteor,DAB0mB/meteor,sclausen/meteor,katopz/meteor,cherbst/meteor,cog-64/meteor,jdivy/meteor,williambr/meteor,jdivy/meteor,yanisIk/meteor,framewr/meteor,yonglehou/meteor,wmkcc/meteor,alexbeletsky/meteor,Prithvi-A/meteor,mjmasn/meteor,planet-training/meteor,meteor-velocity/meteor,4commerce-technologies-AG/meteor,papimomi/meteor,benstoltz/meteor,kencheung/meteor,baiyunping333/meteor,lassombra/meteor,paul-barry-kenzan/meteor,DAB0mB/meteor,justintung/meteor,johnthepink/meteor,mubassirhayat/meteor,iman-mafi/meteor,chmac/meteor,neotim/meteor,udhayam/meteor,katopz/meteor,AlexR1712/meteor,ljack/meteor,codedogfish/meteor,aramk/meteor,lassombra/meteor,ashwathgovind/meteor,dfischer/meteor,DCKT/meteor,esteedqueen/meteor,colinligertwood/meteor,dboyliao/meteor,henrypan/meteor,yanisIk/meteor,wmkcc/meteor,AlexR1712/meteor,qscripter/meteor,Eynaliyev/meteor,whip112/meteor,cbonami/meteor,judsonbsilva/meteor,Jonekee/meteor,chasertech/meteor,planet-training/meteor,Jonekee/meteor,sunny-g/meteor,lorensr/meteor,shmiko/meteor,AlexR1712/meteor,mjmasn/meteor,devgrok/meteor,SeanOceanHu/meteor,Eynaliyev/meteor,daslicht/meteor,servel333/meteor,msavin/meteor,kencheung/meteor,D1no/meteor,justintung/meteor,dboyliao/meteor,wmkcc/meteor,Puena/meteor,jdivy/meteor,TechplexEngineer/meteor,colinligertwood/meteor,lorensr/meteor,guazipi/meteor,sunny-g/meteor,yyx990803/meteor,nuvipannu/meteor,servel333/meteor,juansgaitan/meteor,HugoRLopes/meteor,sitexa/meteor,Jonekee/meteor,4commerce-technologies-AG/meteor,karlito40/meteor,namho102/meteor,evilemon/meteor,sitexa/meteor,Prithvi-A/meteor,yonglehou/meteor,judsonbsilva/meteor,dfischer/meteor,williambr/meteor,ljack/meteor,Paulyoufu/meteor-1,kengchau/meteor,jeblister/meteor,ericterpstra/meteor,yonglehou/meteor,Jonekee/meteor,yyx990803/meteor,AnthonyAstige/meteor,oceanzou123/meteor,lpinto93/meteor,Hansoft/meteor,SeanOceanHu/meteor,mirstan/meteor,paul-barry-kenzan/meteor,4commerce-technologies-AG/meteor,akintoey/meteor,PatrickMcGuinness/meteor,DCKT/meteor,baiyunping333/meteor,baysao/meteor,elkingtonmcb/meteor,baiyunping333/meteor,ericterpstra/meteor,Paulyoufu/meteor-1,jeblister/meteor,oceanzou123/meteor,PatrickMcGuinness/meteor,DCKT/meteor,D1no/meteor,saisai/meteor,sclausen/meteor,jg3526/meteor,dboyliao/meteor,ndarilek/meteor,chmac/meteor,neotim/meteor,mirstan/meteor,chmac/meteor,luohuazju/meteor,arunoda/meteor,Jeremy017/meteor,EduShareOntario/meteor,shadedprofit/meteor,paul-barry-kenzan/meteor,shadedprofit/meteor,EduShareOntario/meteor,katopz/meteor,juansgaitan/meteor,jg3526/meteor,meonkeys/meteor,EduShareOntario/meteor,newswim/meteor,codedogfish/meteor,dev-bobsong/meteor,sunny-g/meteor,Profab/meteor,meonkeys/meteor,guazipi/meteor,benstoltz/meteor,modulexcite/meteor,yalexx/meteor,joannekoong/meteor,calvintychan/meteor,nuvipannu/meteor,dev-bobsong/meteor,TechplexEngineer/meteor,shmiko/meteor,imanmafi/meteor,ericterpstra/meteor,juansgaitan/meteor,hristaki/meteor,chengxiaole/meteor,yyx990803/meteor,dboyliao/meteor,arunoda/meteor,nuvipannu/meteor,Quicksteve/meteor,DCKT/meteor,Theviajerock/meteor,AnthonyAstige/meteor,guazipi/meteor,steedos/meteor,daslicht/meteor,ericterpstra/meteor,shadedprofit/meteor,devgrok/meteor,IveWong/meteor,Profab/meteor,yonglehou/meteor,aramk/meteor,colinligertwood/meteor,HugoRLopes/meteor,Puena/meteor,AlexR1712/meteor,dfischer/meteor,Urigo/meteor,joannekoong/meteor,karlito40/meteor,elkingtonmcb/meteor,williambr/meteor,youprofit/meteor,meonkeys/meteor,calvintychan/meteor,dfischer/meteor,daltonrenaldo/meteor,Urigo/meteor,karlito40/meteor,framewr/meteor,eluck/meteor,whip112/meteor,johnthepink/meteor,Eynaliyev/meteor,kengchau/meteor,deanius/meteor,arunoda/meteor,msavin/meteor,akintoey/meteor,evilemon/meteor,vjau/meteor,juansgaitan/meteor,4commerce-technologies-AG/meteor,PatrickMcGuinness/meteor,rabbyalone/meteor,AnthonyAstige/meteor,katopz/meteor,aleclarson/meteor,alexbeletsky/meteor,sdeveloper/meteor,kencheung/meteor,chiefninew/meteor,dboyliao/meteor,cog-64/meteor,ashwathgovind/meteor,Urigo/meteor,shrop/meteor,meonkeys/meteor,allanalexandre/meteor,cbonami/meteor,wmkcc/meteor,michielvanoeffelen/meteor,jeblister/meteor,juansgaitan/meteor,servel333/meteor,esteedqueen/meteor,lawrenceAIO/meteor,udhayam/meteor,lassombra/meteor,planet-training/meteor,aramk/meteor,chmac/meteor,Hansoft/meteor,deanius/meteor,PatrickMcGuinness/meteor,DCKT/meteor,steedos/meteor,codingang/meteor,sunny-g/meteor,somallg/meteor,devgrok/meteor,johnthepink/meteor,modulexcite/meteor,sclausen/meteor,paul-barry-kenzan/meteor,HugoRLopes/meteor,ljack/meteor,Jeremy017/meteor,elkingtonmcb/meteor,planet-training/meteor,cbonami/meteor,brdtrpp/meteor,shrop/meteor,framewr/meteor,tdamsma/meteor,aldeed/meteor,ljack/meteor,williambr/meteor,lorensr/meteor,deanius/meteor,devgrok/meteor,evilemon/meteor,somallg/meteor,somallg/meteor,meteor-velocity/meteor,cog-64/meteor,katopz/meteor,dandv/meteor,kidaa/meteor,IveWong/meteor,h200863057/meteor,planet-training/meteor,lassombra/meteor,esteedqueen/meteor,newswim/meteor,kidaa/meteor,sitexa/meteor,johnthepink/meteor,Paulyoufu/meteor-1,Prithvi-A/meteor,williambr/meteor,oceanzou123/meteor,daltonrenaldo/meteor,zdd910/meteor,mirstan/meteor,chengxiaole/meteor,DCKT/meteor,yinhe007/meteor,ndarilek/meteor,karlito40/meteor,ljack/meteor,shadedprofit/meteor,jg3526/meteor,daslicht/meteor,joannekoong/meteor,h200863057/meteor,calvintychan/meteor,michielvanoeffelen/meteor,yonas/meteor-freebsd,eluck/meteor,sdeveloper/meteor,joannekoong/meteor,EduShareOntario/meteor,cog-64/meteor,Jonekee/meteor,sunny-g/meteor,zdd910/meteor,youprofit/meteor,papimomi/meteor,modulexcite/meteor,shadedprofit/meteor,Hansoft/meteor,meteor-velocity/meteor,steedos/meteor,lpinto93/meteor,codingang/meteor,esteedqueen/meteor,henrypan/meteor,kengchau/meteor,mubassirhayat/meteor,rabbyalone/meteor,Jonekee/meteor,luohuazju/meteor,fashionsun/meteor,tdamsma/meteor,Quicksteve/meteor,kencheung/meteor,msavin/meteor,imanmafi/meteor,mirstan/meteor,wmkcc/meteor,somallg/meteor,yanisIk/meteor,katopz/meteor,dboyliao/meteor,IveWong/meteor,juansgaitan/meteor,paul-barry-kenzan/meteor,HugoRLopes/meteor,mauricionr/meteor,lpinto93/meteor,sclausen/meteor,4commerce-technologies-AG/meteor,codedogfish/meteor,TechplexEngineer/meteor,eluck/meteor,chengxiaole/meteor,Theviajerock/meteor,yiliaofan/meteor,jeblister/meteor,whip112/meteor,namho102/meteor,chasertech/meteor,D1no/meteor,baysao/meteor,chasertech/meteor,Profab/meteor,mauricionr/meteor,Paulyoufu/meteor-1,vacjaliu/meteor,msavin/meteor,mauricionr/meteor,chiefninew/meteor,qscripter/meteor,yiliaofan/meteor,bhargav175/meteor,chengxiaole/meteor,tdamsma/meteor,Puena/meteor,sitexa/meteor,papimomi/meteor,sitexa/meteor,sdeveloper/meteor,evilemon/meteor,dev-bobsong/meteor,baiyunping333/meteor,papimomi/meteor,lassombra/meteor,lorensr/meteor,zdd910/meteor,aldeed/meteor,daltonrenaldo/meteor,D1no/meteor,karlito40/meteor,codedogfish/meteor,devgrok/meteor,meteor-velocity/meteor,aramk/meteor,vacjaliu/meteor,msavin/meteor,saisai/meteor,yanisIk/meteor,imanmafi/meteor,rozzzly/meteor,allanalexandre/meteor,SeanOceanHu/meteor,Ken-Liu/meteor,imanmafi/meteor,saisai/meteor,sdeveloper/meteor,Quicksteve/meteor,shrop/meteor,h200863057/meteor,lpinto93/meteor,Eynaliyev/meteor,alexbeletsky/meteor,Theviajerock/meteor,codingang/meteor,Hansoft/meteor,cog-64/meteor,chiefninew/meteor,cbonami/meteor,dandv/meteor,allanalexandre/meteor,mubassirhayat/meteor,baysao/meteor,devgrok/meteor,yonas/meteor-freebsd,Jonekee/meteor,jg3526/meteor,eluck/meteor,dev-bobsong/meteor,guazipi/meteor,shrop/meteor,Urigo/meteor,lassombra/meteor,brdtrpp/meteor,chasertech/meteor,henrypan/meteor,yiliaofan/meteor