My application receives multi-page content via HTTP POST on WebLogic 10gR3. Whenever clients specify an attribute charset before other attributes in the Content-Type header (for example, Content-Type: multipart/form-data; charset=utf-8; boundary=a_random_boundary), WebLogic throws the following exception (caught in my managed server log):
Unsupported encoding: "utf-8; border = a_random_boundary". java.io.UnsupportedEncodingException: Unsupported Encoding utf-8; border = a_random_boundary
in weblogic.servlet.internal.ServletRequestImpl.setCharacterEncoding (ServletRequestImpl.java:428)
in weblogic.servlet.internal.ServletRequestImpl.initRequestEncoding
. SerstletquestRequlet.questllet.vestpllet.vestpllet.vestpllet.vestpllet.vestpllet.vestpllet.vestpllet.vestpllet.vestpllet.vestpllet.vestplletvlttpreview java: 451)
in javax.servlet.ServletRequestWrapper.getCharacterEncoding (ServletRequestWrapper.java:115)
on com.MyClass.myMethod (MyClass.java:100)
Just for information, I am making a call getCharacterEncoding()for an instance HttpServletRequeston line 100.
However, if clients specify the encoding at the end of the header (for example, Content-Type: multipart / form-data; border = a_random_boundary; charset = utf-8), the application and WebLogic run gracefully.
According to RFC2045 , the order of the parameters is small:
The Content-Type header field indicates the nature of the data in the subject’s body by providing media types and subtypes and by providing additional information that may be required for certain media. After the name of the media type and subtype, the rest of the header field is just a set of parameters specified in attribute = value. The ordering of the parameters is not significant .
I searched around, and the closer I came across a similar problem, the lower the thread in OTN.
, WebLogic, , , / .
.