Danpier 最近的时间轴更新
Danpier

Danpier

V2EX 第 391631 号会员,加入于 2019-03-12 21:03:35 +08:00
Danpier 最近回复了
@l12ab 感谢提醒
@gamexg
@ysc3839
感谢答疑,几个出问题的网站确实都使用 Transfer-Encoding: chunked 来传输,用 HTTP 1.0 请求就不会使用分块编码。搞不懂请求带了 Connection: close 为什么还使用分块编码,另外数据拆分成多块是应用层组装数据时出了问题吗?
@wwqgtxx 高级 API 能提供现成更好的实现方式,但很多问题就接触不到了
@aquariumm request 参数没带 Accept-Encoding 也会接收到压缩数据吗?
@ysc3839 V2EX
链接: https://pan.baidu.com/s/17Abee6spBYuvS7r5EG4mXw 提取码: 8ku1
贴下 header 部分:

HTTP/1.1 200 OK
Date: Sat, 14 Sep 2019 11:18:13 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: close
gear: 1
vikingrCache: 60000
Vikingr-Cache-TTL: 4376
IDC: shjd
Vary: Origin,Accept-Encoding
Expires: Sat, 14 Sep 2019 11:18:43 GMT
Cache-Control: max-age=30
X-Cache-Webcdn: BYPASS from hw-gz3-webcdn-07

报错位置在 34556,试了解码前 30000 没问题。
@ipwx 我是了解下问题出现的原因,忽视 error 这个我清楚。
@ysc3839
报错提示:
'utf-8' codec can't decode byte 0xe5 in position 34291: invalid continuation byte
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5166 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 09:32 · PVG 17:32 · LAX 02:32 · JFK 05:32
Developed with CodeLauncher
♥ Do have faith in what you're doing.