Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-1689

Page URI should be encoded before generating

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.1
    • 3.0RC1
    • Workspace : Site
    • None

      In the GeneratePageAction class, the page URI should be URI-encoded before creating an HttpGet on it. If not :

      Illegal character in path at index 68: http://server:8080/cms/generate/default/_resources/download/Masteres Specialises/syscommreseau_web_09.pdf?_contextPath=&site=default
      	at java.net.URI$Parser.fail(URI.java:2809)
      	at java.net.URI$Parser.checkChars(URI.java:2982)
      	at java.net.URI$Parser.parseHierarchical(URI.java:3066)
      	at java.net.URI$Parser.parse(URI.java:3014)
      	at java.net.URI.<init>(URI.java:578)
      	at java.net.URI.create(URI.java:840)
      	at org.apache.http.client.methods.HttpGet.<init>(HttpGet.java:69)
      	at org.ametys.web.site.GeneratePageAction.act(GeneratePageAction.java:63)
      	at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:120)
      	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
      

      Classes like java.net.URLEncoder or apache commons codec's URLCodec should not be used, as they encode strings according to "application/x-www-form-urlencoded" media type and not real RFC 2396/3986 encoding.

            cedric Cédric Damioli
            ngavalda Nicolas Gavalda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: