Mantis - Resin
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
1874 | crash | always | 07-13-07 02:47 | 07-27-07 09:35 | |
|
|||||
Reporter: | Leos | Platform: | |||
Assigned To: | ferg | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.0.23 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.1.3 | ||
|
|||||
Summary: | 0001874: ServletRequest.getInputStream() throws java.io.UnsupportedEncodingException | ||||
Description: | I am trying to get the http request body by calling getInputStream() on HttpServletRequest. I want the raw binary data, as http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletRequest.html#getInputStream() [^] promises. However, when the HTTP client sets the charset to some incorrect value (by sending the HTTP header Content-Type with ;charset=something), I get java.io.UnsupportedEncodingException. I believe that this is a violation of the above mentioned interface description from Sun. It says "Retrieves the body of the request as binary data" and does not allow throwing java.io.UnsupportedEncodingException. If I would like to handle the body as text (not as raw binary data) with the correct encoding, I would use getReader() instead. | ||||
Steps To Reproduce: | |||||
Additional Information: |
java.io.UnsupportedEncodingException: CP-1250 at sun.io.Converters.getConverterClass(Converters.java:218) at sun.io.Converters.newConverter(Converters.java:251) at sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:68) at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:224) at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:210) at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:77) at java.io.InputStreamReader.<init>(InputStreamReader.java:83) at com.caucho.vfs.i18n.JDKReader.create(JDKReader.java:68) at com.caucho.vfs.Encoding.getReadEncoding(Encoding.java:157) at com.caucho.vfs.ReadStream.setEncoding(ReadStream.java:456) at com.caucho.server.connection.AbstractHttpRequest.getStream(AbstractHttpRequest.java:1764) at com.caucho.server.connection.AbstractHttpRequest.getInputStream(AbstractHttpRequest.java:1823) |
||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|