【问题标题】:Curl download giving error CURLE_PARTIAL_FILE for large file download卷曲下载给出错误 CURLE_PARTIAL_FILE 用于大文件下载
【发布时间】:2021-04-30 08:28:52
【问题描述】:

我们正在使用 curl 库 7.73.0 。它与源代码链接。使用 Curl 我们从 HTTP 服务器下载大文件。该文件大小为 750 MB。在下载过程中,有时我们会收到 CURLE_PARTIAL_FILE 错误。我想了解这个错误的原因。它进入Curl库中的transfer.c文件循环并中止。我想了解这个循环究竟表明了什么。

if(!(data->set.opt_no_body) && k->chunk &&
   (conn->chunk.state != CHUNK_STOP)) {
  /*
   * In chunked mode, return an error if the connection is closed prior to
   * the empty (terminating) chunk is read.
   *
   * The condition above used to check for
   * conn->proto.http->chunk.datasize != 0 which is true after reading
   * *any* chunk, not just the empty chunk.
   *
   */
  failf(data, "transfer closed with outstanding read data remaining");
  return CURLE_PARTIAL_FILE;
}

如果有人能解释上述检查应该代表什么,那将会很有帮助。我们想调试这个问题,以考虑是客户端的 TCP 重组有问题,还是服务器/网络问题。

【问题讨论】:

标签: curl libcurl


【解决方案1】:

原来问题确实出在中途停止传输的服务器上。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-03-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-19
    相关资源
    最近更新 更多