aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws/src/test
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-01-05 21:08:55 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-01-06 14:06:36 +0100
commit07849e84ffeccbb12a37a76e52c4d6c16a5c1fd2 (patch)
tree5b00b89552459d52ad66bd70019a61d17902f594 /sonar-ws/src/test
parent381a4374fbf51443a5c88308775852696755520f (diff)
downloadsonarqube-07849e84ffeccbb12a37a76e52c4d6c16a5c1fd2.tar.gz
sonarqube-07849e84ffeccbb12a37a76e52c4d6c16a5c1fd2.zip
SONAR-8545 Fix encoding of POST request parameters in ws-client
Upgrade to Tomcat 8.5.9 breaks the POST requests sent by ws-client when a query parameter contains invalid characters like {, } or ". This is the case of api/settings/set on property sets (see param field_values which is a json object). See https://github.com/apache/tomcat80/commit/779d5d34e68e50d2f721897050b147106992f566
Diffstat (limited to 'sonar-ws/src/test')
-rw-r--r--sonar-ws/src/test/java/org/sonarqube/ws/client/HttpConnectorTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/HttpConnectorTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/HttpConnectorTest.java
index 7cc937b6233..ea233bad6d8 100644
--- a/sonar-ws/src/test/java/org/sonarqube/ws/client/HttpConnectorTest.java
+++ b/sonar-ws/src/test/java/org/sonarqube/ws/client/HttpConnectorTest.java
@@ -213,7 +213,8 @@ public class HttpConnectorTest {
// verify the request received by server
RecordedRequest recordedRequest = server.takeRequest();
assertThat(recordedRequest.getMethod()).isEqualTo("POST");
- assertThat(recordedRequest.getPath()).isEqualTo("/api/issues/search?severity=MAJOR");
+ assertThat(recordedRequest.getPath()).isEqualTo("/api/issues/search");
+ assertThat(recordedRequest.getBody().readUtf8()).isEqualTo("severity=MAJOR");
}
@Test