gpt4 book ai didi

HTTP/HTTPS 基本认证 : colon in username

转载 作者:可可西里 更新时间:2023-11-01 15:05:08 25 4
gpt4 key购买 nike

这可能是一个基本问题,但是当有 HTTP 或 HTTPS 基本身份验证时,用户名中是否可以有冒号(“:”)?如果没有,我们有办法逃避冒号吗?

最佳答案

RFC https://www.rfc-editor.org/rfc/rfc2617#section-2明确指出用户名不得包含冒号:

To receive authorization, the client sends the userid and password, separated by a single colon (":") character, within a base64 [7] encoded string in the credentials.`

basic-credentials = base64-user-pass

base64-user-pass = <base64 [4] encoding of user-pass, except not limited to 76 char/line>

user-pass = userid ":" password

userid = * <TEXT excluding ":">

password = *TEXT

基于此,无法在用户名中使用冒号。

关于HTTP/HTTPS 基本认证 : colon in username,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11612854/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com