Ruby 最近老遇到 Zlib::BufError

sakura79 · October 23, 2013 · Last by seoaqua replied at November 05, 2013 · 2623 hits

无论是 windows 还是 mac 下,用 net::http 抓去网页老出这个问题。

windows 下一会就出,mac 下一般一天出一次。。。

有遇到过的么?

被运营商插了东西,或者连接中断都有可能的,可以改改程序在 rescue Zlib::BufError 把出错的 url 保存下来分析下。

也许是数据包不完整,导致无法 gzip 解压了,没啥好办法,验证完整性然后重试吧

You need to Sign in before reply, if you don't have an account, please Sign up first.