Skip to content

KS-61 修复Windows/Web平台的不兼容报错 #95

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

Merged
merged 26 commits into from
Apr 3, 2025

Conversation

zhangzqs
Copy link
Collaborator

@zhangzqs zhangzqs commented Dec 25, 2024

分析:

  • 这两个问题实际上都是生成User-Agent中的逻辑出现了问题
  • windows平台上是由于UA包含了中文,而http header中出现中文导致了报错
  • web平台上是由于新引入的库sysinfo2不支持web平台
  • ios平台同web平台原因

解决方案:

  • 引入platform_info库,加入平台判定逻辑,web平台不使用SysInfo2生成UA
  • 对整个platform_info和SysInfo2库添加异常处理,不支持的平台默认降级为QiniuDart/vx (Unknow
  • 对最终生成的UA字符串仅保留ascii编码字符,其余字符均移除,防止windows平台的报错

额外改动:

  • 使用mixin,新版dart的一些语法特性,重构example的代码
  • 优化Example的用户交互逻辑
  • 补充windows和web平台代码

Copy link
Collaborator

@yinxulai yinxulai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhangzqs zhangzqs changed the title KS-61 修复Web平台的不兼容报错 KS-61 修复Windows/Web平台的不兼容报错 Jan 6, 2025
Copy link
Collaborator

@yinxulai yinxulai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

qiniu-x bot commented Apr 3, 2025

[Git-flow] Hi @zhangzqs, There are some suggestions for your information:


Rebase suggestions

  • Following commits seems generated via git merge

    Merge branch 'KS-61-web' of github.com:zhangzqs/dart-sdk into KS-61-web

  • Following commits have duplicated messages

    更新ci

    更新ci

Which seems insignificant, recommend to use git rebase command to reorganize your PR.

For other git-flow instructions, recommend refer to these examples.

If you have any questions about this comment, feel free to raise an issue here:

@zhangzqs zhangzqs merged commit 68233ff into qiniu:master Apr 3, 2025
36 checks passed
@zhangzqs zhangzqs deleted the KS-61-web branch April 3, 2025 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants