Eyevinn / whip

Client and Server modules for WebRTC HTTP Ingestion Protocol (WHIP)
Apache License 2.0
94 stars 15 forks source link

WHIP Client destroy method causes error #115

Closed georgewoofbates closed 1 year ago

georgewoofbates commented 1 year ago

When I run the destroy method on an instance of the WHIP client I have running, I get a 404 not found error on the DELETE request.

DELETE http://localhost:8001/0bf45c795af95bd32c642a17c22cfcaek546dd8bb4973411fd3281002a61b52d9/ddf00791441151603048955632778d1a/webRTC/publish 404 (Not Found)

I think this is a bug because it has taken the WHIP endpoint and added it to the localhost hostname where I'm running the client, not to the cloud flare domain hostname that it should be.

birme commented 1 year ago

Would you have the possibility to check what WHIP resource that Cloudflare returns? The Location header in the response to the POST request. My assumption is that it is a relative URL but I would like to confirm that. It could be that the whip-web-client does not handle that case properly.

birme commented 1 year ago

I can confirm that Cloudflare returns a relative path in the Location header, eg: location: /a1735441194e5a5f5ac87ca585633fe2k81d94be5269d03969020ef5408192a99/aa0d3b56a3c49ef62d29bc4cb6dcc8a5/webRTC/publish

georgewoofbates commented 1 year ago

Sorry for not getting back to you on this one @birme, I can confirm the Cloudflare is a relative path

birme commented 1 year ago

No problem. I managed to test with Cloudflare myself and have a fix / PR in review.

birme commented 1 year ago

Fix available in @eyevinn/whip-web-client@1.1.1