public HttpResponse handleGETRequest() throws IOException {

		String location = request.get(RequestParser.LOCATION).substring(1);
		if (location.length() == 0) {
			location = defaultPage;
		}
		String mailInCookie = getMailCookie();
		String response;
		String cookie = null;
		if (mailInCookie == null && location.contains(".html") && !location.contains("reply.html")) { // no cookie
			if (location.equals(defaultPage)) {
				response = HttpResponse.RESPONSE_200_OK;
			} else {
				response = HttpResponse.RESPONSE_302_REDIRECT;
			}
		} else {
			if (location.equals(defaultPage) && params.containsKey("logout")) { // logout
				response = HttpResponse.RESPONSE_200_OK;
				cookie = "";
			} else if (location.equals(defaultPage) || location.contains("submit")) {
				// asking for a submit page or index in GET method will redirect you to main.
				location = "main.html";
				response = HttpResponse.RESPONSE_302_REDIRECT;
			} else { // regular erquest
				response = HttpResponse.RESPONSE_200_OK;
			}
		}

		return responseFromFile(response, location, cookie);
	}