improve end_stream handling
improve end_stream handling

To replicate requests as close as possible frame-by-frame.

This fixes an issue with broken HTTP/2 implemenation by Akamai and
Twitter, which raise an error if we send an empty DataFrame only to
indicate END_STREAM.

cortesi/mitmproxy,dufferzafar/mitmproxy,Kriechi/mitmproxy,Kriechi/mitmproxy,cortesi/mitmproxy,jvillacorta/mitmproxy,mhils/mitmproxy,ujjwal96/mitmproxy,xaxa89/mitmproxy,laurmurclar/mitmproxy,jvillacorta/mitmproxy,jvillacorta/mitmproxy,zlorb/mitmproxy,Kriechi/mitmproxy,vhaupert/mitmproxy,ddworken/mitmproxy,mhils/mitmproxy,cortesi/mitmproxy,jvillacorta/mitmproxy,dwfreed/mitmproxy,mosajjal/mitmproxy,ddworken/mitmproxy,gzzhanghao/mitmproxy,dwfreed/mitmproxy,mitmproxy/mitmproxy,zlorb/mitmproxy,StevenVanAcker/mitmproxy,MatthewShao/mitmproxy,gzzhanghao/mitmproxy,laurmurclar/mitmproxy,MatthewShao/mitmproxy,dufferzafar/mitmproxy,xaxa89/mitmproxy,vhaupert/mitmproxy,mitmproxy/mitmproxy,mosajjal/mitmproxy,MatthewShao/mitmproxy,mhils/mitmproxy,gzzhanghao/mitmproxy,mitmproxy/mitmproxy,dwfreed/mitmproxy,gzzhanghao/mitmproxy,laurmurclar/mitmproxy,Kriechi/mitmproxy,dufferzafar/mitmproxy,zlorb/mitmproxy,xaxa89/mitmproxy,ujjwal96/mitmproxy,mhils/mitmproxy,mhils/mitmproxy,mitmproxy/mitmproxy,laurmurclar/mitmproxy,xaxa89/mitmproxy,ujjwal96/mitmproxy,ddworken/mitmproxy,mosajjal/mitmproxy,mitmproxy/mitmproxy,StevenVanAcker/mitmproxy,ujjwal96/mitmproxy,dufferzafar/mitmproxy,vhaupert/mitmproxy,zlorb/mitmproxy,mosajjal/mitmproxy,dwfreed/mitmproxy,MatthewShao/mitmproxy,vhaupert/mitmproxy,cortesi/mitmproxy,ddworken/mitmproxy,StevenVanAcker/mitmproxy,StevenVanAcker/mitmproxy