cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (CXF-1900) Invalid ContentId Encode
Date Fri, 21 Nov 2008 17:23:44 GMT

     [ https://issues.apache.org/jira/browse/CXF-1900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp reassigned CXF-1900:
--------------------------------

    Assignee: Daniel Kulp

> Invalid ContentId Encode
> ------------------------
>
>                 Key: CXF-1900
>                 URL: https://issues.apache.org/jira/browse/CXF-1900
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.1.3
>         Environment: Linux - Ubuntu 8.04
>            Reporter: Andrea Bozzetto
>            Assignee: Daniel Kulp
>
> The namespace  "urn:ihe:iti:xds-b:2007" is encoded in this way:
> Content-ID: <ae6becb4-dee4-441f-8b21-9cdffe3b2986@urn%3Aihe%3Aiti%3Axds-b%3A2007>
> I change the class AttachmentUtil like this:
> /**
>      * @param ns
>      * @return
>      */
>     public static String createContentID(String ns) throws UnsupportedEncodingException
{
>         // tend to change
>         String cid = URLEncoder.encode("http://cxf.apache.org/", "UTF-8");
>         String name = UUID.randomUUID().toString();
>         if (ns != null && (ns.length() > 0)) {
>             try {
>                 URI uri = new URI(ns);
>                 String host = uri.toURL().getHost();
>                 cid = URLEncoder.encode(host, "UTF-8");
>             } catch (URISyntaxException e) {
>                 e.printStackTrace();
>                 return null;
>             } catch (MalformedURLException e) {
>                 cid = ns;
>             }
>         }
>         return URLEncoder.encode(name, "UTF-8") + "@" + cid;
>     }
> bye

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message