Revert "Fix Content-Disposition header missing 'attachment;' prefix (#13093)"#13733
Revert "Fix Content-Disposition header missing 'attachment;' prefix (#13093)"#13733comfyanonymous merged 1 commit intomasterfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR introduces a new 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thanks for the review @coderabbitai — noting no actionable comments were generated. The docstring-coverage warning is a pre-existing project-wide threshold and unrelated to this revert (which only flips 4 header lines in |
PR Created by the Glary-Bot Agent
Reverts #13093 (commit
ea6880b04b88629b9dd07774298bdffea6923f9b).Why
PR #13093 added
attachment;to all fourContent-Dispositionheaders in theview_imageendpoint ofserver.py. Post-merge feedback reports this regresses existing UI behavior:Open Imagecontext-menu option (which previously opened the image inline in a new tab) now forces a download, making it functionally identical to the existingSave Imageoption.Changes
Pure
git revertofea6880b— restores the fourContent-Dispositionheaders inserver.pytofilename="...". No other files touched.Verification
python -m py_compile server.py→ OKpython main.py --cpu --listen 127.0.0.1 --port 8188) and curled all four/viewcode paths (default channel,channel=rgb,channel=a,preview=webp,preview=jpeg). All returnContent-Disposition: filename="example.png"(matching pre-Fix Content-Disposition header missing attachment prefix #13093 behavior)./view?filename=example.png&type=inputin a real browser via Playwright — image renders inline in the tab (the regressed behavior is restored). See screenshot below.Reviewer notes (from automated review)
A pre-merge code review flagged that the restored
Content-Disposition: filename="..."is technically not a fully-formed HTTP value — the spec wants eitherinlineorattachmentas the disposition type. That predates #13093 and is intentionally left as-is here to keep this PR a pure revert. If maintainers want a properly-typed header (e.g.inline; filename="..."for preview routes,attachment; filename="..."for download-only routes), that's worth doing as a follow-up alongside/viewtest coverage.Requested by user in the #glary Slack channel.
Screenshots