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
10.69k stars 1.39k forks source link

Replace path API endpoint shouldn't error if the path doesn't exist currently #3361

Closed bouk closed 1 month ago

bouk commented 1 month ago

Describe the feature

Currently the replace path endpoint return 404 when setting an endpoint that doesn't exist currently, which doesn't really serve any purpose since the path is replaced anyways. This is annoying for clients, since they have to loop to try creating the path instead which can then also fail, because it might've been created in the meantime.

Making it accept replace for paths that don't exist yet will make it idempotent