Browse Source

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

Con Kolivas 14 years ago
parent
commit
a0a5858d15
1 changed files with 6 additions and 4 deletions
  1. 6 4
      util.c

+ 6 - 4
util.c

@@ -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)) {