Commit 98ad84b
committed
in_kubernetes_events: fix bytes_consumed to always report full payload
The bytes_consumed parameter must always report the full new payload size
to the HTTP client, even when buffering incomplete JSON data. Reporting 0
when nothing parses causes the HTTP client to re-send the same data,
leading to infinite accumulation and memory corruption.
This fixes the test failures where buffers grew from 400 to 1200 to 2376
bytes instead of properly accumulating 400+400+376=1176 bytes.
Signed-off-by: Jesse Awan <jesse.awan@sap.com>1 parent d20f930 commit 98ad84b
1 file changed
+10
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
855 | | - | |
856 | | - | |
857 | | - | |
858 | | - | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
859 | 859 | | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | | - | |
864 | | - | |
865 | | - | |
866 | | - | |
867 | | - | |
868 | | - | |
869 | | - | |
870 | | - | |
871 | | - | |
| 860 | + | |
872 | 861 | | |
873 | 862 | | |
874 | 863 | | |
| |||
895 | 884 | | |
896 | 885 | | |
897 | 886 | | |
898 | | - | |
899 | | - | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
900 | 892 | | |
901 | 893 | | |
902 | 894 | | |
| |||
0 commit comments