You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2017/08/24 13:49:36 UTC
[Bug 61452] New: java.io.UnsupportedEncodingException: UTF_8 when
using WebDAV servlet
https://bz.apache.org/bugzilla/show_bug.cgi?id=61452
Bug ID: 61452
Summary: java.io.UnsupportedEncodingException: UTF_8 when using
WebDAV servlet
Product: Tomcat 7
Version: 7.0.81
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: maarten@vanhulsentop.nl
Target Milestone: ---
When using the WebDAV servlet, the log shows
java.io.UnsupportedEncodingException: UTF_8 exceptions on requests.
Reproduction steps;
- Download and unzip tomcat version 7.0.81
- Unzip the webdav.zip webdav in the root of the tomcat.
- Start the Tomcat server
- Connect with anyclient to http://localhost:8080/webdav/
- See the stacktrace in the console.
java.io.UnsupportedEncodingException: UTF_8
at
sun.nio.cs.StreamEncoder.forOutputStreamWriter(StreamEncoder.java:61)
at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:100)
at org.apache.catalina.util.URLEncoder.encode(URLEncoder.java:170)
at
org.apache.catalina.servlets.WebdavServlet.rewriteUrl(WebdavServlet.java:444)
at
org.apache.catalina.servlets.WebdavServlet.parseProperties(WebdavServlet.java:2122)
at
org.apache.catalina.servlets.WebdavServlet.doPropfind(WebdavServlet.java:702)
<SNIP>
I have traced this to
org.apache.catalina.servlets.WebdavServlet.rewriteUrl(String) . The
implementation for tc7.x is;
return URL_ENCODER_XML.encode(path, "UTF_8");
For tc8.5 it is;
return URL_ENCODER_XML.encode(path, StandardCharsets.UTF_8);
I suspect that this is a pretty simple copy-paste error. The string should
probably be changed from "UTF_8" (with underscore) to "UTF-8" (with a dash).
But i have not tested this.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 61452] java.io.UnsupportedEncodingException: UTF_8 when using
WebDAV servlet
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61452
--- Comment #1 from Maarten van Hulsentop <ma...@vanhulsentop.nl> ---
Created attachment 35252
--> https://bz.apache.org/bugzilla/attachment.cgi?id=35252&action=edit
webdav webapps folder to ease reproduction
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 61452] java.io.UnsupportedEncodingException: UTF_8 when using
WebDAV servlet
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61452
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
OS| |All
--- Comment #2 from Mark Thomas <ma...@apache.org> ---
Fixed in:
- 8.0.x for 8.0.47 onwards
- 7.0.x for 7.0.82 onwards
Thanks for the report. 8.0.x was affected too as were a couple of tests.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org