WebSession: Prevent NPE in GitSmartHttpTools.isGitClient()

ContinuingHttpServletRequest doesn't have request URI. That cause

  public static boolean isInfoRefs(HttpServletRequest req) {
    return req.getRequestURI().endsWith(INFO_REFS_PATH)
    && VALID_SERVICES.contains(req.getParameter("service"));
  }

to throw NPE.

More robust implementation of isInfoRefs() could check for

  req.getRequestURI() != null

or swap the conditions.

Bug was filled against JGit project: [1].

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=435404

Change-Id: Iac85505720496b411814a6d050a7612d507bf3a6
1 file changed