mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 04:58:59 +00:00
(crawler) Add default CT when it's missing for icons
This commit is contained in:
parent
668f3b16ef
commit
3d68be64da
@ -9,6 +9,7 @@ import java.sql.Connection;
|
|||||||
import java.sql.DriverManager;
|
import java.sql.DriverManager;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
/** Supplemental sqlite database for storing the summary of a crawl.
|
/** Supplemental sqlite database for storing the summary of a crawl.
|
||||||
@ -99,7 +100,7 @@ public class DomainStateDb implements AutoCloseable {
|
|||||||
VALUES(?, ?, ?)
|
VALUES(?, ?, ?)
|
||||||
""")) {
|
""")) {
|
||||||
stmt.setString(1, domain);
|
stmt.setString(1, domain);
|
||||||
stmt.setString(2, faviconRecord.contentType);
|
stmt.setString(2, Objects.requireNonNullElse(faviconRecord.contentType, "application/octet-stream"));
|
||||||
stmt.setBytes(3, faviconRecord.imageData);
|
stmt.setBytes(3, faviconRecord.imageData);
|
||||||
stmt.executeUpdate();
|
stmt.executeUpdate();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user