Repository navigation
Download binaries served as text/html instead of rendering them - #875
Merged
Merged
Conversation
rtibblesbot
marked this pull request as ready for review
October 19, 2026 01:47
rtibblesbot
force-pushed
the
issue-867-db2ee0
branch
from
October 19, 2026 02:09
642e2c0 to
abfd9a9
Compare
SingleFileRenderHandler sniffs the response body; a filetype or SVG signature downloads the file under its sniffed extension. Fixes learningequality#867 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rtibblesbot
force-pushed
the
issue-867-db2ee0
branch
from
October 20, 2026 05:10
abfd9a9 to
46d1dba
Compare
rtibbles
approved these changes
Oct 22, 2026
rtibbles
left a comment
Member
There was a problem hiding this comment.
Changes make sense and fix the regression of behaviour for these files since 0.7.3
Contributor
Author
|
Quick check on rtibblesbot's work on this PR: react 👍 helpful · 😕 mixed · 👎 not helpful. Reply with anything specific. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
text/html(e.g.img.php?id=3) are now downloaded under their sniffed extension instead of rendered.DownloadFile,HTMLZipFile,ContentNode(uri=...)and HTML5 archive refs.References
Fixes #867.
Reviewer guidance
Suggested review: Full code review.
filetypesignature or a leading<svg/<!doctype svgnow downloads instead of rendering, so a markup-free text page startingBM,ID3,OggS,MZor%!is stored as.bmp/.mp3/.ogg/.exe/.ps..php/.ashx-style URLs are named.zipeven when labelledapplication/zip, the:scriptcache key re-downloads every cached script-extension URL once, and URLs an earlier run rendered keep that render until--update.--update.filetypecannot identify keep the old behaviour.AI usage
Used Claude Code to plan, implement and test the change. Verified with the full test suite and prek.
Written by rtibblesbot, an LLM-based coding agent.
🟡 Waiting for feedback
Last updated: 2026-10-20 05:10 UTC