Commit a1910e4
authored
[fix](be) Validate stream load content length before group commit (#62110)
Group commit pre-check parsed Content-Length before the normal request validation path, so malformed values could escape the expected InvalidArgument handling.
- Add try/catch around Content-Length parsing in _can_group_commit() to return Status::InvalidArgument on malformed values.
- Preserve existing negative-length handling while preventing std::stoll exceptions from escaping.
- Cache the Content-Length header while validating group commit requests to avoid repeated lookups.1 parent 9e3d1f3 commit a1910e4
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
915 | 915 | | |
916 | 916 | | |
917 | 917 | | |
918 | | - | |
919 | | - | |
920 | | - | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
921 | 928 | | |
922 | 929 | | |
923 | 930 | | |
| |||
0 commit comments