Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

Connected clients list and clients events #16

Open
sensboston opened this issue Sep 16, 2017 · 0 comments
Open

Connected clients list and clients events #16

sensboston opened this issue Sep 16, 2017 · 0 comments

Comments

@sensboston
Copy link

sensboston commented Sep 16, 2017

Hi Pieter, thanks for the good library (actually, this is the only one http server I've found on github, working without issues with UPnP/DLNA stack)!

Currently I'm working on simple DLNA-compatible media renderer for PC (it works like a built-in to smart TV media renderer). Normally, clients send DLNA "stop" action by existing/stopping work with the renderer but I definitely need to track disconnected clients/sessions in case of abnormal client completion (no "stop" action was sent), to hide media window.

Could you please add this functionality?

P.S. Found small issue (it's definitely not your fault but can be improved):
in HttpRequest.cs, line 120. Code below
ContentEncoding = Encoding.GetEncoding(encoding[1]);
can throw an exception if charset attribute will be equal '*' or "utf-8" (with quotes); these values are legitimate according to RFC 7231, page 8. The best fix is:

  • remove possible quotes from encoding[1]
  • replace wildcard (if any) to utf-8
  • add try/catch statement and process possible exception as utf-8 content encoding
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant