Issue Type: Bug Bug
Affects Versions: 1.0, 1.1
Assignee: Unassigned
Components: component-http
Created: 31/Mar/14 7:43 PM
Description:

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=&param2=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.

Project: SwitchYard
Priority: Major Major
Reporter: Artem Egorkine
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