In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Recently, after reading the inside story of in-depth Analysis of Java Web Technology (author: Xu Lingbo), there is a lack of a small point about the coding and decoding of Web requests on Tomcat, which may affect the understanding of some readers. I specially checked it, and it is summarized as follows:
1. The requested PathInfo part is decoded with the encoding specified by the URIEncoding attribute of the Connector element of the Tomcat.
For specific use, please refer to https://tomcat.apache.org/tomcat-8.5-doc/config/http.html.
two。 Second, let's first talk about the parsing of the request body (POST body). Tomcat will get the character code in the next order:
1) the user specifies through a similar code:
2) the encoding specified in the request header of the request message content-type.
3) apply the unified coding configured by web.xml (this is currently in the Servlet4.0 specification)
4) system default ISO8859-1
3. The other is the parsing of the QueryString part. By default, Tomcat uses the same URIEncoding as 1) to parse QueryString. But at the same time Tomcat provides another parameter, useBodyEncodingForURI. Literal meaning uses newspaper style coding to parse QueryString. If the parameter is true. Then Tomcat uses the same encoding as 2) to parse QueryString.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.