[JIRA] Closed: (OFBIZ-861) The URIEncoding parameter of the Tomcat connector does not seem to be taken into account

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] Closed: (OFBIZ-861) The URIEncoding parameter of the Tomcat connector does not seem to be taken into account

JIRA jira@ofbiz.org
     [ http://jira.undersunconsulting.com/browse/OFBIZ-861?page=all ]
     
Marco Risaliti closed OFBIZ-861:
--------------------------------

    Resolution: Duplicate

replaced by https://issues.apache.org/jira/browse/OFBIZ-281

> The URIEncoding parameter of the Tomcat connector does not seem to be taken into account
> ----------------------------------------------------------------------------------------
>
>          Key: OFBIZ-861
>          URL: http://jira.undersunconsulting.com/browse/OFBIZ-861
>      Project: [OFBiz] Open For Business
>         Type: Bug
>   Components: catalina
>     Versions: SVN
>  Environment: Linux 2.6.x, firefox 1.5
>     Reporter: Peter Goron
>     Assignee: Jira Administrator
>  Attachments: URIEncoding-problem.patch, URIEncoding-quickfix.patch
>
>
> When I create an entity value which contains UTF-8 characters in its primary keys, I'm unable to access it via webtools entity data maintenance or its corresponding management interface in backend.
> For example, if you create a new Security Group from partymgr application with theses parameters :
> id = Securité
> description = Test
> Then you try to select the newly created Security Group from Security Group List or you type this url :
> https://127.0.0.1:8443/partymgr/control/EditSecurityGroup?groupId=securit%C3%A9
> you should obtain an Edit Security Group form with theses parameters :
> id = securité -[CommonCannotBeFound: [securité]]-
> description =
> The symptoms are similar when you try to access to this entity via webtools
> https://127.0.0.1:8443/webtools/control/ViewGeneric?entityName=SecurityGroup&groupId=securit%C3%A9
> -> Specified SecurityGroup was not found.
> The problem is not specific to SecurityGroup entity, it can be reproduced for all entities.
> After some search, it appears that request.getParameter(pkField) doesn't decode
> correctly the UTF-8 sequence "%C3%A9" whereas URIEncoding of HTTP(S) connector is
> set to UTF-8.
> The patch 'URIEncoding-problem.patch' try to demonstrate that the URIEncoding
> specified in base/config/ofbiz-containers.xml (UTF-8) is not set at the
> connector level. After having applied the patch, recompiled Ofbiz and
> restarted it, the following lines should appear at the end of Ofbiz loading.
> 32017 (main) [  CatalinaContainer.java:238:INFO ] Connector AJP/1.3 @ 8009 - not-secure URIEncoding=null [org.apache.jk.server.JkCoyoteHandler] started.
> 32018 (main) [  CatalinaContainer.java:235:INFO ] Connector HTTP/1.1 @ 8080 - not-secure URIEncoding=null [org.apache.coyote.http11.Http11Protocol] started.
> 32018 (main) [  CatalinaContainer.java:235:INFO ] Connector TLS @ 8443 - secure URIEncoding=null [org.apache.coyote.http11.Http11Protocol] started.
> 32022 (main) [  CatalinaContainer.java:242:INFO ] Started Apache Tomcat/5.5.9
> I've written a small workaround that use setURIEncoding instead of setProperty
> Connector's method. After having applied the patch 'URIEncoding-quickfix.patch',
> recompiled Ofbiz and restarted it, you should see the following lines at the end
> of ofbiz loading.
> 20551 (main) [  CatalinaContainer.java:238:INFO ] Connector AJP/1.3 @ 8009 - not-secure URIEncoding=UTF-8 [org.apache.jk.server.JkCoyoteHandler] started.
> 20552 (main) [  CatalinaContainer.java:235:INFO ] Connector HTTP/1.1 @ 8080 - not-secure URIEncoding=UTF-8 [org.apache.coyote.http11.Http11Protocol] started.
> 20552 (main) [  CatalinaContainer.java:235:INFO ] Connector TLS @ 8443 - secure URIEncoding=UTF-8 [org.apache.coyote.http11.Http11Protocol] started.
> 20602 (main) [  CatalinaContainer.java:242:INFO ] Started Apache Tomcat/5.5.9
> With this patch the problem disapear but I don't think it is the right solution.
> I think the behavior of the setProperty(String, String) method of Tomcat Connector class has changed in 5.5.x series. When you look at its source code :
> (http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Connector.java)
> it seems this method only set parameters of the protocol handler. And URIEncoding is a parameter of the connector and not of the protocol handler.
> This problem does not appear in the non-embedded version of tomcat because they use
> common-digester to map xml elements and attributes of configuration file to setters
> of Connector object.
> Can someone confirm this problem ?

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.undersunconsulting.com/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira