Commit 8eca98de authored by Jeff Burke's avatar Jeff Burke
Browse files

s1738: add get and update support to gmslcient, bug fix in GroupsActionFactory...

s1738: add get and update support to gmslcient, bug fix in GroupsActionFactory to not allow a -1 port in an url, added unit and int test
parent da3dd5a9
Loading
Loading
Loading
Loading
+16 −9
Original line number Diff line number Diff line
@@ -137,15 +137,22 @@ public class GroupsActionFactory
            }
            else if (method.equals("POST"))
            {
                final URL requestURL =
                        new URL(request.getRequestURL().toString());
                final String redirectURI = requestURL.getProtocol() + "://"
                                           + requestURL.getHost() + ":"
                                           + requestURL.getPort()
                                           + request.getContextPath()
                                           + request.getServletPath()
                                           + "/" + path;
                action = new ModifyGroupAction(logInfo, groupName, redirectURI,
                final URL requestURL = new URL(request.getRequestURL().toString());
                final StringBuilder sb = new StringBuilder();
                sb.append(requestURL.getProtocol());
                sb.append("://");
                sb.append(requestURL.getHost());
                if (requestURL.getPort() > 0)
                {
                    sb.append(":");
                    sb.append(requestURL.getPort());
                }
                sb.append(request.getContextPath());
                sb.append(request.getServletPath());
                sb.append("/");
                sb.append(path);

                action = new ModifyGroupAction(logInfo, groupName, sb.toString(),
                                               request.getInputStream());
            }
        }