Problem
RTF and OpenDocument Text are common exports (macOS TextEdit, LibreOffice, legal tooling); both are rejected today, and legacy .doc fails with a generic error.
Proposed contract
- RTF:
application/rtf + text/rtf alias, .rtf. Parser: striprtf (tiny pure-Python dep).
- ODT:
application/vnd.oasis.opendocument.text, .odt. Parser: stdlib zipfile + content.xml through the XML tag-strip path — no odfpy needed.
- Legacy
.doc (application/msword): explicit 400 with "convert to .docx" message — never accept-then-garble.
- Surface: REST-only. Degradation:
hard_fail.
Acceptance criteria
- Fixtures
sample.rtf / sample.odt with headings and lists; non-empty extraction with no control words or markup residue — test-pinned.
.doc upload → 400 with actionable message, test-pinned.
- Docs and CHANGELOG updated.
Depends on #117.
Problem
RTF and OpenDocument Text are common exports (macOS TextEdit, LibreOffice, legal tooling); both are rejected today, and legacy
.docfails with a generic error.Proposed contract
application/rtf+text/rtfalias,.rtf. Parser:striprtf(tiny pure-Python dep).application/vnd.oasis.opendocument.text,.odt. Parser: stdlibzipfile+content.xmlthrough the XML tag-strip path — no odfpy needed..doc(application/msword): explicit 400 with "convert to .docx" message — never accept-then-garble.hard_fail.Acceptance criteria
sample.rtf/sample.odtwith headings and lists; non-empty extraction with no control words or markup residue — test-pinned..docupload → 400 with actionable message, test-pinned.Depends on #117.