You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Azarny (JIRA)" <ji...@apache.org> on 2010/04/15 12:44:49 UTC

[jira] Created: (WICKET-2836) Incorrect work of WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector

Incorrect work of  WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector
------------------------------------------------------------------------------------------

                 Key: WICKET-2836
                 URL: https://issues.apache.org/jira/browse/WICKET-2836
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.4.7
         Environment: Apache 2.2 http server with configured proxy_ajp_module,  Tomcat 5.5, wicket 1.4.7
            Reporter: Igor Azarny


Preconditions:

Working application on tomacat 5.5 with non SSL HTTP/1.1 connector , that has utf-8 encoded URLs
Connector configuration :     
<Connector port="8080"     maxHttpHeaderSize="8192"        URIEncoding="UTF-8"            maxThreads="400"                maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false"                redirectPort="8443" 
               acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true"                compression="on"/>

Configured virtual host on apache http server:

Listen 81
NameVirtualHost *:81
<VirtualHost *:81>
   ServerName jewelry.npa.com
   <Proxy *>
     AddDefaultCharset utf-8
     Order deny,allow
     Allow from all
   </Proxy> 
   ProxyPass / ajp://jewelry.npa.com:8009/
   ProxyPassReverse / ajp://jewelry.npa.com:8009/
   AddDefaultCharset utf-8
</VirtualHost>

Configured ajp connector on tomcat 5.5
<Connector port="8009"      useBodyEncodingForURI="false"               maxHttpHeaderSize="8192"                URIEncoding="UTF-8"               maxThreads="400" 
               maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false" 
               redirectPort="8443"                acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true" 
               compression="on"        protocol="AJP/1.3" />


Problem:

All requests, that has utf-8 url and NOT served by wicket filter works ok. 

All requests, that has utf-8 url and served by wicket filter works incorrect, because of  encoding issue with ajp connector and incorect work of WicketFilter#getRelativePath(HttpServletRequest request) lines 590 - 594.

Explanation:

