Permalink
Browse files

Avoid going though URL creationg from String when computing MTOM/XOP …

…multipart messages' CID
  • Loading branch information...
asoldano authored and dkulp committed Jul 14, 2014
1 parent ee86e43 commit 5f89d20234c3786d354f8ab1f2b4ee1f9a421490
Showing with 1 addition and 7 deletions.
  1. +1 −7 api/src/main/java/org/apache/cxf/attachment/AttachmentUtil.java
@@ -197,13 +197,7 @@ public static String createContentID(String ns) throws UnsupportedEncodingExcept
String name = ATT_UUID + "-" + String.valueOf(++counter);
if (ns != null && (ns.length() > 0)) {
try {
URI uri = new URI(ns);
String host = uri.toURL().getHost();
cid = host;
} catch (Exception e) {
cid = ns;
}
cid = ns;
}
return URLEncoder.encode(name, "UTF-8") + "@" + URLEncoder.encode(cid, "UTF-8");
}

0 comments on commit 5f89d20

Please sign in to comment.