소스 검색

Merge pull request #245 from puiterwijk/fix-check-http

check_http: fix parsing the last header
John C. Frickson 9 년 전
부모
커밋
efe126fef0
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      plugins/check_http.c

+ 2 - 1
plugins/check_http.c

@@ -750,7 +750,8 @@ header_value (const char *headers, const char *header)
 
   value_end = strchr(s, '\r');
   if (!value_end) {
-      die (STATE_UNKNOWN, _("HTTP_UNKNOWN - Failed to parse response headers\n"));
+      // Turns out there's no newline after the header... So it's at the end!
+      value_end = s + strlen(s);
   }
 
   value_size = value_end - s;