#105 serve serves og.png as octet-stream

closedarea:renderopened
details
updated
id
defeff90-dfdb-435e-a6e0-e99d096f8b8d

What

serve does not have a .png (or common image) branch in content_type_for; dist/og.png is served as application/octet-stream.

src/serve.rs:446-477.

Reproduced

curl -I http://127.0.0.1:PORT/og.png
HTTP/1.1 200 OK
Content-Type: application/octet-stream

Pages/static hosts serve image/png. Social scrapers may ignore the preview image when the MIME type is octet-stream, and serve is no longer single-shape with Pages.

Impact

Social-card/OG preview parity regression; minor client behavior difference.

Fix

Add common image MIME types (png, jpg/jpeg, gif, webp, ico) to content_type_for; add a content-type test for og.png.

Comments (1)

all issues