Commit fa9ebce
authored
fix(server/rest): handle undefined historyLength to return full task history (#527)
# Description
## What
REST `getTask` no longer defaults `historyLength: 0`. The field is
omitted
when the client doesn't provide the query parameter, matching JSON-RPC
and gRPC
bindings.
## Why
Spec §3.2.4: "Unset/undefined: No limit imposed; server returns its
default
amount of history. 0: No history should be returned." JS REST diverged
by
defaulting to 0, so `GET /tasks/{id}` without `?historyLength=N`
returned an
empty history.
Closes #5351 parent a3dd703 commit fa9ebce
3 files changed
Lines changed: 3 additions & 3 deletions
File tree
- src/server/transports/rest
- test/server
- express
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
| 303 | + | |
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| |||
0 commit comments