Added message about redirection
This commit is contained in:
parent
682c9d9d4d
commit
e7de6c6ebc
@ -135,6 +135,7 @@ public class CachingDocumentLoader extends ConfigurableDocumentLoader {
|
||||
.initialCapacity(32).maximumSize(64).expireAfterAccess(Duration.ofHours(24))
|
||||
.build(new CacheLoader<Tuple<String, DocumentLoaderOptions>, Document>() {
|
||||
public Document load(final Tuple<String, DocumentLoaderOptions> id) throws Exception {
|
||||
// TODO: this loading will fail if the document is redirected (HTTP 301)
|
||||
try (InputStream is = bundled.containsKey(id.t1)
|
||||
? bundled.get(id.t1).openStream()
|
||||
: new URI(id.t1).toURL().openStream();) {
|
||||
|
Loading…
Reference in New Issue
Block a user