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

Function isRawHTTPResponse

aibridge/internal/integrationtest/mockupstream.go:240–242  ·  view source on GitHub ↗

isRawHTTPResponse returns true if data starts with "HTTP/", indicating it contains a complete HTTP response (status line + headers + body) rather than just a response body.

(data []byte)

Source from the content-addressed store, hash-verified

238// it contains a complete HTTP response (status line + headers + body) rather
239// than just a response body.
240func isRawHTTPResponse(data []byte) bool {
241 return bytes.HasPrefix(data, []byte("HTTP/"))
242}
243
244// writeRawHTTPResponse parses data as a complete HTTP response and replays it,
245// copying the status code, headers, and body to w. This supports error fixtures

Callers 1

handleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected