wish-wg / webrtc-http-egress-protocol

WHEP - WebRTC HTTP egress protocol draft
6 stars 7 forks source link

Server Sent Events - how to handle asking for an event that doesn't exist #20

Open danjenkins opened 1 month ago

danjenkins commented 1 month ago

How do you know what events a WHEP server supports? Is there a discovery path that will list whats supported by the server somewhere?

I don't see anything in the current draft version that says "you asked for layers events but we don't support it... so return a 4xx to the POST request"

WHEP is meant to be generic, so being able to know what events a server may accept programatically is important

murillo128 commented 1 month ago

it is in the Link header with the sse url

Link: <https://whep.ietf.org/resource/213786HF/sse>;
      rel="urn:ietf:params:whep:ext:core:server-sent-events"
      events="active,inactive,layers,reconnect,viewercount,scte35"
danjenkins commented 1 month ago

Ah! I'd completely missed that, thanks!

What about what happens when you ask for something sse/events endpoint doesnt support?

murillo128 commented 1 month ago

It is up to the server to decide if it rejects the request or ignore the event. Not sure if we need to explicity specify what to do with misbehaving clients

danjenkins commented 1 month ago

@murillo128 I don't understand that, isn't the point of a spec to say "this is how the server should behave" ? If I request something that isn't supported surely it should fail and tell me "you're not going to get that event because we don't support it" ?

murillo128 commented 1 month ago

My point of view is, if the client MUST send a subset of the events provided by the server, then this case is outside of the spec, and HTTP directorate has prevented us for redefining http behaviour. That's why I am not sure if we should cover how to handle non-compliant clients or not.

danjenkins commented 3 weeks ago

So just following on after watching the session online, this needs a PR to add detail on that failure scenario. Is this something you want to add @murillo128 ? Or do you want someone else to do that?