mpetazzoni / sseclient

Pure-Python Server Side Events (SSE) client
Apache License 2.0
197 stars 33 forks source link

Decoding too soon #8

Closed davedoesdev closed 7 years ago

davedoesdev commented 7 years ago

In _read, you're decoding each chunk. However, if the chunks happen to be split in the middle of a UTF8 sequence then decoding fails. The decoding should be done on data when it's yielded.

mpetazzoni commented 7 years ago

I'll close this in favor of #9, since we'll fix both at the same time.