Commit 251c597
committed
server: send correct Accept=application/fhir+json HTTP headers
First and foremost, stop requesting application/json for FHIR
objects. The correct type is application/fhir+json. The spec says:
"If a client provides a generic mime type in the Accept header
(application/xml, text/json, or application/json), the server SHOULD
respond with the requested mime type, using the XML or JSON formats
described in this specification as the best representation for the
named mime type (except for binary - see the note on the Binary
resource)."
So this was only ever working by accident, and wasn't correct for
Binary resources, which when provided a non-fhir+json Accept header
are supposed to return their binary content, not the FHIR object.
So now we send the right header.
Also for DELETE requests, send signed headers if possible.
Fixes #1911 parent 9556bd3 commit 251c597
2 files changed
+9
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | | - | |
| 162 | + | |
164 | 163 | | |
165 | 164 | | |
166 | 165 | | |
167 | | - | |
| 166 | + | |
168 | 167 | | |
169 | 168 | | |
170 | 169 | | |
171 | | - | |
| 170 | + | |
172 | 171 | | |
173 | 172 | | |
174 | | - | |
| 173 | + | |
175 | 174 | | |
176 | 175 | | |
177 | 176 | | |
| |||
184 | 183 | | |
185 | 184 | | |
186 | 185 | | |
187 | | - | |
| 186 | + | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | 254 | | |
259 | 255 | | |
260 | 256 | | |
| |||
276 | 272 | | |
277 | 273 | | |
278 | 274 | | |
279 | | - | |
| 275 | + | |
280 | 276 | | |
281 | 277 | | |
282 | 278 | | |
| |||
0 commit comments