求助贴: okhttp 同步下载无法读取到流 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
rangoBen
V2EX    Android

求助贴: okhttp 同步下载无法读取到流

  •  1
     
  •   rangoBen 2018-02-05 16:24:49 +08:00 11774 次点击
    这是一个创建于 2854 天前的主题,其中的信息可能已经有所发展或是发生改变。
    报文如下:
    LogInterceptor-http:--:--> GET http://cn-zjjh4-dx-v-08.acgvideo.com/vg1/upgcxcode/59/10/30821059/30821059-2-32.flv?expires=1517825700&platform=pc&ssig=_7xzXTLtbnTx8aIZDSuIyA&oi=1699826766&nfa=mifGHVDJSmrBDL3w63cZ1Q==&dynamic=1&hfb=Yjk5ZmZjM2M1YzY4ZjAwYTMzMTIzYmIyNWY4ODJkNWI= http/1.1
    :LogInterceptor-http:--:User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
    LogInterceptor-http:--:Referer: http://www.bilibili.com/
    LogInterceptor-http:--:--> END GET
    LogInterceptor-http:--:<-- 200 OK http://cn-zjjh4-dx-v-08.acgvideo.com/vg1/upgcxcode/59/10/30821059/30821059-2-32.flv?expires=1517825700&platform=pc&ssig=_7xzXTLtbnTx8aIZDSuIyA&oi=1699826766&nfa=mifGHVDJSmrBDL3w63cZ1Q==&dynamic=1&hfb=Yjk5ZmZjM2M1YzY4ZjAwYTMzMTIzYmIyNWY4ODJkNWI= (32ms)
    LogInterceptor-http:--:Server: openresty
    LogInterceptor-http:--:Date: Mon, 05 Feb 2018 08:18:02 GMT
    LogInterceptor-http:--:Content-Type: video/x-flv
    LogInterceptor-http:--:Content-Length: 44992817
    LogInterceptor-http:--:Last-Modified: Tue, 30 Jan 2018 19:30:23 GMT
    LogInterceptor-http:--:Connection: keep-alive
    LogInterceptor-http:--:ETag: "5a70c7cf-2ae8931"
    LogInterceptor-http:--:X-Cache: cn-zjjh4-dx-v-08.hdslb.com Disk
    LogInterceptor-http:--:Accept-Ranges: bytes
    就一直停到这里了,响应体没动静了。。。。
    正常结束应该有这样的日志::<-- END HTTP (1540472-byte body)
    respOnse= client.newCall(request).execute();
    这里 response 一直没有响应返回,这里除 B 站外其他地址都 ok

    因为是下载别人平台的视频,无法协助调试,在这里拜佛大牛帮助了 - -!
    1 条回复    2018-02-07 14:29:42 +08:00
    rangoBen
        1
    rangoBen  
    OP
       2018-02-07 14:29:42 +08:00
    测试解决,不可以设置读取超时和链接超时。设为 0 也不行的
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2552 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 25ms UTC 15:05 PVG 23:05 LAX 07:05 JFK 10:05
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86