private static String normalize(String p){
  if (p == null)   return "";
  if (p.endsWith("/") && p.length() > 1)   return p.substring(0,p.length() - 1);
  return p;
}

private static String normalize ( String p ) { if ( p == null ) return "" ; if ( p . endsWith ( "/" ) && p . length ( ) > 1 ) return p . substring ( 0 , p . length ( ) - 1 ) ; return p ; }
trim the trailing ' / ' if its there , and convert null to empty string . we want : / update / csv and / update / csv / to map to the same handler
