Illegal character in query at index if URL contains "{}"

2,393 views
Skip to first unread message

ictes...@gmail.com

unread,
Jun 30, 2014, 6:00:32 AM6/30/14
to gat...@googlegroups.com
Hi,

I'm using recorder of Gatling 2.0.0-SNAPSHOT. My HTML like this:
<a href="javascript:" onclick="javascript:RefreshPageTo(event, &quot;/Lists/SecurityAuditLog/AllItems.aspx?Paged=TRUE&amp;p_ID=30\u0026PageFirstRow=31\u0026\u0026View={5C1F918F-692F-480E-8922-9C1E6609D4E9}&quot;);javascript:return false;"><img border="0" alt="Next" src="/_layouts/1033/images/next.gif"></a>

It throws exception, it looks like my URL contains "{" but this is required and cannot removed it:

Jun 30, 2014 4:52:14 PM org.jboss.netty.channel.SimpleChannelHandler
WARNING: EXCEPTION, please implement io.gatling.recorder.http.handler.ServerHttpResponseHandler.exceptionCaught() for proper handling.
java.net.URISyntaxException: Illegal character in query at index 110: http://local.innovocommerce.com/Lists/SecurityAuditLog/AllItems.aspx?Paged=TRUE&p_ID=30&PageFirstRow=31&&View={5C1F918F-692F-480E-8922-9C1E6609D4E9}
    at java.net.URI$Parser.fail(URI.java:2829)
    at java.net.URI$Parser.checkChars(URI.java:3002)
    at java.net.URI$Parser.parseHierarchical(URI.java:3092)
    at java.net.URI$Parser.parse(URI.java:3034)
    at java.net.URI.<init>(URI.java:595)
    at io.gatling.recorder.scenario.RequestElement$$anonfun$1$$anonfun$applyOrElse$1.apply(ScenarioElement.scala:66)
    at io.gatling.recorder.scenario.RequestElement$$anonfun$1$$anonfun$applyOrElse$1.apply(ScenarioElement.scala:64)
    at scala.Option.map(Option.scala:145)
    at io.gatling.recorder.scenario.RequestElement$$anonfun$1.applyOrElse(ScenarioElement.scala:64)
    at io.gatling.recorder.scenario.RequestElement$$anonfun$1.applyOrElse(ScenarioElement.scala:60)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33)
    at scala.Option.collect(Option.scala:250)
    at io.gatling.recorder.scenario.RequestElement$.apply(ScenarioElement.scala:60)
    at io.gatling.recorder.controller.RecorderController.receiveResponse(RecorderController.scala:128)
    at io.gatling.recorder.http.handler.ServerHttpResponseHandler.messageReceived(ServerHttpResponseHandler.scala:43)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
    at org.jboss.netty.handler.codec.http.HttpChunkAggregator.messageReceived(HttpChunkAggregator.java:194)
    at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:132)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
    at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:452)
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536)
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)
    at org.jboss.netty.handler.codec.http.HttpClientCodec.handleUpstream(HttpClientCodec.java:92)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
    at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
    at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
   

   
How to fix this?
please give me your advise.

Thanks

Pierre DAL-PRA

unread,
Jun 30, 2014, 6:12:02 AM6/30/14
to gat...@googlegroups.com
Trouble is, by section 2.4.3 of RFC 2396, which defines URIs syntax, curly brackets, likes pipes are deemed unsafe, and Java's standard class for URL just doesn't accept them.

One way to bypass this is to encode your curly brackets.

Cheers, 

Pierre


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ictes...@gmail.com

unread,
Jul 2, 2014, 3:06:00 AM7/2/14
to gat...@googlegroups.com
Thanks Pierre.

I encoded "{" and "}" to "%7B" and "%7D", it works now.
Reply all
Reply to author
Forward
0 new messages