require "error.pl";
require "get.pl";

sub parse_method()
{
	if ($noupdir)
	{
		if ($ENV{FILE}=~/\.\./)
		{
		getError("403");
		print "Updirs are disabled by core.\r\n\r\n";
		return;
		}
	}
	if   ($ENV{METHOD} eq "GET")
	{
		getError("200");
		method_get();
	}
	elsif ($ENV{METHOD} eq "POST")
	{
		getError("200");
		method_get();
	}
	elsif ($ENV{METHOD} eq "HEADER")
	{
		getError("401");
		print "Trying to hack? I think no =)\r\n\r\n";
	} else {
		getError("400");
		method_get();
	}
}
return 1;
