Skip to content

Conversation

@majiayu000
Copy link

Summary

  • Fixed Content-Disposition header format to comply with RFC 2183

Fixes

Closes #8914

Problem

The header was set as filename="name.ext" which is invalid per RFC 2183.
This caused parsing failures in third-party libraries.

Solution

Changed to inline; filename="name.ext" format with proper disposition-type.

Test

Added tests in tests-unit/server_test/test_content_disposition.py

Fixes comfyanonymous#8914

The Content-Disposition header was set to `filename="name.ext"` which
doesn't match RFC 2183 specification. This caused third-party libraries
(e.g., Go's mime.ParseMediaType) to fail parsing the header.

Changed to `inline; filename="name.ext"` format which properly includes
the disposition-type as required by RFC 2183.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Content-Disposition" Header set in view_image function not matching RFC2183 rules

1 participant