(c echo.Context, statusCode int, contentType string, body io.Reader)
| 51 | } |
| 52 | |
| 53 | func forwardBuffered(c echo.Context, statusCode int, contentType string, body io.Reader) error { |
| 54 | if contentType != "" { |
| 55 | c.Response().Header().Set("Content-Type", contentType) |
| 56 | } |
| 57 | c.Response().WriteHeader(statusCode) |
| 58 | _, err := io.Copy(c.Response().Writer, body) |
| 59 | return err |
| 60 | } |
| 61 | |
| 62 | // forwardStream relays the upstream SSE response to the client, |
| 63 | // flushing per read so events arrive in real time. Response/output PII |
no test coverage detected