Skip to content

Conversation

recursivecodes
Copy link

Description

  • Implement manual redirect handling with Location header parsing
  • Add retry mechanism with exponential backoff for failed requests
  • Increase timeout to 30s for slow WHIP servers
  • Add comprehensive logging for debugging connection issues
  • Handle both absolute and relative redirect URLs
  • Prevent infinite redirect loops with configurable limits

Some WHIP servers will redirect for load balancing purposes. This fix will properly follow the redirects which must be manual in order to retain auth headers.

Related

No related issues.

Testing

Tested fix to publish from ESP32P4 to Amazon IVS stages. Confirmed working.


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

- Implement manual redirect handling with Location header parsing
- Add retry mechanism with exponential backoff for failed requests  
- Increase timeout to 30s for slow WHIP servers
- Add comprehensive logging for debugging connection issues
- Handle both absolute and relative redirect URLs
- Prevent infinite redirect loops with configurable limits
@recursivecodes
Copy link
Author

Any thoughts on this @TempoTian? This is crucial for Amazon IVS WebRTC support, since the WHIP requests are redirected multiple times and the auth header needs to be retained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant