Bug 796085

Summary: Unable to store keys that contain slashes and are URLEncoded via REST endpoint
Product: [JBoss] JBoss Data Grid 6 Reporter: Martin Gencur <mgencur>
Component: unspecifiedAssignee: Tristan Tarrant <ttarrant>
Status: CLOSED NOTABUG QA Contact: Martin Gencur <mgencur>
Severity: high Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: jdg-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-02 14:58:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Failure description none

Description Martin Gencur 2012-02-22 09:21:58 UTC
Created attachment 564880 [details]
Failure description

Description of problem:

Storing a URL encoded key that contains slashes fail with HTTP 404 error response (failure attached). Server log does not show any exception.

REST endpoint should be able to handle URLs like this one:
http://localhost:8080/rest/___defaultcache/x%2Fy  where x%2Fy is "x/y" encoded.

Version-Release number of selected component (if applicable):

Affects DR3 build of EDG/JDG.

How reproducible:

Run a testKeyIncludingSlashURLEncoded test method in RESTClientTestCase ( https://svn.devel.redhat.com/repos/jboss-qa/edg/edg-functional-tests/trunk/core-tests/src/test/java/org/jboss/test/cluster/datagrid/rest/RESTClientTestCase.java )

To run the test, checkout edg-functional tests, go to core-tests sub-directory and run: "mvn verify -Plocal -Dnode0=/home/mgencur/Java/infinispan/dr/datagrid-6.0.0.DR3-redhat-1 -Dtest=RESTClientTestCase#testKeyIncludingSlashURLEncoded"
  
Actual results:


Expected results:


Additional info:

Comment 1 Tristan Tarrant 2012-03-02 14:58:29 UTC
This is normal behaviour for JBossWeb. To enable the use of encoded slashes in paths, the server must be started with -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true

Please read http://tomcat.apache.org/security-6.html#Fixed_in_Apache_Tomcat_6.0.10

for more information

I'm marking this as CLOSED NOTABUG since it is out of the scope of JDG itself

Comment 2 Martin Gencur 2012-03-08 09:19:49 UTC
Yea, I verified that the test passes with this settings.