fix(httpclient): accept ICY stream responses#284
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe streaming HTTP client now wraps plain TCP and TLS connections to translate SHOUTcast ChangesICY streaming support
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant StreamingClient
participant newStreamingTransport
participant icyConn
participant RadioStream
StreamingClient->>newStreamingTransport: Perform GET request
newStreamingTransport->>RadioStream: Dial TCP or TLS connection
newStreamingTransport->>icyConn: Wrap established connection
RadioStream-->>icyConn: Return ICY status and stream data
icyConn-->>StreamingClient: Return HTTP/1.0 status and stream data
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/httpclient/client.go`:
- Around line 29-55: Update the transport setup error paths in the DialContext
and DialTLSContext callbacks: wrap TCP dial failures, net.SplitHostPort
failures, and TLS dial failures with contextual fmt.Errorf messages using %w,
while preserving the existing return behavior and successful connection flow.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 36a62696-fc28-4998-9c9d-f79d6ffc4a97
📒 Files selected for processing (3)
internal/httpclient/client.gointernal/httpclient/client_test.gointernal/httpclient/icy.go
Fixes #277. Normalizes SHOUTcast ICY status lines before net/http parses them and adds HTTP/HTTPS regression coverage.
Summary by CodeRabbit
net/httpcan parse them and read the full response body.