This repository was archived by the owner on Apr 15, 2023. It is now read-only.
Commit 174541d
authored
Update EventSource to support chunked data
This code doesn't work when a line comes in but it hasn't been terminated with a new line (chunked data). In that case, the split('\n') call will give you some junk data which the rest of the logic can't handle.
There might be another edge case where the XHR request finishes before the full line comes in but that's outside the scope of this change1 parent b9d1f92 commit 174541d
1 file changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
| 82 | + | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
| |||
0 commit comments