@Override
	public File createFile(final HTTPRequest request, String filePath)
	{
		final Pair<String,String> mountPath=config.getMount(request.getHost(),request.getClientPort(),filePath);
		if(mountPath != null)
		{
			String newFullPath=filePath.substring(mountPath.first.length());
			if(newFullPath.startsWith("/")&&mountPath.second.endsWith("/"))
				newFullPath=newFullPath.substring(1);
			filePath = (mountPath.second+newFullPath);
		}
		final FileManager mgr=config.getFileManager();
		File finalFile = mgr.createFileFromPath(filePath.replace('/', mgr.getFileSeparator()));
		// see if the path we have is complete, or if there's an implicit default page requested.
		if(request.getUrlPath().endsWith("/"))
		{
			final File dirFile = finalFile;
			finalFile=mgr.createFileFromPath(finalFile,config.getDefaultPage());
			if((!finalFile.exists())&&(dirFile.exists())&&(dirFile.isDirectory()))
			{
				String browseCode = config.getBrowseCode(request.getHost(),request.getClientPort(),filePath);
				if(browseCode != null) // it's allowed to be browsed
					finalFile = dirFile;
			}
		}
		return finalFile;
	}