<commit_before><?php

/**
 * Router class
 * @author <NAME>
 * @description File that routes all URL requests
 */

namespace Warp\Http;

use Warp\Utils\PatternList;
use Warp\Http\Response;
use Warp\Security\Authentication;

class Router
{
	protected static $path;
	protected static $prefix;
	protected static $patterns;
	protected static $elementDelimiter = "/";
	protected static $home;
	const ROUTE_DIRECTORY = "application/build/routes/";
	const REGEX_ANY = "([^/]+?)";
	const REGEX_INT = "([0-9]+?)";
	const REGEX_ALPHA = "([a-zA-Z_-]+?)";
	const REGEX_ALPHANUMERIC = "([0-9a-zA-Z_-]+?)";
	const REGEX_STATIC = "%s";
	
	public static function GetServer()
	{
		$port = $_SERVER['SERVER_PORT'];
		return $_SERVER['SERVER_NAME'] . ($port? ":".$port : "");
	}
	
	public static function GetURL()
	{
		$URL = substr($_SERVER['REQUEST_URI'], 1);<commit_msg>Fixed port<commit_after><?php

/**
 * Router class
 * @author <NAME>
 * @description File that routes all URL requests
 */

namespace Warp\Http;

use Warp\Utils\PatternList;
use Warp\Http\Response;
use Warp\Security\Authentication;

class Router
{
	protected static $path;
	protected static $prefix;
	protected static $patterns;
	protected static $elementDelimiter = "/";
	protected static $home;
	const ROUTE_DIRECTORY = "application/build/routes/";
	const REGEX_ANY = "([^/]+?)";
	const REGEX_INT = "([0-9]+?)";
	const REGEX_ALPHA = "([a-zA-Z_-]+?)";
	const REGEX_ALPHANUMERIC = "([0-9a-zA-Z_-]+?)";
	const REGEX_STATIC = "%s";
	
	public static function GetServer()
	{
		$port = $_SERVER['SERVER_PORT'];
		return $_SERVER['SERVER_NAME'] . ($port && $port!="80"? ":".$port : "");
	}
	
	public static function GetURL()
	{
		$URL = substr($_SERVER['REQUEST_URI'], 1);
{'fraction_non_alphanumeric': 0.17848837209302326, 'fraction_numerical': 0.0069767441860465115, 'mean_word_length': 4.624183006535947, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '889233', 'n_tokens_mistral': 631, 'n_tokens_neox': 611, 'n_words': 143}