-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-ASCII characters in headers might cause exceptions thrown with DioExceptionType.unknown
#2299
Comments
I encountered the same problem with some iOS phones |
Have you found a solution yet |
remain to be solved,My solution is for users to upgrade their phone system to the latest version |
Can upgrading the user's iOS system to the latest version solve this problem? We also have macOS and Windows users here who encounter this problem. Once it occurs, they cannot access any network |
The users I have encountered with problems are the older iOS version, such as the situation that the version has not been updated for several years, but some users are still unwilling to update the version, so this part of the use is still unable to use |
same issue |
I found my problem. It was because I set options.headers['deviceName'] = "xxxx". This place should be encoded. |
Thanks!I will try it |
抛出的异常里没有解释为什么异常? |
DioExceptionType.unknown
我当时并没有去注意这个异常,后面找了几个用不了的用户,专门来打印异常信息看到, 是因为他们是旧版本的ios系统,还有windows系统,他们可以设置中文的设备名称,而中文的信息传递到options.headers,就会报错“ Non-ASCII characters in headers might cause exceptions thrown with DioExceptionType.unknown” |
Package
dio
Version
5.7.0
Operating-System
iOS, MacOS, Windows
Adapter
Default Dio
Output of
flutter doctor -v
Dart Version
3.5.2
Steps to Reproduce
偶发事件
Expected Result
预期应该是可以正常使用才对,因为大部用户都可以正常使用,只有机台windows设备,还有ios设备,macos设备无法请求网络
Actual Result
少部分 windows设备,还有ios设备,macos设备无法请求网络,出现DioExceptionType.unknown,这个如何解决呢?我的借口是https的
The text was updated successfully, but these errors were encountered: