src/com/thetransactioncompany/cors/CORSRequestHandler.java
private static String[] parseMultipleHeaderValues(final String headerValue) {
	
		if (headerValue == null)
			return new String[0];
	
		String trimmedHeaderValue = headerValue.trim();
		
		if (trimmedHeaderValue.isEmpty())
			return new String[0];
	
		return trimmedHeaderValue.split("\\s*,\\s*|\\s+");
	}
private static String[] parseMultipleHeaderValues(final String headerValue) {
	
		if (headerValue == null)
			return new String[0];
	
		String trimmedHeaderValue = headerValue.trim();
		
		if (trimmedHeaderValue.isEmpty())
			return new String[0];
	
		return trimmedHeaderValue.split("\\s*,\\s*|\\s+");
	}
private static String [ ] parseMultipleHeaderValues ( final String headerValue ) { if ( headerValue == null ) return new String [ 0 ] ; String trimmedHeaderValue = headerValue . trim ( ) ; if ( trimmedHeaderValue . isEmpty ( ) ) return new String [ 0 ] ; return trimmedHeaderValue . split ( "\\s*,\\s*|\\s+" ) ; }
Parses a header value consisting of zero or more space / comma /
space+comma separated strings. The input string is trimmed before
splitting.

@param headerValue The header value, may be {@code null}.

@return A string array of the parsed string items, empty if none
were found or the input was {@code null}.
Parses a header value consisting of zero or more space / comma / space + comma separated strings . The input string is trimmed before splitting .