Browse Source

Use the presence of X-Roll-Ntime in the header as a bool for exists unless N is found in the response.

nfactor-troky
Con Kolivas 13 years ago
parent
commit
a0a5858d15
  1. 10
      util.c

10
util.c

@ -205,12 +205,14 @@ static size_t resp_hdr_cb(void *ptr, size_t size, size_t nmemb, void *user_data) @@ -205,12 +205,14 @@ static size_t resp_hdr_cb(void *ptr, size_t size, size_t nmemb, void *user_data)
applog(LOG_DEBUG, "HTTP hdr(%s): %s", key, val);
if (!strcasecmp("X-Roll-Ntime", key)) {
if (!strcasecmp("Y", val)) {
if (!strncasecmp("N", val, 1)) {
if (opt_debug)
applog(LOG_DEBUG, "X-Roll-Ntime: Y found");
applog(LOG_DEBUG, "X-Roll-Ntime: N found");
} else {
if (opt_debug)
applog(LOG_DEBUG, "X-Roll-Ntime found");
hi->has_rolltime = true;
} else if (opt_debug)
applog(LOG_DEBUG, "X-Roll-Ntime: N found");
}
}
if (!strcasecmp("X-Long-Polling", key)) {

Loading…
Cancel
Save