Keep asked-for texts clear of the credit band; answer review round 1
At 400 to 640 px the credit band, held to 12 px after scaling, covered the date, the circuit line, the session label and the season's subtitle. The band is now laid out first and every bottom text, the photo inset and the poster's dark band are lifted by as much as it would cover them, which at full size is nothing, so classic draws as before; the bottom checker is drawn last again, over the track's end. A first render now draws from the layer as kept, so it matches every later render of its key, and the ETag is weak all the same. A Commons file's SHA-1 is kept beside the layers and asked once, so photo pictures need no Commons request after a restart. The USGS credit carries no prefix, and /licences names a layout switched to the map among OpenStreetMap's uses. Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
This commit is contained in:
+2
-1
@@ -154,7 +154,8 @@ def render_poster(request: Request, kind: str, grand_prix_name: Optional[str] =
|
||||
if rendered is None:
|
||||
what = " ".join(str(part) for part in (grand_prix_name, season, session_slug) if part is not None)
|
||||
raise HTTPException(status_code=404, detail=f"No {kind} picture available for {what}")
|
||||
etag = '"' + rendered.name.split(".")[0][:32] + '"'
|
||||
# Weak: two first renders of one key side by side may differ in their bytes, never in what they show.
|
||||
etag = 'W/"' + rendered.name.split(".")[0][:32] + '"'
|
||||
headers = poster_options.cache_headers(rendered.kept, options.versioned, etag)
|
||||
headers.update({"X-Credits": poster_sources.ascii_header(rendered.credit), "X-License": rendered.licence,
|
||||
"Link": '</licences>; rel="license"'})
|
||||
|
||||
Reference in New Issue
Block a user