private static String prepareHeaderValueForLog(final String key, final String value) {
            if (StringUtils.isBlank(value) || value.length() < 10) {
                return value;
            }
            final boolean shorten = value.length() > 150 || key.contains("uthorization") || key.contains("assword");
            return shorten ? value.substring(0, 10) + "#" + value.length() + "#" + value.substring(value.length() - 3) : value;
        }
Add headers to HTTP request.

@param request   the request builder to add headers to
@param headers   the headers to add (in addition to the standard headers), can be null
@param cacheFile if non-null, the file to take ETag and If-Modified-Since information from
main/src/main/java/cgeo/geocaching/network/Network.java