Skip to content

Commit

Permalink
Accept any error response code for missing index.mth
Browse files Browse the repository at this point in the history
  • Loading branch information
kahrl committed Feb 15, 2014
1 parent 31ec14a commit c873164
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/clientmedia.cpp
Expand Up @@ -315,8 +315,10 @@ void ClientMediaDownloader::remoteHashSetReceived(
// For compatibility: If index.mth is not found, assume that the
// server contains files named like the original files (not their sha1)

if (!fetchresult.succeeded && !fetchresult.timeout &&
fetchresult.response_code == 404) {
// Do NOT check for any particular response code (e.g. 404) here,
// because different servers respond differently

if (!fetchresult.succeeded && !fetchresult.timeout) {
infostream << "Client: Enabling compatibility mode for remote "
<< "server \"" << remote->baseurl << "\"" << std::endl;
remote->request_by_filename = true;
Expand Down

0 comments on commit c873164

Please sign in to comment.