Browse Source

Set useragent to a zero length string if none is detected

master
Con Kolivas 11 years ago
parent
commit
a140a8edeb
  1. 2
      src/stratifier.c

2
src/stratifier.c

@ -1130,6 +1130,8 @@ static json_t *parse_subscribe(int client_id, json_t *params_val)
buf = json_string_value(json_array_get(params_val, 0)); buf = json_string_value(json_array_get(params_val, 0));
if (buf && strlen(buf)) if (buf && strlen(buf))
client->useragent = strdup(buf); client->useragent = strdup(buf);
else
client->useragent = ckzalloc(1); // Set to ""
if (arr_size > 1) { if (arr_size > 1) {
/* This would be the session id for reconnect, it will /* This would be the session id for reconnect, it will
* not work for clients on a proxied connection. */ * not work for clients on a proxied connection. */

Loading…
Cancel
Save