MCPcopy Create free account
hub / github.com/coder/coder / isSSEContentType

Function isSSEContentType

coderd/x/chatd/chatdebug/transport.go:404–406  ·  view source on GitHub ↗

isSSEContentType reports whether contentType is a server-sent-events stream.

(contentType string)

Source from the content-addressed store, hash-verified

402// isSSEContentType reports whether contentType is a
403// server-sent-events stream.
404func 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

Callers 1

ReadMethod · 0.85

Calls 1

parseMediaTypeFunction · 0.85

Tested by

no test coverage detected