private boolean handlePost(HttpServletRequest request, HttpServletResponse response, String path) throws CoreException, IOException, JSONException,
ServletException, URISyntaxException, ConfigInvalidException {
Path p = new Path(path);
if (p.segment(0).equals(Clone.RESOURCE) && p.segment(1).equals("file")) { //$NON-NLS-1$
// expected path /gitapi/config/clone/file/{path}
File gitDir = GitUtils.getGitDir(p.removeFirstSegments(1));
if (gitDir == null)
return statusHandler.handleRequest(request, response,
new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_NOT_FOUND, NLS.bind("No repository found under {0}", p.removeFirstSegments(1)),
null));
URI cloneLocation = BaseToCloneConverter.getCloneLocation(getURI(request), BaseToCloneConverter.CONFIG);