chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Spasiano (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CMIS-483) URLEncoder for getObjectByPath with folder name like CARÈ CARLA
Date Thu, 15 Dec 2011 09:26:33 GMT

    [ https://issues.apache.org/jira/browse/CMIS-483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13170070#comment-13170070
] 

Marco Spasiano commented on CMIS-483:
-------------------------------------

Not a problem, we have changed the encoding on the tomcat connector, 
however it would not hurt to have the ability to change the client
encoding.

Il giorno mer, 14/12/2011 alle 19.57 +0000, Florian Müller (Resolved)


                
> URLEncoder for getObjectByPath with folder name like CARÈ CARLA
> ---------------------------------------------------------------
>
>                 Key: CMIS-483
>                 URL: https://issues.apache.org/jira/browse/CMIS-483
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client-bindings
>    Affects Versions: OpenCMIS 0.5.0
>            Reporter: Marco Spasiano
>              Labels: patch
>
> What do you think about this patch?
> {noformat}
> ### Eclipse Workspace Patch 1.0
> #P chemistry-opencmis-client-bindings
> Index: src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
> ===================================================================
> --- src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
(revisione 1124118)
> +++ src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/LinkCache.java
(copia locale)
> @@ -68,6 +68,7 @@
>      private final Cache templateCache;
>      private final Cache repositoryLinkCache;
>  
> +    private final String encoding;
>      /**
>       * Constructor.
>       */
> @@ -87,6 +88,8 @@
>              objCount = CACHE_SIZE_OBJECTS;
>          }
>  
> +        encoding = (String) session.get(SessionParameter.LOCALE_VARIANT, "UTF-8");
> +        
>          linkCache = new CacheImpl("Link Cache");
>          linkCache.initialize(new String[] {
>                  MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY
+ "=" + repCount, // repository
> @@ -257,7 +260,7 @@
>                      String paramValue = UrlBuilder.normalizeParameter(parameters.get(param.toString()));
>                      if (paramValue != null) {
>                          try {
> -                            result.append(URLEncoder.encode(paramValue, "UTF-8"));
> +                            result.append(URLEncoder.encode(paramValue, encoding));
>                          } catch (UnsupportedEncodingException e) {
>                              result.append(paramValue);
>                          }
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message