]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
http websocket comet: keep alive nonce (digest auth), fixes re-auth issue with chrome
authorJaroslav Kysela <perex@perex.cz>
Thu, 3 Aug 2017 12:22:59 +0000 (14:22 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 3 Aug 2017 12:22:59 +0000 (14:22 +0200)
src/http.c
src/http.h
src/webui/comet.c

index 120637f0b471130eb3b83fdce5db7def405b029b..bc8e130534c4c37b43be1c953a5b3c7849de7094 100644 (file)
@@ -310,6 +310,16 @@ http_get_opaque(const char *realm, const char *nonce)
   return md5sum(a, 1);
 }
 
+/**
+ *
+ */
+void
+http_alive(http_connection_t *hc)
+{
+  if (hc->hc_nonce)
+    http_nonce_exists(hc->hc_nonce); /* update timer */
+}
+
 /**
  * Transmit a HTTP reply
  */
index f26fc8f8ff6b0d7331cd51734102648419b75bc5..5a65d5cc95d311e5537359b5b042c4669dc09129 100644 (file)
@@ -199,6 +199,8 @@ static inline int http_args_empty(const struct http_arg_list *list) { return TAI
 
 int http_tokenize(char *buf, char **vec, int vecsize, int delimiter);
 
+void http_alive(http_connection_t *hc);
+
 void http_error(http_connection_t *hc, int error);
 
 int http_encoding_valid(http_connection_t *hc, const char *encoding);
index 1da5a917d6391b860f6dd00ba0c5569e76d2a4ab..b33eef69fecc7ef2f328dac9a63c6825c4118b14 100644 (file)
@@ -432,6 +432,7 @@ comet_mailbox_ws(http_connection_t *hc, const char *remain, void *opaque)
     if (res >= 0) {
       comet_mailbox_ws_msg(hc, cmb, first, msg);
       htsmsg_destroy(msg);
+      http_alive(hc);
       first = 0;
     }
   }