Skip to content

Commit 46453aa

Browse files
committed
reverted change to SSE detection logic (bad fix of last commit)
1 parent 208b951 commit 46453aa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/relayer/cmd/cmd_relay.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,10 @@ func processStreamRequest(ctx context.Context,
397397
logger.Info().Msgf("🌊 Handling streaming response with status:")
398398

399399
// Check if this is SSE (used below, if this is SSE we will unmarshal)
400-
isSSE := strings.EqualFold(httpResp.Header.Get("Content-Type"), "text/event-stream")
400+
isSSE := strings.Contains(strings.ToLower(httpResp.Header.Get("Content-Type")), "text/event-stream")
401+
if isSSE {
402+
logger.Info().Msgf("🔍 Detected SSE stream, we will try to unmarshal.")
403+
}
401404

402405
// Start handling the body chunks
403406
scanner := bufio.NewScanner(httpResp.Body)

0 commit comments

Comments
 (0)