[ 
https://issues.apache.org/jira/browse/WINK-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryant Luk resolved WINK-232.
-----------------------------

    Resolution: Won't Fix
      Assignee: Bryant Luk

The URL scheme you are using is failing due to the '[' as you investigated.  I 
don't think we should re-encode the URL since that could lead to a double 
encoding.  The general expectation is that a URI object could be used and the 
method with the String parameter is just convenient.  You added an additional 
comment detailing a workaround by encoding the URI into a new URI() object 
instead which seems to work for you.

If you have a patch for how you think the function should work, please feel 
free to add.

> URISyntaxException when using "[" brackets in query string
> ----------------------------------------------------------
>
>                 Key: WINK-232
>                 URL: https://issues.apache.org/jira/browse/WINK-232
>             Project: Wink
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 1.0
>            Reporter: Henry Tafolla
>            Assignee: Bryant Luk
>
> When using brackets in url query strings an exception is thrown.
> java.net.URISyntaxException: Illegal character in path at index 27: 
> http://localhost:8081/Leaf/[?userId='123'][/priority]
> Stacktrace:
> 380507 [http-8080-1] INFO 
> org.apache.wink.common.internal.application.ApplicationFileLoader - Loading 
> application from META-INF/core/wink-providers.
> 380535 [http-8080-1] INFO org.apache.wink.client.internal.ResourceImpl - 
> Issuing client GET method request to URI at 
> http://localhost:8081/Twig/?user.guid='123' with null entity class and 
> CaseInsensitiveMultivaluedMap [map=[Accept=application/json]] headers
> Nov 20, 2009 5:17:10 AM org.apache.catalina.core.ApplicationContext log
> SEVERE: Exception while dispatching incoming RPC call
> com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public 
> abstract java.util.Map 
> com.mytwig.twig.client.TwigService.getTwig(java.lang.String)' threw an 
> unexpected exception: java.lang.IllegalArgumentException
>       at 
> com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360)
>       at 
> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546)
>       at 
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:166)
>       at 
> com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>       at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>       at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>       at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>       at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>       at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>       at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>       at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>       at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
>       at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
>       at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>       at 
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
>       at java.lang.Thread.run(Thread.java:636)
> Caused by: java.lang.IllegalArgumentException
>       at java.net.URI.create(URI.java:859)
>       at org.apache.wink.client.RestClient.resource(RestClient.java:113)
>       at 
> com.mytwig.twig.server.TwigServiceImpl.getTwig(TwigServiceImpl.java:54)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:616)
>       at 
> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
>       ... 16 more
> Caused by: java.net.URISyntaxException: Illegal character in path at index 
> 27: http://localhost:8081/Leaf/[?userId='123'][/priority]
>       at java.net.URI$Parser.fail(URI.java:2825)
>       at java.net.URI$Parser.checkChars(URI.java:2998)
>       at java.net.URI$Parser.parseHierarchical(URI.java:3082)
>       at java.net.URI$Parser.parse(URI.java:3030)
>       at java.net.URI.<init>(URI.java:595)
>       at java.net.URI.create(URI.java:857)
>       ... 23 more

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

Reply via email to