-
Enhancement
-
Resolution: Obsolete
-
Major
-
None
-
7.0.7.GA
As an example, if JSP is called with Korean character parameter in form data without encoding as below:
curl -v -X POST '127.0.0.1:8080/jsp-form-data-encoding/test.jsp' --data $'PARAM1=테스트한글'
- JBoss EAP 6.4.x encodes and prints the Korean character parameter successfully.
13:40:11,172 INFO [stdout] (http-127.0.0.1:8080-1) REQEUST CHARSET ENCODING: UTF-8 13:40:11,173 INFO [stdout] (http-127.0.0.1:8080-1) 한글테스트 13:40:11,173 INFO [stdout] (http-127.0.0.1:8080-1) ------------------------------------------- 13:40:11,173 INFO [stdout] (http-127.0.0.1:8080-1) ============ Headers 13:40:11,174 INFO [stdout] (http-127.0.0.1:8080-1) ===== Header:host 13:40:11,175 INFO [stdout] (http-127.0.0.1:8080-1) 127.0.0.1:8080 13:40:11,175 INFO [stdout] (http-127.0.0.1:8080-1) ===== Header:user-agent 13:40:11,175 INFO [stdout] (http-127.0.0.1:8080-1) curl/7.53.1 13:40:11,175 INFO [stdout] (http-127.0.0.1:8080-1) ===== Header:accept 13:40:11,178 INFO [stdout] (http-127.0.0.1:8080-1) */* 13:40:11,178 INFO [stdout] (http-127.0.0.1:8080-1) ===== Header:content-length 13:40:11,179 INFO [stdout] (http-127.0.0.1:8080-1) 22 13:40:11,179 INFO [stdout] (http-127.0.0.1:8080-1) ===== Header:content-type 13:40:11,179 INFO [stdout] (http-127.0.0.1:8080-1) application/x-www-form-urlencoded 13:40:11,179 INFO [stdout] (http-127.0.0.1:8080-1) ============ Attributes 13:40:11,180 INFO [stdout] (http-127.0.0.1:8080-1) ============ Parameters 13:40:11,180 INFO [stdout] (http-127.0.0.1:8080-1) ===== Value:PARAM1 13:40:11,180 INFO [stdout] (http-127.0.0.1:8080-1) 테스트한글 13:40:11,181 INFO [stdout] (http-127.0.0.1:8080-1) decode:테스트한글
- However, the Korean character parameter is broken in JBoss EAP 7.x.
13:39:18,987 INFO [stdout] (default task-1) REQEUST CHARSET ENCODING: UTF-8 13:39:18,988 INFO [stdout] (default task-1) 한글테스트 13:39:18,989 INFO [stdout] (default task-1) ------------------------------------------- 13:39:18,989 INFO [stdout] (default task-1) ============ Headers 13:39:18,989 INFO [stdout] (default task-1) ===== Header:Accept 13:39:18,990 INFO [stdout] (default task-1) */* 13:39:18,990 INFO [stdout] (default task-1) ===== Header:User-Agent 13:39:18,990 INFO [stdout] (default task-1) curl/7.53.1 13:39:18,990 INFO [stdout] (default task-1) ===== Header:Host 13:39:18,990 INFO [stdout] (default task-1) 127.0.0.1:8080 13:39:18,990 INFO [stdout] (default task-1) ===== Header:Content-Length 13:39:18,991 INFO [stdout] (default task-1) 22 13:39:18,991 INFO [stdout] (default task-1) ===== Header:Content-Type 13:39:18,991 INFO [stdout] (default task-1) application/x-www-form-urlencoded 13:39:18,991 INFO [stdout] (default task-1) ============ Attributes 13:39:18,991 INFO [stdout] (default task-1) ============ Parameters 13:39:18,992 INFO [stdout] (default task-1) ===== Value:PARAM1 13:39:18,992 INFO [stdout] (default task-1) ■ナフ↓ハᄂ■ハᄌ■ユワ↑ᄌタ 13:39:18,992 INFO [stdout] (default task-1) decode:■ナフ↓ハᄂ■ハᄌ■ユワ↑ᄌタ
Obviously, if a client sends the parameter with url encoding option like --data-urlencode or encoded parameter, it will work. However, it should work without the option or client encoding as EAP 6.4.x for better compatibility.
curl -v -X POST '127.0.0.1:8080/jsp-form-data-encoding/test.jsp' --data-urlencode $'PARAM1=테스트한글'
It can be reproduced by the attached war