Skip to content
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

日志打印转义问题 #163

Open
StoneStone11 opened this issue Sep 27, 2024 · 1 comment
Open

日志打印转义问题 #163

StoneStone11 opened this issue Sep 27, 2024 · 1 comment

Comments

@StoneStone11
Copy link

StoneStone11 commented Sep 27, 2024

Request path: myhuaweicloud.com/ww%2F202409%2F8ab8ca974bb62b52ab5bc14555ea2026.jpg,这两个%2F是两个 / ,打印的时候被转义了。com.obs.services.internal.RestStorageService#handleThrowable

@liqiuqiu111
Copy link

如果一个保留字符在URI中具有特殊含义(称作“reserved purpose”), 且URI中必须使用该字符用于其它目的,那么该字符必须百分号编码。OBS服务对非ASCII字符编码必须采用UTF-8编码,否则最终上传至OBS的对象名可能与预期不符。例如,保留字符“/”,如果将其用作URI的路径成分的分隔符, 则是具有特殊含义的保留字符(在OBS中用来分割桶名和对象名)。如果该字符需要出现在URI一个路径成分的内部, 则需要使用三个字符“%2F”或“%2f”代替原本的“/”。保留字符 " ",需要将其编码为“%20”,例如字符串“abc d”,应该编码为“abc%20d”。

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

No branches or pull requests

2 participants