Commit db5ae86
committed
fix: Add Content-Type header to push notification requests
Set `Content-Type: application/json` header when sending push notifications
to prevent `415 Unsupported Media Type` errors. The request was previously
defaulting to `application/octet-stream`.
Updates tests to verify that the `Content-Type` header is always present
in push notification requests, regardless of whether authentication
token is included.
Fixes: #486
Signed-off-by: Jeff Mesnil <[email protected]>1 parent fcc02ec commit db5ae86
File tree
3 files changed
+15
-3
lines changed- server-common/src
- main/java/io/a2a/server/tasks
- test/java/io/a2a/server/tasks
3 files changed
+15
-3
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
| 237 | + | |
236 | 238 | | |
237 | 239 | | |
238 | 240 | | |
| |||
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
161 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
162 | 167 | | |
163 | 168 | | |
164 | 169 | | |
| |||
229 | 234 | | |
230 | 235 | | |
231 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
232 | 241 | | |
233 | 242 | | |
234 | 243 | | |
| |||
290 | 299 | | |
291 | 300 | | |
292 | 301 | | |
293 | | - | |
| 302 | + | |
294 | 303 | | |
295 | 304 | | |
296 | | - | |
| 305 | + | |
297 | 306 | | |
298 | 307 | | |
299 | 308 | | |
| |||
0 commit comments