Tungsten classifies a response as a download from three signals: the
sniffed type (from the body bytes), the declared
Content-Type, and the Content-Disposition. Each row below serves a
body that sniffs as a chosen type via /classify, with declared headers that may
agree or disagree. The valuable cases are the contradictions.
How to test: click open ↗ to load each case as a top-level
navigation through the proxy, then observe whether the browser downloads (or
shows a tungsten download/block interstitial) versus renders inline. Top-level
navigation is RequestKind::Document, which is the path is_download
governs. fetch()/XHR is classified as Resource and follows a different
path — see the XHR Download tile for that.
| # | Sniffed body | Declared Content-Type | Disposition | Expected (tungsten) | Open |
|---|
Real mp3.mp3 and mp4.mp4 from
test-pages.menlotest.com.
Use these to confirm actual playback vs. download in the browser alongside the synthetic cases above.
The inline links navigate directly to the file (no disposition header); the attachment
links route through /download which adds Content-Disposition: attachment.
| File | Declared Content-Type | Disposition | Expected | Open |
|---|---|---|---|---|
| mp3.mp3 (~194 KB, real) | audio/mpeg (origin) |
(none) | inline (rendered) audio/mpeg in INLINE set; browser plays inline |
open ↗ |
| mp3.mp3 (via /download, synthetic) | audio/mpeg |
attachment | DOWNLOAD (inspected) Content-Disposition: attachment forces download |
open ↗ |
| mp4.mp4 (~1 MB, real) | video/mp4 (origin) |
(none) | inline (rendered) video/mp4 in INLINE set; browser plays inline |
open ↗ |
| mp4.mp4 (via /download, synthetic) | video/mp4 |
attachment | DOWNLOAD (inspected) Content-Disposition: attachment forces download |
open ↗ |