Skip to content

Static server: .xml / .webmanifest served as application/octet-stream (missing MIME entries) #11

Description

@hyf0

Problem

The static-file server's MIME table lacks .xml and .webmanifest, so those are served as application/octet-stream.

Repro

for f in /rss.xml /site.webmanifest /browserconfig.xml /robots.txt; do
  curl -s -o /dev/null -w "$f -> %{content_type}\n" "http://localhost:3000$f"
done
# /rss.xml, /site.webmanifest, /browserconfig.xml -> application/octet-stream
# /robots.txt -> text/plain  (control: correct)

Bodies are byte-correct, so this is Content-Type only. But: some browsers reject a web app manifest unless it's application/manifest+json, and feed readers/browsers may download rss.xml (the <head> advertises type="application/rss+xml") instead of handling it.

There is no app-level escape hatch — next.config headers() does not override the Content-Type of public/static files.

Suggested fix

Add to the static CONTENT_TYPES table (server/static-file-cache.ts):

  • .xmlapplication/xml; charset=utf-8
  • .webmanifestapplication/manifest+json

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2: mediumWorth doing, not urgentarea: staticStatic-file serving (MIME, headers)good first issueGood for newcomersupstream: unfiledNeeds an issue/PR filed on cloudflare/vinext

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions