Skip to content

Add quote_boundary opt to content_type/3#21

Closed
nallwhy wants to merge 2 commits intobreakroom:mainfrom
nallwhy:add_quote_bounadry_opt_to_content_type
Closed

Add quote_boundary opt to content_type/3#21
nallwhy wants to merge 2 commits intobreakroom:mainfrom
nallwhy:add_quote_bounadry_opt_to_content_type

Conversation

@nallwhy
Copy link
Contributor

@nallwhy nallwhy commented Jul 5, 2024

Some servers don't accept quoted boundary.

@tomtaylor
Copy link
Contributor

@nallwhy thanks! can I get a unit test for this?

Copilot AI review requested due to automatic review settings January 20, 2026 00:12
@nallwhy
Copy link
Contributor Author

nallwhy commented Jan 20, 2026

@tomtaylor Done!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a quote_boundary option to the content_type/3 function to support servers that don't accept quoted boundaries in Content-Type headers. By default, boundaries remain quoted to maintain backward compatibility.

Changes:

  • Added optional quote_boundary parameter to content_type/3 with a default value of true
  • Updated implementation to conditionally quote the boundary based on the option
  • Added comprehensive test coverage for both quoted and unquoted boundary scenarios

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
lib/multipart.ex Added opts parameter to content_type/3 with quote_boundary option to control boundary quoting behavior
test/multipart_test.exs Added test cases covering both default quoted boundary and explicit unquoted boundary behaviors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tomtaylor tomtaylor mentioned this pull request Jan 20, 2026
@tomtaylor
Copy link
Contributor

Thanks, I've superseded this in #23, but it will ship in the next release.

@tomtaylor tomtaylor closed this Jan 20, 2026
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.

3 participants