mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
24.00.2013 2eb2c7c3fc01284b4741122784104241494321fa
Fixed the query for the case where there are no query parameters.

HTTPClientConnection.java:
Added computeQuery() that does a null check on the request's queryString.
In ctor, call computeQuery().
1 files modified
11 ■■■■■ changed files
opends/src/server/org/opends/server/protocols/http/HTTPClientConnection.java 11 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/protocols/http/HTTPClientConnection.java
@@ -262,7 +262,7 @@
    this.securityStrengthFactor =
        calcSSF(request.getAttribute(SERVLET_SSF_CONSTANT));
    this.method = request.getMethod();
    this.query = request.getRequestURI() + "?" + request.getQueryString();
    this.query = computeQuery(request);
    this.protocol = request.getProtocol();
    this.userAgent = request.getHeader("User-Agent");
@@ -278,6 +278,15 @@
    this.connectionID = DirectoryServer.newConnectionAccepted(this);
  }
  private String computeQuery(HttpServletRequest request)
  {
    if (request.getQueryString() != null)
    {
      return request.getRequestURI() + "?" + request.getQueryString();
    }
    return request.getRequestURI();
  }
  /** {@inheritDoc} */
  @Override
  public String getAuthUser()