The valid characters are defined in RFC 7230 and RFC 3986
时间: 2023-10-26 20:38:53 浏览: 162
as follows:
RFC 7230:
- ALPHA (letters a-z and A-Z)
- DIGIT (0-9)
- !#$%&'*+-.^_`|~
- (){}[]<>
- :;@
- /
- ?
- =
RFC 3986:
- ALPHA (letters a-z and A-Z)
- DIGIT (0-9)
- -._~
- :/?#[]@!$&'()*+,;=
Note that different URI schemes (such as mailto, file, telnet, etc.) may have their own restrictions on character usage.
相关问题
The valid characters are defined in RFC 7230 and RFC 3986
在RFC 7230和RFC 3986中定义了有效字符。RFC 3986规定,URL只允许包含字母,数字以及四个特殊字符(- _ . ~)。这些字符 ! * ’ ( ) ; : @ & = $ , / ? # [ ] 属于保留字符,所以是非法字符,不能出现在URL地址中。 RFC 7230也提到了URL中的有效字符,但没有具体列出字符列表。因此,有效字符的定义可以通过结合这两个RFC来理解。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [解决Invalid character found in the request ... The valid characters are defined in RFC 7230 and RF](https://blog.csdn.net/ywb201314/article/details/128315057)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [The valid characters are defined in RFC 7230 and RFC 3986-Tomcat解决方案](https://blog.csdn.net/oscar999/article/details/123513119)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
The valid characters are defined in RFC 7230 and RFC 3986什么意思
The valid characters in the context of HTTP requests and URIs are defined in two RFC documents: RFC 7230 and RFC 3986.
RFC 7230 defines the syntax and semantics of HTTP/1.1 messages, including the rules for constructing header fields and parsing message components. It specifies the allowed characters in HTTP header field values and the encoding format for non-ASCII characters.
RFC 3986 defines the syntax and semantics of URIs, including the rules for constructing and parsing URIs. It specifies the allowed characters in a URI and the encoding format for reserved characters and non-ASCII characters.
In summary, these two RFC documents define the set of valid characters that can be used in HTTP requests and URIs, and also provide guidelines for handling characters that are not included in this set.
阅读全文