Skip to content

Commit 4350fbb

Browse files
authored
Merge pull request #88 from JuliaComputing/v/jsonmime
fix : better matching of json mime types
2 parents 5fa7fb2 + 1eac904 commit 4350fbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ struct Ctx
260260
end
261261
end
262262

263-
is_json_mime(mime::T) where {T <: AbstractString} = ("*/*" == mime) || occursin(r"(?i)application/json(;.*)?", mime) || occursin(r"(?i)application/(.*)-patch\+json(;.*)?", mime)
263+
is_json_mime(mime::T) where {T <: AbstractString} = ("*/*" == mime) || occursin(r"(?i)application/json(;.*)?", mime) || occursin(r"(?i)application/(.*)\+json(;.*)?", mime)
264264

265265
function select_header_accept(accepts::Vector{String})
266266
isempty(accepts) && (return "application/json")

0 commit comments

Comments
 (0)