diff --git a/panda/src/downloader/httpClient.cxx b/panda/src/downloader/httpClient.cxx index 9c3a8b39cd..aa1d9366a8 100644 --- a/panda/src/downloader/httpClient.cxx +++ b/panda/src/downloader/httpClient.cxx @@ -163,6 +163,9 @@ get_username(const string &server, const string &realm) const { string HTTPClient:: get_http_version_string() const { switch (_http_version) { + case HV_09: + return "HTTP/0.9"; + case HV_10: return "HTTP/1.0"; @@ -191,6 +194,8 @@ parse_http_version_string(const string &version) { return HV_10; } else if (version == "HTTP/1.1") { return HV_11; + } else if (version.substr(0, 6) == "HTTP/0") { + return HV_09; } else { return HV_other; } diff --git a/panda/src/downloader/httpClient.h b/panda/src/downloader/httpClient.h index 87a479921f..c824c3d624 100644 --- a/panda/src/downloader/httpClient.h +++ b/panda/src/downloader/httpClient.h @@ -64,6 +64,7 @@ PUBLISHED: string get_username(const string &server, const string &realm) const; enum HTTPVersion { + HV_09, // HTTP 0.9 or older HV_10, // HTTP 1.0 HV_11, // HTTP 1.1 HV_other, diff --git a/panda/src/downloader/httpDocument.cxx b/panda/src/downloader/httpDocument.cxx index e8c7ae880a..0fbfaecad2 100644 --- a/panda/src/downloader/httpDocument.cxx +++ b/panda/src/downloader/httpDocument.cxx @@ -228,8 +228,8 @@ is_regular_file() const { //////////////////////////////////////////////////////////////////// bool HTTPDocument:: will_close_connection() const { - if (get_http_version() == HTTPClient::HV_10) { - // HTTP 1.0 always closes. + if (get_http_version() < HTTPClient::HV_11) { + // pre-HTTP 1.1 always closes. return true; }