private String getHeader(HttpHeaders headers, String name) {

        List<String> values = headers.getRequestHeader(name);
        if (values == null || values.isEmpty())
            return null;

        return values.get(0);

    }
Retrieves a single value from the HTTP header having the given name. If
there are multiple HTTP headers present with this name, the first
matching header in the request is used. If there are no such headers in
the request, null is returned.

@param headers
    The HTTP headers present in the request.

@param name
    The name of the header to retrieve.

@return
    The first value of the HTTP header having the given name, or null if
    there is no such header.
extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/java/org/apache/guacamole/auth/ssl/SSLClientAuthenticationResource.java