bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
11.9k stars 1.5k forks source link

Fix DELETE URL problem #3195

Closed neilyoung closed 5 months ago

neilyoung commented 6 months ago

This PR addresses a problem with DELETE (missing FQDN, discussed here https://github.com/bluenviron/mediamtx/issues/3177) and fixes some CORS issues, which prevented this client to operate properly in trickle-ICE mode https://github.com/Eyevinn/whip

aler9 commented 5 months ago

I tested both Eyevinn/whip client (https://web.whip.eyevinn.technology/) and OBS 30.1.2, against MediaMTX v1.6.0 and MediaMTX.

All combination worked without changing any header. Changes in this PR are not needed.

neilyoung commented 5 months ago

I'm sorry, we must be talking about different versions.

I'm here at commit f5d9fde60499c1a3ba51f91166f88753d9146256 of your repo, Aril 1st.

This is the response given to OBS 30.1.2 on MacOS for a DELETE with the URL, which is (still) relative and by that not working for OBS (and others):

The location header given in the 201 was:

whip/0ab307c5-870d-4eab-8cba-037a0d97d7a3
DELETE /whip/0ab307c5-870d-4eab-8cba-037a0d97d7a3 HTTP/1.1
Host: ai.votix.com:8889
Accept: */*
User-Agent: Mozilla/5.0 (OBS-Studio/30.1.2; Mac OS X; en-US)

HTTP/1.1 404 Not Found
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Type: text/plain
Server: mediamtx
Date: Sat, 13 Apr 2024 11:11:05 GMT
Content-Length: 18

404 page not found

It would work if it would be '/stream/whip/0ab307c5-870d-4eab-8cba-037a0d97d7a3'

What am I missing? You could have changed that meanwhile, that would explain it. I didn't pull for a while...

neilyoung commented 5 months ago

I tested both Eyevinn/whip client (https://web.whip.eyevinn.technology/)

I had a lengthy chat with Eyevinn last week regarding missing CORS headers, but feel free to ignore. I'm not using their solution.

https://github.com/Eyevinn/whip/issues/133

github-actions[bot] commented 5 months ago

This issue is mentioned in release v1.7.0 🚀 Check out the entire changelog by clicking here