Skip to content
This repository was archived by the owner on Apr 15, 2023. It is now read-only.

Update EventSource to support chunked data #21

Merged
merged 2 commits into from
May 27, 2019

Conversation

jlkalberer
Copy link
Contributor

@jlkalberer jlkalberer commented May 16, 2019

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 change

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 change
@jordanbyron
Copy link
Owner

Hey @jlkalberer! Thanks for the pull request. The code looks like it would work. I really wish we had some tests to prove that it works, but that's not your fault, it is mine. I'm going to merge this in and hope for the best.

@jordanbyron jordanbyron merged commit 848aaac into jordanbyron:master May 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants