[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3992) SEAM RestEasy library throws exception if an encoded url is entered/

John Sublette (JIRA) jira-events at lists.jboss.org
Thu Mar 5 11:44:22 EST 2009

    [ https://jira.jboss.org/jira/browse/JBSEAM-3992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12455660#action_12455660 ] 

John Sublette commented on JBSEAM-3992:

The following code should show this problem:

public class TestServer {
	public String echoDate(@PathParam("dateTime") GregorianCalendar date)  {
	return date.toString();

Run by going to 

(absolute path encoded to: ".../echo/2007-07-10T14%3A54%3A56-05%3A00", path needs to be "/echo/2007-07-10T14%3A54%3A56-05%3A00" after seam resource path is stripped off)

The path has to be encoded

> SEAM RestEasy library throws exception if an encoded url is entered/
> --------------------------------------------------------------------
>                 Key: JBSEAM-3992
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3992
>             Project: Seam
>          Issue Type: Bug
>          Components: WS
>    Affects Versions: 2.1.1.GA
>         Environment: Tomcat with SEAM 2.1.1.GA and resteasy
>            Reporter: John Sublette
>            Priority: Minor
> Call from org.jboss.seam.resteasy.ResteasyResourceAdapter.??.process() to UriInfoImpl(URI absolutePath, String encodedPath, String queryString, List<PathSegment> encodedPathSegments) requires an encodedPath passed in, which is not being done.  A StringIndexOutOfBoundsException is thrown due to the "encodedPath" not being found in the absolute path.
> Code that sets "path" can be moved after the setup of absolutePath and changed to:
>                     String path = PathHelper.getEncodedPathInfo(absolutePath.getRawPath(), request.getContextPath());

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


More information about the seam-issues mailing list