diff --git a/http-response-bodies.c b/http-response-bodies.c index 277995e..f3952de 100644 --- a/http-response-bodies.c +++ b/http-response-bodies.c @@ -63,7 +63,7 @@ checkstate: } // Handle optional URL + Length line url = NULL; - if (memcmp(bufp, "HTTP/1.1 ", 9) != 0) { + if (memcmp(bufp, "HTTP/1.1 ", 9) != 0 && memcmp(bufp, "HTTP/1.0 ", 9) != 0) { DEBUG_PRINTF("No HTTP header, looking for URL line\n"); m0 = memmem(bufp, n, "\n", 1); if (!m0 || m0 == bufp) { @@ -109,7 +109,7 @@ checkstate: fprintf(stderr, "Error: too little data before HTTP headers\n"); return 1; } - if (memcmp(bufp, "HTTP/1.1 ", 9) == 0) { + if (memcmp(bufp, "HTTP/1.1 ", 9) == 0 || memcmp(bufp, "HTTP/1.0 ", 9) == 0) { // Got some headers; find transfer encoding, content length, and end of headers eoh = memmem(bufp, n, "\r\n\r\n", 4); if (!eoh) {