Map the route for HTTP HEAD requests

@param path       the path
@param acceptType the accept type
@param route      The route
350221
public static void head(String path, String acceptType, Route route) {
        getInstance().head(path, acceptType, route);
    }
1232419
public void setRequestPath(String mapping, String path) {
		this.requestPath = path;
		int paramStartIdx = requestPath.indexOf("?");
		if(StringUtils.isEmpty(mapping)){
			if(paramStartIdx != -1){
				this.servletPath = requestPath.substring(0, paramStartIdx);
			}else{
				this.servletPath = requestPath;
			}
		}else{
			this.servletPath = PathNormalizer.asPath(mapping);
			String pathInfo = removeServletMappingFromPath(path, mapping);
			this.pathInfo = pathInfo;
		}
		
		// Sets the request URI
		if(paramStartIdx == -1){
			this.requestURI = requestPath;
		}else{
			this.requestURI = requestPath.substring(0, paramStartIdx);
		}
		
		initParameters();
		
	}
260457
public Blade post(@NonNull String path, @NonNull RouteHandler handler) {
        this.routeMatcher.addRoute(path, handler, HttpMethod.POST);
        return this;
    }
595572
public void withRoutes(MangooRoute... routes) {
        Objects.requireNonNull(routes, Required.ROUTE.toString());
        
        for (MangooRoute route : routes) {
            RequestRoute requestRoute = (RequestRoute) route;
            requestRoute.withControllerClass(this.controllerClass);

            if (hasBasicAuthentication()) {
                requestRoute.withBasicAuthentication(this.username, this.password, this.secret);
            }
            
            if (hasAuthentication()) {
                requestRoute.withAuthentication();
            }
            
            if (hasAuthorization()) {
                requestRoute.withAuthorization();
            }
            
            if (hasBlocking()) {
                requestRoute.withNonBlocking();
            }
            
            if (requestRoute.getLimit() == 0) {
                requestRoute.withRequestLimit(this.limit);
            }
            
            if (requestRoute.hasMultipleMethods()) {
                for (Http method : requestRoute.getMethods()) {
                    requestRoute.withHttpMethod(method);
                    Router.addRoute(requestRoute);
                }
            } else {
                Router.addRoute(requestRoute);
            }
        }
    }
269130
public Blade put(@NonNull String path, @NonNull RouteHandler handler) {
        this.routeMatcher.addRoute(path, handler, HttpMethod.PUT);
        return this;
    }
302957
public boolean accept(String path) {
        if (allow.isEmpty() && deny.isEmpty()) {
            return true;
        }
        // Check if the path is denied
        for (Pattern p : deny) {
            if (p.matcher(path).matches()) {
                return false;
            }
        }

        // Check if the path is accepted
        for (Pattern p : allow) {
            if (p.matcher(path).matches()) {
                return true;
            }
        }

        // Denied by default.
        return !deny.isEmpty();
    }
429012
public void get(String path, Route route, ResponseTransformer transformer) {
        addRoute(HttpMethod.get, ResponseTransformerRouteImpl.create(path, route, transformer));
    }
409754
public function addRoute(string $type, string $name, string $route): void{
        if (!isset($this->routes[$name])) {
            $this->routes[$name] = [];
        }
        $this->routes[$name][$type] = $route;
    }
1344465
public MuleMessage doHttpReceiveRequest(String url, String method, String acceptConentType, String acceptCharSet) {    	

		Map<String, String> properties = new HashMap<String, String>();
    	properties.put("http.method",    method);
    	properties.put("Accept",         acceptConentType);
    	properties.put("Accept-Charset", acceptCharSet);

    	MuleMessage response = send(url, null, properties);
    	
    	return response;
	}
505704
public static TemplateViewRouteImpl create(String path,
                                               TemplateViewRoute route,
                                               TemplateEngine engine) {

        return create(path, Service.DEFAULT_ACCEPT_TYPE, route, engine);
    }
1094893
public static void delete(String path, String acceptType, Route route) {
        getInstance().delete(path, acceptType, route);
    }
536469
public void put(String fromPath, String toPath, Status status) {
        http.put(fromPath, redirectRoute(toPath, status));
    }
1263093
public static void post(String path, String acceptType, Route route) {
        getInstance().post(path, acceptType, route);
    }
261835
@Override
  public boolean accept(Path path) {
    if (!super.accept(path)) {
      return false;
    }

    JobFile jobFile = new JobFile(path.getName());
    if (jobFile.isJobConfFile() || jobFile.isJobHistoryFile()) {
      try {
        FileSystem fs = path.getFileSystem(myConf);
        FileStatus fileStatus = fs.getFileStatus(path);
        long fileModificationTimeMillis = fileStatus.getModificationTime();
        return accept(fileModificationTimeMillis);
      } catch (IOException e) {
        throw new ImportException("Cannot determine file modification time of "
            + path.getName(), e);
      }
    } else {
      // Reject anything that does not match a job conf filename.
      LOG.info(" Not a valid job conf / job history file "+ path.getName());
      return false;
    }
  }
754654
public void makeDirectory(String path) throws SftpStatusException,
			SshException {
		makeDirectory(path, new SftpFileAttributes(this,
				SftpFileAttributes.SSH_FILEXFER_TYPE_DIRECTORY));
	}
724555
private void init(PathImpl path)
  {
    _contentLength = -1;
    _isChunked = false;
    _isRequestDone = false;
    _didGet = false;
    _isPost = false;
    _isHead = false;
    _method = null;
    _attributes.clear();
    
    //setPath(path);

    if (path instanceof HttpPath)
      _virtualHost = ((HttpPath) path).getVirtualHost();
  }
1118179
private void add(HttpMethod method, String url, String acceptedType, Object target) {
        RouteEntry entry = new RouteEntry();
        entry.httpMethod = method;
        entry.path = url;
        entry.target = target;
        entry.acceptedType = acceptedType;
        LOG.debug("Adds route: " + entry);
        // Adds to end of list
        routes.add(entry);
    }