/** Main method for validating $_SERVER data 
	 * @param array $serverData
	 * @throws PntValidationException if $this->serverVarValidationFatal with message about the last validation that failed
	 * @return array with valid server data 
	 */
    function validateServerVars($serverData) {
		$this->validServerVars = array();
		$error = false;
    	forEach($serverData as $key => $value) {
    		$errorMessage = $this->validateServerVarName($key);
    		if ($errorMessage) {
				$error = 'server var name';
    			$this->logValidationWarning('server var name', $key, $errorMessage);
    			continue;
    		}
    		
    		$sanitizedValue = $key == 'PHP_AUTH_USER' || $key == 'PHP_AUTH_PW' 
				? $this->sanitizePhpAuth($key, $value) 
				: $this->sanitizeServerValue($key, $value);
    		$errorMessage = $this->validateServerValue($key, $sanitizedValue);
    		if ($errorMessage) {
    			$this->logValidationWarning($key, $sanitizedValue, $errorMessage);
				$error = $key;
    		} else {
    			$this->validServerVars[$key] = $sanitizedValue;
			}
    	}
    	if ($error && $this->serverVarValidationFatal)
    		throw new PntValidationException("$this->serverVarValidationFailed $error");
    	
		return $this->validServerVars;
    }