# Fix: Accept text/plain returns the markdown twin

> Web-audit fix skill for the `markdown-accept-plain` check (Content for agents, MAY).

## Goal

Treat Accept text/plain as a request for the raw markdown source.

## Fix

Treat `Accept: text/plain` as a markdown request and return the raw markdown source rather than
the HTML shell. Many clients and libraries default to `text/plain` when they want the bytes, not
a rendered document, so honoring it hands them the same twin you serve for `Accept:
text/markdown`. Set the response `Content-Type` to `text/markdown` (or `text/plain`) so the
negotiated content type is unambiguous.

## Resources

- [RFC 7763 (text/markdown)](https://www.rfc-editor.org/rfc/rfc7763)

## Copy-paste prompt

Paste this into your coding agent. [Your audit](https://anc.dev/audit) adds what it observed for this check:

```text
Goal: Treat Accept text/plain as a request for the raw markdown source
Fix: Treat `Accept: text/plain` as a markdown request and return the raw markdown source rather than the HTML shell. Many clients and libraries default to `text/plain` when they want the bytes, not a rendered document, so honoring it hands them the same twin you serve for `Accept: text/markdown`. Set the response `Content-Type` to `text/markdown` (or `text/plain`) so the negotiated content type is unambiguous.
Skill: https://anc.dev/fix/markdown-accept-plain
Docs: https://www.rfc-editor.org/rfc/rfc7763
```

## Verify

Re-run the audit at [https://anc.dev/audit](https://anc.dev/audit) or call the `audit_website` MCP tool; the `markdown-accept-plain` check should report `pass`.
