gatling / gatling

Modern Load Testing as Code
https://gatling.io
Apache License 2.0
6.4k stars 1.19k forks source link

Recorder throws an exception when there are pipe "|" characters in URL #1272

Closed Skeebl closed 11 years ago

Skeebl commented 11 years ago

Pipes ("|") are actually considered unsafe characters in URL (as of RFC1738), but are used on some websites. The recorder doesn't handle the request properly and throw the following exception:

java.net.URISyntaxException: Illegal character in path at index 31: http://adserver.adtech.de/addyn|3.0|296|3872016|0|16|ADTECH;loc=100;target=_blank;misc=1043156433;rdclick=http://ba.ccm2.net/RealMedia/ads/click_lx.ads/fr_ccm_hightech/news/L20/1043156433/Position3/OasDefault/autopromo_keljob_ccm/autopromo_kelformation_1_ccm.html/574b7276735648616451774141686f70?
    at java.net.URI$Parser.fail(URI.java:2829) ~[na:1.7.0_07]
    at java.net.URI$Parser.checkChars(URI.java:3002) ~[na:1.7.0_07]
    at java.net.URI$Parser.parseHierarchical(URI.java:3086) ~[na:1.7.0_07]
    at java.net.URI$Parser.parse(URI.java:3034) ~[na:1.7.0_07]
    at java.net.URI.<init>(URI.java:595) ~[na:1.7.0_07]
    at io.gatling.recorder.http.handler.BrowserHttpRequestHandler$$anonfun$2.apply(BrowserHttpRequestHandler.scala:38) ~[classes/:na]
    at io.gatling.recorder.http.handler.BrowserHttpRequestHandler$$anonfun$2.apply(BrowserHttpRequestHandler.scala:37) ~[classes/:na]
    at scala.Option.getOrElse(Option.scala:120) ~[scala-library-2.10.2.jar:na]
    at io.gatling.recorder.http.handler.BrowserHttpRequestHandler.propagateRequest(BrowserHttpRequestHandler.scala:37) ~[classes/:na]
    at io.gatling.recorder.http.handler.AbstractBrowserRequestHandler.messageReceived(AbstractBrowserRequestHandler.scala:52) ~[classes/:na]
    at org.jboss.netty.handler.codec.http.HttpContentEncoder.messageReceived(HttpContentEncoder.java:81) ~[netty-3.6.6.Final.jar:na]
    at org.jboss.netty.handler.codec.http.HttpChunkAggregator.messageReceived(HttpChunkAggregator.java:145) ~[netty-3.6.6.Final.jar:na]
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.6.6.Final.jar:na]
    at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:459) ~[netty-3.6.6.Final.jar:na]
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536) ~[netty-3.6.6.Final.jar:na]
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435) ~[netty-3.6.6.Final.jar:na]
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[netty-3.6.6.Final.jar:na]
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[netty-3.6.6.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) ~[netty-3.6.6.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109) ~[netty-3.6.6.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) ~[netty-3.6.6.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90) ~[netty-3.6.6.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) ~[netty-3.6.6.Final.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_07]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_07]
    at java.lang.Thread.run(Thread.java:722) [na:1.7.0_07]
slandelle commented 11 years ago

Test case to reproduce?

Skeebl commented 11 years ago

With the recorder as a proxy for a browser (firefox in my case), go to http://www.commentcamarche.net/. Exceptions are thrown for 2 request with pipes in their urls. Firefox doesn't seem to get any response for theses requests.