Time out a hung feed, serve the precomposed touch icon, and store http artwork on https (#108, #109, #110)
#108: the HTTP client had no timeout, and scans handle feeds in order, so a hung server held every scan. Dreamwidth answered 504 after 60-67 s for a day and each scan took 70-80 s instead of 15. A feed fetch, and a Patreon creator's show list, now gets 30 s from connecting to the last byte (feed::FEED_TIMEOUT); the client gets a 10 s connect timeout, which bounds a download's start but not a long download. #109: iOS asks for /apple-touch-icon-precomposed.png first when the site is added to a home screen; it was a 404 and the only non-feed warning in the log. It serves the same icon. #110: the page is https and loads no http. Artwork on http came through /api/art (#90) even when its host serves https too. A scan now tries each http artwork host on https once per feed (feed::prefer_https) and stores the https address where the host answers with an image, rewriting that feed's stored items from the same host (Db::secure_images). 4 of the 5 hosts in production do; cdn.thesecretcabal.com presents another name's certificate and stays on /api/art. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -76,6 +76,8 @@ pub fn router(state: WebState) -> Router {
|
||||
.route("/favicon.png", get(favicon))
|
||||
.route("/favicon-dark.png", get(favicon_dark))
|
||||
.route("/apple-touch-icon.png", get(touch_icon))
|
||||
// iOS asks for this one first when the site is added to a home screen (#109).
|
||||
.route("/apple-touch-icon-precomposed.png", get(touch_icon))
|
||||
.route("/app.js", get(app_js))
|
||||
.route("/app.css", get(app_css))
|
||||
.route("/login.js", get(login_js))
|
||||
|
||||
Reference in New Issue
Block a user