org.switchyard.component.http.endpoint.StandaloneEndpointPublisher that is used in testing has a bug in HTTP request query parameter handling that breaks on parameters with no value (...?param= or .../param1=¶m2=val2).
The actual offending code (StandaloneEndpointPublisher.java:184):
// Http Query params...
if (requestInfo.getQueryString() != null) {
StringTokenizer params = new StringTokenizer(requestInfo.getQueryString(), "&");
while (params.hasMoreTokens()) {
String param = params.nextToken();
String[] nameValue = param.split("=");
requestInfo.addQueryParam(nameValue[0], nameValue[1]);
}
}
In case of param containing "param=" with no value, nameValue will be [ "param" ], an array of size 1, not 2. Exception.
From my experience, this actually hangs unit tests that hit this bug.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira