@Override
        protected URI createLocationURI(final String location) throws ProtocolException {
            String newLocation = location;
            try {
                new URI(newLocation);
            } catch (final URISyntaxException ex) {
                LOG.warn("Redirected URL: [ " + newLocation + " ] will be encoded");
                try {
                    newLocation = URLEncoder.encode(newLocation, StandardCharsets.UTF_8.name());
                } catch (UnsupportedEncodingException e) {
                    LOG.warn("Well, that didn't work out... :(");
                }
            }
            return super.createLocationURI(newLocation);
        }
only basic and ntlm are supported

@param authScheme
tika-pipes/tika-httpclient-commons/src/main/java/org/apache/tika/client/HttpClientFactory.java