You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(http)!: query params take precedence over Accept header (IPIP-523) (#62)
The format query parameter now takes precedence over the Accept header
for content type negotiation. CAR option query parameters (car-order,
car-dups, car-version) also take precedence over the corresponding
parameters in the Accept header.
{"accept no dups", "application/vnd.ipld.car; dups=n", "", []trustlesshttp.ContentType{trustlesshttp.DefaultContentType().WithDuplicates(false)}, ""},
134
134
{"accept no dups and cruft", "application/vnd.ipld.car; dups=n; bip; bop", "", []trustlesshttp.ContentType{trustlesshttp.DefaultContentType().WithDuplicates(false)}, ""},
135
135
{"valid accept but format=bop (err)", "application/vnd.ipld.car; dups=y", "format=bop", []trustlesshttp.ContentType{trustlesshttp.DefaultContentType()}, "invalid format parameter; unsupported: \"bop\""},
136
-
{"specific accept car with format=car (accept wins per spec)", "application/vnd.ipld.car; dups=y", "format=car", []trustlesshttp.ContentType{trustlesshttp.DefaultContentType()}, ""},
137
-
{"specific accept car with format=raw (accept wins per spec)", "application/vnd.ipld.car; dups=n", "format=raw", []trustlesshttp.ContentType{trustlesshttp.DefaultContentType().WithDuplicates(false)}, ""},
138
-
{"specific accept raw with format=car (accept wins per spec)", "application/vnd.ipld.raw", "format=car", []trustlesshttp.ContentType{trustlesshttp.DefaultContentType().WithMimeType(trustlesshttp.MimeTypeRaw)}, ""},
136
+
// IPIP-523: format query parameter takes precedence over Accept header
137
+
{"format=car with car Accept (format wins, inherits car params)", "application/vnd.ipld.car; dups=y", "format=car", []trustlesshttp.ContentType{trustlesshttp.DefaultContentType()}, ""},
138
+
{"format=raw with car Accept (format wins)", "application/vnd.ipld.car; dups=n", "format=raw", []trustlesshttp.ContentType{trustlesshttp.DefaultContentType().WithMimeType(trustlesshttp.MimeTypeRaw)}, ""},
139
+
{"format=car with raw Accept (format wins)", "application/vnd.ipld.raw", "format=car", []trustlesshttp.ContentType{trustlesshttp.DefaultContentType()}, ""},
140
+
{"format=car inherits dups=n from Accept", "application/vnd.ipld.car; dups=n", "format=car", []trustlesshttp.ContentType{trustlesshttp.DefaultContentType().WithDuplicates(false)}, ""},
141
+
{"format=car inherits order=unk from Accept", "application/vnd.ipld.car; order=unk", "format=car", []trustlesshttp.ContentType{trustlesshttp.DefaultContentType().WithOrder(trustlesshttp.ContentTypeOrderUnk)}, ""},
0 commit comments