bb4b4f1fdf (master): [ruby/net-http] Coerce multipart content type to a string before validating

0 views
Skip to first unread message

Hiroshi SHIBATA

unread,
Jun 9, 2026, 9:51:30 PM (11 hours ago) Jun 9
to ruby...@g.ruby-lang.org
Hiroshi SHIBATA 2026-06-10 01:31:47 +0000 (Wed, 10 Jun 2026)

New Revision: bb4b4f1fdf

https://github.com/ruby/ruby/commit/bb4b4f1fdf

Log:
[ruby/net-http] Coerce multipart content type to a string before validating

The CR/LF check via Regexp#match? requires a String, but the per-part
content type was previously interpolated through to_s and accepted any
object such as a Symbol. Coerce it first to keep that behavior.

https://github.com/ruby/net-http/commit/c07d6581ce

Co-Authored-By: Claude Fable 5 <nor...@anthropic.com>

Modified files:
lib/net/http/generic_request.rb
test/net/http/test_http.rb
Reply all
Reply to author
Forward
0 new messages