ajp module change the percent encoding (http://en.wikipedia.org/wiki/Percent-encoding)

Proposed fix:

Need to use request.getServletPath() instead of request.getRequestURI() to get the relativePath, because of  
HttpServletRequest sepecification http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html 
Please look at difference getServletPath returns DECODED value, but getRequestURI and getRequestURL - not.







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

        

[jira] Assigned: (WICKET-2836) Incorrect work of WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg reassigned WICKET-2836:
-------------------------------------

    Assignee: Martin Grigorov  (was: Igor Vaynberg)

> Incorrect work of  WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector
> ------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2836
>                 URL: https://issues.apache.org/jira/browse/WICKET-2836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.7
>         Environment: Apache 2.2 http server with configured proxy_ajp_module,  Tomcat 5.5, wicket 1.4.7
>            Reporter: Igor Azarny
>            Assignee: Martin Grigorov
>         Attachments: wicket-2836.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Preconditions:
> Working application on tomacat 5.5 with non SSL HTTP/1.1 connector , that has utf-8 encoded URLs
> Connector configuration :     
> <Connector port="8080"     maxHttpHeaderSize="8192"        URIEncoding="UTF-8"            maxThreads="400"                maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false"                redirectPort="8443" 
>                acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true"                compression="on"/>
> Configured virtual host on apache http server:
> Listen 81
> NameVirtualHost *:81
> <VirtualHost *:81>
>    ServerName jewelry.npa.com
>    <Proxy *>
>      AddDefaultCharset utf-8
>      Order deny,allow
>      Allow from all
>    </Proxy> 
>    ProxyPass / ajp://jewelry.npa.com:8009/
>    ProxyPassReverse / ajp://jewelry.npa.com:8009/
>    AddDefaultCharset utf-8
> </VirtualHost>
> Configured ajp connector on tomcat 5.5
> <Connector port="8009"      useBodyEncodingForURI="false"               maxHttpHeaderSize="8192"                URIEncoding="UTF-8"               maxThreads="400" 
>                maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false" 
>                redirectPort="8443"                acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true" 
>                compression="on"        protocol="AJP/1.3" />
> Problem:
> All requests, that has utf-8 url and NOT served by wicket filter works ok. 
> All requests, that has utf-8 url and served by wicket filter works incorrect, because of  encoding issue with ajp connector and incorect work of WicketFilter#getRelativePath(HttpServletRequest request) lines 590 - 594.
> Explanation:
> ajp module change the percent encoding (http://en.wikipedia.org/wiki/Percent-encoding)
> Proposed fix:
> Need to use request.getServletPath() instead of request.getRequestURI() to get the relativePath, because of  
> HttpServletRequest sepecification http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html 
> Please look at difference getServletPath returns DECODED value, but getRequestURI and getRequestURL - not.

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


[jira] Commented: (WICKET-2836) Incorrect work of WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector

Posted by "Igor Azarny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12908314#action_12908314 ] 

Igor Azarny commented on WICKET-2836:
-------------------------------------

Patch attached, was tested on tests and reall applications. 
3 tests failed, but failures related to MockHttpServletRequest and some assumtions in test rather than changes in provided patch. Hope somebody more experienced in wicket that me can change it. During fixing this bug the WICKET-3032 was raised.

> Incorrect work of  WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector
> ------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2836
>                 URL: https://issues.apache.org/jira/browse/WICKET-2836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.7
>         Environment: Apache 2.2 http server with configured proxy_ajp_module,  Tomcat 5.5, wicket 1.4.7
>            Reporter: Igor Azarny
>            Assignee: Igor Vaynberg
>         Attachments: wicket-2836.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Preconditions:
> Working application on tomacat 5.5 with non SSL HTTP/1.1 connector , that has utf-8 encoded URLs
> Connector configuration :     
> <Connector port="8080"     maxHttpHeaderSize="8192"        URIEncoding="UTF-8"            maxThreads="400"                maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false"                redirectPort="8443" 
>                acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true"                compression="on"/>
> Configured virtual host on apache http server:
> Listen 81
> NameVirtualHost *:81
> <VirtualHost *:81>
>    ServerName jewelry.npa.com
>    <Proxy *>
>      AddDefaultCharset utf-8
>      Order deny,allow
>      Allow from all
>    </Proxy> 
>    ProxyPass / ajp://jewelry.npa.com:8009/
>    ProxyPassReverse / ajp://jewelry.npa.com:8009/
>    AddDefaultCharset utf-8
> </VirtualHost>
> Configured ajp connector on tomcat 5.5
> <Connector port="8009"      useBodyEncodingForURI="false"               maxHttpHeaderSize="8192"                URIEncoding="UTF-8"               maxThreads="400" 
>                maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false" 
>                redirectPort="8443"                acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true" 
>                compression="on"        protocol="AJP/1.3" />
> Problem:
> All requests, that has utf-8 url and NOT served by wicket filter works ok. 
> All requests, that has utf-8 url and served by wicket filter works incorrect, because of  encoding issue with ajp connector and incorect work of WicketFilter#getRelativePath(HttpServletRequest request) lines 590 - 594.
> Explanation:
> ajp module change the percent encoding (http://en.wikipedia.org/wiki/Percent-encoding)
> Proposed fix:
> Need to use request.getServletPath() instead of request.getRequestURI() to get the relativePath, because of  
> HttpServletRequest sepecification http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html 
> Please look at difference getServletPath returns DECODED value, but getRequestURI and getRequestURL - not.

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


[jira] Resolved: (WICKET-2836) Incorrect work of WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-2836.
-----------------------------------

      Assignee: Igor Vaynberg
    Resolution: Won't Fix

request.getservletpath() wont work because it doesnt return enough information, also, there doesnt seem to be any other method we can use. perhaps you can consider your proxy not to mangle urls.

> Incorrect work of  WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector
> ------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2836
>                 URL: https://issues.apache.org/jira/browse/WICKET-2836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.7
>         Environment: Apache 2.2 http server with configured proxy_ajp_module,  Tomcat 5.5, wicket 1.4.7
>            Reporter: Igor Azarny
>            Assignee: Igor Vaynberg
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Preconditions:
> Working application on tomacat 5.5 with non SSL HTTP/1.1 connector , that has utf-8 encoded URLs
> Connector configuration :     
> <Connector port="8080"     maxHttpHeaderSize="8192"        URIEncoding="UTF-8"            maxThreads="400"                maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false"                redirectPort="8443" 
>                acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true"                compression="on"/>
> Configured virtual host on apache http server:
> Listen 81
> NameVirtualHost *:81
> <VirtualHost *:81>
>    ServerName jewelry.npa.com
>    <Proxy *>
>      AddDefaultCharset utf-8
>      Order deny,allow
>      Allow from all
>    </Proxy> 
>    ProxyPass / ajp://jewelry.npa.com:8009/
>    ProxyPassReverse / ajp://jewelry.npa.com:8009/
>    AddDefaultCharset utf-8
> </VirtualHost>
> Configured ajp connector on tomcat 5.5
> <Connector port="8009"      useBodyEncodingForURI="false"               maxHttpHeaderSize="8192"                URIEncoding="UTF-8"               maxThreads="400" 
>                maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false" 
>                redirectPort="8443"                acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true" 
>                compression="on"        protocol="AJP/1.3" />
> Problem:
> All requests, that has utf-8 url and NOT served by wicket filter works ok. 
> All requests, that has utf-8 url and served by wicket filter works incorrect, because of  encoding issue with ajp connector and incorect work of WicketFilter#getRelativePath(HttpServletRequest request) lines 590 - 594.
> Explanation:
> ajp module change the percent encoding (http://en.wikipedia.org/wiki/Percent-encoding)
> Proposed fix:
> Need to use request.getServletPath() instead of request.getRequestURI() to get the relativePath, because of  
> HttpServletRequest sepecification http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html 
> Please look at difference getServletPath returns DECODED value, but getRequestURI and getRequestURL - not.

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


[jira] Reopened: (WICKET-2836) Incorrect work of WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag reopened WICKET-2836:
----------------------------------------


re-opened because patch has been provided.

> Incorrect work of  WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector
> ------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2836
>                 URL: https://issues.apache.org/jira/browse/WICKET-2836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.7
>         Environment: Apache 2.2 http server with configured proxy_ajp_module,  Tomcat 5.5, wicket 1.4.7
>            Reporter: Igor Azarny
>            Assignee: Igor Vaynberg
>         Attachments: wicket-2836.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Preconditions:
> Working application on tomacat 5.5 with non SSL HTTP/1.1 connector , that has utf-8 encoded URLs
> Connector configuration :     
> <Connector port="8080"     maxHttpHeaderSize="8192"        URIEncoding="UTF-8"            maxThreads="400"                maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false"                redirectPort="8443" 
>                acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true"                compression="on"/>
> Configured virtual host on apache http server:
> Listen 81
> NameVirtualHost *:81
> <VirtualHost *:81>
>    ServerName jewelry.npa.com
>    <Proxy *>
>      AddDefaultCharset utf-8
>      Order deny,allow
>      Allow from all
>    </Proxy> 
>    ProxyPass / ajp://jewelry.npa.com:8009/
>    ProxyPassReverse / ajp://jewelry.npa.com:8009/
>    AddDefaultCharset utf-8
> </VirtualHost>
> Configured ajp connector on tomcat 5.5
> <Connector port="8009"      useBodyEncodingForURI="false"               maxHttpHeaderSize="8192"                URIEncoding="UTF-8"               maxThreads="400" 
>                maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false" 
>                redirectPort="8443"                acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true" 
>                compression="on"        protocol="AJP/1.3" />
> Problem:
> All requests, that has utf-8 url and NOT served by wicket filter works ok. 
> All requests, that has utf-8 url and served by wicket filter works incorrect, because of  encoding issue with ajp connector and incorect work of WicketFilter#getRelativePath(HttpServletRequest request) lines 590 - 594.
> Explanation:
> ajp module change the percent encoding (http://en.wikipedia.org/wiki/Percent-encoding)
> Proposed fix:
> Need to use request.getServletPath() instead of request.getRequestURI() to get the relativePath, because of  
> HttpServletRequest sepecification http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html 
> Please look at difference getServletPath returns DECODED value, but getRequestURI and getRequestURL - not.

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


[jira] Updated: (WICKET-2836) Incorrect work of WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector

Posted by "Igor Azarny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Azarny updated WICKET-2836:
--------------------------------

    Attachment: wicket-2836.patch

> Incorrect work of  WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector
> ------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2836
>                 URL: https://issues.apache.org/jira/browse/WICKET-2836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.7
>         Environment: Apache 2.2 http server with configured proxy_ajp_module,  Tomcat 5.5, wicket 1.4.7
>            Reporter: Igor Azarny
>            Assignee: Igor Vaynberg
>         Attachments: wicket-2836.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Preconditions:
> Working application on tomacat 5.5 with non SSL HTTP/1.1 connector , that has utf-8 encoded URLs
> Connector configuration :     
> <Connector port="8080"     maxHttpHeaderSize="8192"        URIEncoding="UTF-8"            maxThreads="400"                maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false"                redirectPort="8443" 
>                acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true"                compression="on"/>
> Configured virtual host on apache http server:
> Listen 81
> NameVirtualHost *:81
> <VirtualHost *:81>
>    ServerName jewelry.npa.com
>    <Proxy *>
>      AddDefaultCharset utf-8
>      Order deny,allow
>      Allow from all
>    </Proxy> 
>    ProxyPass / ajp://jewelry.npa.com:8009/
>    ProxyPassReverse / ajp://jewelry.npa.com:8009/
>    AddDefaultCharset utf-8
> </VirtualHost>
> Configured ajp connector on tomcat 5.5
> <Connector port="8009"      useBodyEncodingForURI="false"               maxHttpHeaderSize="8192"                URIEncoding="UTF-8"               maxThreads="400" 
>                maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false" 
>                redirectPort="8443"                acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true" 
>                compression="on"        protocol="AJP/1.3" />
> Problem:
> All requests, that has utf-8 url and NOT served by wicket filter works ok. 
> All requests, that has utf-8 url and served by wicket filter works incorrect, because of  encoding issue with ajp connector and incorect work of WicketFilter#getRelativePath(HttpServletRequest request) lines 590 - 594.
> Explanation:
> ajp module change the percent encoding (http://en.wikipedia.org/wiki/Percent-encoding)
> Proposed fix:
> Need to use request.getServletPath() instead of request.getRequestURI() to get the relativePath, because of  
> HttpServletRequest sepecification http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html 
> Please look at difference getServletPath returns DECODED value, but getRequestURI and getRequestURL - not.

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


[jira] Commented: (WICKET-2836) Incorrect work of WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904657#action_12904657 ] 

Igor Vaynberg commented on WICKET-2836:
---------------------------------------

you are more then welcome to provide a patch.

> Incorrect work of  WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector
> ------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2836
>                 URL: https://issues.apache.org/jira/browse/WICKET-2836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.7
>         Environment: Apache 2.2 http server with configured proxy_ajp_module,  Tomcat 5.5, wicket 1.4.7
>            Reporter: Igor Azarny
>            Assignee: Igor Vaynberg
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Preconditions:
> Working application on tomacat 5.5 with non SSL HTTP/1.1 connector , that has utf-8 encoded URLs
> Connector configuration :     
> <Connector port="8080"     maxHttpHeaderSize="8192"        URIEncoding="UTF-8"            maxThreads="400"                maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false"                redirectPort="8443" 
>                acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true"                compression="on"/>
> Configured virtual host on apache http server:
> Listen 81
> NameVirtualHost *:81
> <VirtualHost *:81>
>    ServerName jewelry.npa.com
>    <Proxy *>
>      AddDefaultCharset utf-8
>      Order deny,allow
>      Allow from all
>    </Proxy> 
>    ProxyPass / ajp://jewelry.npa.com:8009/
>    ProxyPassReverse / ajp://jewelry.npa.com:8009/
>    AddDefaultCharset utf-8
> </VirtualHost>
> Configured ajp connector on tomcat 5.5
> <Connector port="8009"      useBodyEncodingForURI="false"               maxHttpHeaderSize="8192"                URIEncoding="UTF-8"               maxThreads="400" 
>                maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false" 
>                redirectPort="8443"                acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true" 
>                compression="on"        protocol="AJP/1.3" />
> Problem:
> All requests, that has utf-8 url and NOT served by wicket filter works ok. 
> All requests, that has utf-8 url and served by wicket filter works incorrect, because of  encoding issue with ajp connector and incorect work of WicketFilter#getRelativePath(HttpServletRequest request) lines 590 - 594.
> Explanation:
> ajp module change the percent encoding (http://en.wikipedia.org/wiki/Percent-encoding)
> Proposed fix:
> Need to use request.getServletPath() instead of request.getRequestURI() to get the relativePath, because of  
> HttpServletRequest sepecification http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html 
> Please look at difference getServletPath returns DECODED value, but getRequestURI and getRequestURL - not.

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


[jira] Commented: (WICKET-2836) Incorrect work of WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector

Posted by "Igor Azarny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904584#action_12904584 ] 

Igor Azarny commented on WICKET-2836:
-------------------------------------

I am pretty sure, that  both methods (request.getServletPath() and request.getRequestURI() )  can be used to collect necessary information,  so this bug  can be fixed. 

> Incorrect work of  WicketFilter with UTF-8 urls through proxy_ajp_module and ajp connector
> ------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2836
>                 URL: https://issues.apache.org/jira/browse/WICKET-2836
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.7
>         Environment: Apache 2.2 http server with configured proxy_ajp_module,  Tomcat 5.5, wicket 1.4.7
>            Reporter: Igor Azarny
>            Assignee: Igor Vaynberg
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Preconditions:
> Working application on tomacat 5.5 with non SSL HTTP/1.1 connector , that has utf-8 encoded URLs
> Connector configuration :     
> <Connector port="8080"     maxHttpHeaderSize="8192"        URIEncoding="UTF-8"            maxThreads="400"                maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false"                redirectPort="8443" 
>                acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true"                compression="on"/>
> Configured virtual host on apache http server:
> Listen 81
> NameVirtualHost *:81
> <VirtualHost *:81>
>    ServerName jewelry.npa.com
>    <Proxy *>
>      AddDefaultCharset utf-8
>      Order deny,allow
>      Allow from all
>    </Proxy> 
>    ProxyPass / ajp://jewelry.npa.com:8009/
>    ProxyPassReverse / ajp://jewelry.npa.com:8009/
>    AddDefaultCharset utf-8
> </VirtualHost>
> Configured ajp connector on tomcat 5.5
> <Connector port="8009"      useBodyEncodingForURI="false"               maxHttpHeaderSize="8192"                URIEncoding="UTF-8"               maxThreads="400" 
>                maxKeepAliveRequests="100"               minSpareThreads="25"                maxSpareThreads="75"               enableLookups="false" 
>                redirectPort="8443"                acceptCount="100"               connectionTimeout="20000"                disableUploadTimeout="true" 
>                compression="on"        protocol="AJP/1.3" />
> Problem:
> All requests, that has utf-8 url and NOT served by wicket filter works ok. 
> All requests, that has utf-8 url and served by wicket filter works incorrect, because of  encoding issue with ajp connector and incorect work of WicketFilter#getRelativePath(HttpServletRequest request) lines 590 - 594.
> Explanation:
> ajp module change the percent encoding (http://en.wikipedia.org/wiki/Percent-encoding)
> Proposed fix:
> Need to use request.getServletPath() instead of request.getRequestURI() to get the relativePath, because of  
> HttpServletRequest sepecification http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html 
> Please look at difference getServletPath returns DECODED value, but getRequestURI and getRequestURL - not.

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