Skip to content

Conversation

@recursivecodes
Copy link

Description

  • Add rel="ice-server" validation in extract_ice_info() to prevent processing control endpoint URLs as STUN servers
  • Skip non-ICE server Link headers (playback-controls, session-delete, etc.)
  • Add proper logging for ICE server discovery and fallback behavior
  • Prevent memory corruption from storing control endpoints as STUN URLs
  • Maintain backward compatibility with user-configured ICE servers

Fixes issue where WHIP servers sending multiple Link headers would cause the first header (typically a control endpoint) to be incorrectly parsed as an ICE server, leading to connection failures.

Related

Fixes issue from #77.

Testing

Confirmed to fix the issue mentioned in #77.


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.
- Add rel="ice-server" validation in extract_ice_info() to prevent processing control endpoint URLs as STUN servers - Skip non-ICE server Link headers (playback-controls, session-delete, etc.) - Add proper logging for ICE server discovery and fallback behavior - Prevent memory corruption from storing control endpoints as STUN URLs - Maintain backward compatibility with user-configured ICE servers Fixes issue where WHIP servers sending multiple Link headers would cause the first header (typically a control endpoint) to be incorrectly parsed as an ICE server, leading to connection failures.
@TempoTian
Copy link
Contributor

Thanks for your great effort. We can only merge code from internal server. So I commited it in a1c59f6. You can try to use latest version.

@recursivecodes
Copy link
Author

Thanks @TempoTian - can we close this PR then?

@TempoTian
Copy link
Contributor

Yes, if new version works OK, you can cancel it.

@recursivecodes recursivecodes deleted the patch-2 branch August 25, 2025 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants