Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to not respond on M-SEARCH if the ST doesn't match #6

Open
EDDragonWolf opened this issue Aug 8, 2022 · 2 comments
Open

Comments

@EDDragonWolf
Copy link

Hi,
I'm investigating your SSDP module and trying to use it to implement a custom SSDP discoverable device, but I found one thing that I cannot resolve. If I understood the UPnP specification correctly if the device (service) type doesn't match the ST header value provided in the M-SEARCH request the device/server shouldn't respond.

image

The source: http://www.upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.0-20080424.pdf

But I didn't find any way how to not respond with Oat++. If I skip return or return nullptr the program simply crashes.

Of course, I can create an empty response without providing SSDP headers, but it will look like spam for the UDP sockets that listen to the SSDP port.

Is there a way to properly handle it without creating unnecessary responses?

@EDDragonWolf EDDragonWolf changed the title Possibility to not respond on M-SEARCH if the ST doesn't matches Possibility to not respond on M-SEARCH if the ST doesn't match Aug 8, 2022
@lganzzzo
Copy link
Member

lganzzzo commented Aug 9, 2022

Hello @EDDragonWolf ,

Thanks for posting this issue!

At the moment there is no correct way how oatpp can process request without sending any response back...
We have to check how to implement this

@EDDragonWolf
Copy link
Author

Thank you!

I have also found a few other places where we need this functionality to properly handle SSDP:

image

image

The source: http://www.upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.0-20080424.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants