The valid characters are defined in RFC 7230 and RFC 3986
时间: 2023-10-26 14:36:25 浏览: 149
Yes, that is correct. The valid characters for HTTP header field values are defined in RFC 7230, while the valid characters for URIs (Uniform Resource Identifiers) are defined in RFC 3986. These standards define the allowed characters and their encoding for use in HTTP requests and responses, as well as in the construction of URIs for identifying resources on the web. It's important to follow these standards to ensure that the HTTP messages and URIs are valid, interoperable, and can be correctly processed by different systems.
相关问题
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 ]
springboot. The valid characters are defined in RFC 7230 and RFC 3986
Spring Boot是一个用于构建Java应用程序的开源框架。它使用内置的Tomcat作为服务器,用于处理HTTP请求和响应。在发送GET请求时,如果请求中包含特殊字符[ ] ,可能会导致错误java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986。这是由于Tomcat对请求目标进行了过滤,只允许一些特定的字符。根据RFC 3986文档的规定,URL中只允许包含英文字母、数字、-_.~4个特殊字符以及所有保留字符(! * ' ( ) ; : @ & = $ , / ? # [ ]) 。因此,如果在Spring Boot项目中使用了较高版本的Tomcat,可能会遇到该问题。解决方法是在请求中避免使用特殊字符[ ] ,或者可以升级Spring Boot版本为2.2.5以上,其中包括Tomcat版本为9.0.31以上,这样可以避免该错误。
阅读全文
相关推荐















