Jmeter 引數未編碼異常:java.net.URISyntaxException: Illegal character in query at index 172
阿新 • • 發佈:2019-01-08
最近在使用jmeter進行測試時,每次回放時,都回放失敗,檢視response data 提示:java.net.URISyntaxException: Illegal character in query at index 172 的異常資訊。如下:
java.net.URISyntaxException: Illegal character in query at index 172: http://www.xxxx.com/discuz/images/default/right_big.gif?
Accept=text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8&Accept-Encoding=gzip, deflate, br&Accept-Language=zh-CN%2Czh%3Bq%3D0.9&User-Agent=Mozilla%2F5.0+%28Windows+NT+6.1%3B+WOW64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F63.0.3239.132+Safari%2F537.36&pO5_auth=a7d6J%2FoHPxe6UU9y6yFwV8R0WOiULiyRs8HKRwtiwdG3Za46e3H0TJySLFHtL3NLqsW4k%2FepaHLkIFGA7kNsr2w
仔細檢視引數,發現請求的引數都是以明碼的形式傳送。
解決方法:在將勾選引數後面的:encode(先編碼在傳送請求)
再次執行,即可執行通過,如下圖: