SSEDecoder.decode() currently uses int(value) for the retry field. That accepts values such as -1 and +1000, although the SSE format only accepts retry values made entirely of ASCII digits.
Example: retry: -1, followed by data: ok and a blank line, produces an event with retry == -1 instead of ignoring the invalid retry field.
Expected behavior: accept only [0-9]+ retry values and ignore other forms.
SSEDecoder.decode()currently usesint(value)for theretryfield. That accepts values such as-1and+1000, although the SSE format only accepts retry values made entirely of ASCII digits.Example:
retry: -1, followed bydata: okand a blank line, produces an event withretry == -1instead of ignoring the invalid retry field.Expected behavior: accept only
[0-9]+retry values and ignore other forms.