isSSEContentType reports whether contentType is a server-sent-events stream.
(contentType string)
| 402 | // isSSEContentType reports whether contentType is a |
| 403 | // server-sent-events stream. |
| 404 | func isSSEContentType(contentType string) bool { |
| 405 | return parseMediaType(contentType) == "text/event-stream" |
| 406 | } |
| 407 | |
| 408 | // maxDrainBytes caps how many trailing bytes drainToEOF will consume. |
| 409 | // This prevents Close() from blocking indefinitely on a misbehaving |