File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed
Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -485,7 +485,7 @@ def writable_enum(&blk)
485485 end
486486
487487 # @type [Regexp]
488- JSON_CONTENT = %r{^application/(?:vnd(?: \. [^.]+)* \+ )?json(?!l)}
488+ JSON_CONTENT = %r{^application/(?:[a-zA-Z0-9.-]+ \+ )?json(?!l)}
489489 # @type [Regexp]
490490 JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}
491491
Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ module Orb
290290 end
291291
292292 JSON_CONTENT =
293- T . let ( %r{^application/(?:vnd(?: \. [^.]+)* \+ )?json(?!l)} , Regexp )
293+ T . let ( %r{^application/(?:[a-zA-Z0-9.-]+ \+ )?json(?!l)} , Regexp )
294294 JSONL_CONTENT =
295295 T . let ( %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)} , Regexp )
296296
Original file line number Diff line number Diff line change @@ -171,6 +171,8 @@ def test_json_content
171171 cases = {
172172 "application/json" => true ,
173173 "application/jsonl" => false ,
174+ "application/arbitrary+json" => true ,
175+ "application/ARBITRARY+json" => true ,
174176 "application/vnd.github.v3+json" => true ,
175177 "application/vnd.api+json" => true
176178 }
You can’t perform that action at this time.
0 commit comments