Hello, there is a problem with charset resolution from ContentType header for SOAP 1.2 using io.netty.handler.codec.http.HttpUtils class. SOAP 1.2 could have action parameter in ContentType header and method getCharsetAsSequence(CharSequence contentTypeValue) from io.netty.handler.codec.http.HttpUtils class just finds charset word and take whole string from this word end to the end.
Expected behavior
Resolve charset from ContentType header with value text/xml; charset=utf-8; action="someaction" as UTF-8
Actual behavior
Resolve charset substring from ContentType header with value text/xml; charset=utf-8; action="someaction" as utf-8; action="someaction". And then you will get an exception java.nio.charset.IllegalCharsetNameException
Steps to reproduce
Resolve charset from any request which contains action parameter in ContentType header value
Netty version
4.1.19
JVM version (e.g. java -version)
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
OS version (e.g. uname -a)
Linux 4.15.0-33-generic Ubuntu 18
Hello, there is a problem with charset resolution from
ContentTypeheader for SOAP 1.2 usingio.netty.handler.codec.http.HttpUtilsclass. SOAP 1.2 could have action parameter inContentTypeheader and methodgetCharsetAsSequence(CharSequence contentTypeValue)fromio.netty.handler.codec.http.HttpUtilsclass just finds charset word and take whole string from this word end to the end.Expected behavior
Resolve charset from
ContentTypeheader with valuetext/xml; charset=utf-8; action="someaction"as UTF-8Actual behavior
Resolve charset substring from
ContentTypeheader with valuetext/xml; charset=utf-8; action="someaction"asutf-8; action="someaction". And then you will get an exceptionjava.nio.charset.IllegalCharsetNameExceptionSteps to reproduce
Resolve charset from any request which contains action parameter in
ContentTypeheader valueNetty version
4.1.19
JVM version (e.g.
java -version)java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
OS version (e.g.
uname -a)Linux 4.15.0-33-generic Ubuntu 18