Skip to content

Commit 86cfd3a

Browse files
authored
Merge pull request #57 from jonathonf/http2
Allow other HTTP protocol versions
2 parents 486fc9a + cdff8be commit 86cfd3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/legacy_http.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ int range_fetch_read_http_headers(struct range_fetch *rf) {
521521
}
522522
if (buf[0] == 0)
523523
return 0; /* EOF, caller decides if that's an error */
524-
if (memcmp(buf, "HTTP/1", 6) != 0 || (p = strchr(buf, ' ')) == NULL) {
524+
if (memcmp(buf, "HTTP/", 5) != 0 || (p = strchr(buf, ' ')) == NULL) {
525525
log_message("got non-HTTP response '%s'\n", buf);
526526
return -1;
527527
}

0 commit comments

Comments
 (0)