guojing
V2EX  ›  问与答

Android 使用 okhttp 上传文件,服务端开启 http2.0,经常失败,有人遇到吗?

  •  
  •   guojing · Sep 20, 2016 · 5679 views
    This topic created in 3522 days ago, the information mentioned may be changed or developed.

    最近公司服务端决定升级到 http2.0,在测试过程中遇到奇怪 bug 。 Android 客户端使用 retrofit 配合 okhttp 调用服务端接口,在测试调用上传文件接口中,经常失败。提示 okhttp3.internal.framed.StreamResetException: stream was reset: CANCEL 。 服务端 nginx 版本 10.11.3 ,客户端 okhttp 版本 3.4.1 。 请问有人遇到类似问题吗?这是什么问题?

    1 replies    2016-09-20 17:55:27 +08:00
    rrfeng
        1
    rrfeng  
       Sep 20, 2016
    nginx 版本 10.11.3 ?

    nginx 1.10 的话是有一个 bug 的:

    https://www.v2ex.com/t/300566#reply26
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5836 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 54ms · UTC 01:49 · PVG 09:49 · LAX 18:49 · JFK 21:49
    ♥ Do have faith in what you're doing.