-
Bug
-
Resolution: Done
-
Major
-
2.0.13.Final
-
None
I create a servlet just like:
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
then use curl --header "Content-Type:application/x-www-form-urlencoded;charset=utf-8" -d "name=中文" http://1et/Test1:8080/sync-servle
then getParameter messy code
I find someone like me :https://stackoverflow.com/questions/43085811/ajax-post-to-jboss-eap-7-without-encodeuricomponent-occurred-messy-code
io.undertow.server.handlers.form.FormEncodedDataDefinition.FormEncodedDataParser.doParse(final StreamSourceChannel channel),it handled like this:
buffer.clear();
int c = channel.read(buffer);
if (c > 0) {
buffer.flip();
while (buffer.hasRemaining()) {
byte n = buffer.get();
builder.append((char) n);//the problem occurred here,[a][b][c] would be changed to [0][a][0][b][0][c]
- duplicates
-
UNDERTOW-1802 Improve FormEncodedDataDefinition to handle chars in configured encoding
- Resolved