TakWolf-Deprecated / CNode-Material-Design

CNode 社区第三方 Android 客户端,原生 App,Material Design 风格,支持夜间模式。
https://cnodejs.org
Apache License 2.0
1.34k stars 347 forks source link

User-Agent 包含中文时崩溃 #74

Closed TakWolf closed 6 years ago

TakWolf commented 6 years ago

本质为 Http header 中包含非 ascii 字符会崩溃。 原因参考:https://github.com/square/retrofit/issues/1178

目前 User-Agent 格式为: CNodeMD/{应用版本号} (Android {系统版本号}; {手机型号}; {生产厂商}) 例如: CNodeMD/1.4.1-dev.1 (Android 5.1; XT1085; motorola)

其中,手机型号 和 生产厂商 两个字段,在某些国产手机中,会返回中文,会触发 BUG。

XGHeaven commented 6 years ago

用 URL Encode 一下好了 😂 方便直接

TakWolf commented 6 years ago

修复 https://github.com/TakWolf/CNode-Material-Design/commit/71793a4c678a0bce0c1afb9a8add57fbbc9d734b