]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Remote Backend: 404 status codes in HTTP is fine
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 1 Apr 2020 11:17:41 +0000 (13:17 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 1 Apr 2020 15:18:39 +0000 (17:18 +0200)
These might indicate that the function is not implemented

modules/remotebackend/httpconnector.cc

index 675f1076b12444c8fda5243ce5172fc9f946dd5f..5aa3d2a69fd7b68da43d8b0431578862f93369d5 100644 (file)
@@ -418,8 +418,9 @@ int HTTPConnector::recv_message(Json& output) {
 
     arl.finalize();
 
-    if (resp.status < 200 || resp.status >= 400) {
+    if ((resp.status < 200 || resp.status >= 400) && resp.status != 404) {
       // bad. 
+      g_log<<Logger::Warning<<"Received unacceptable HTTP status code "<<std::to_string(resp.status)<<" from HTTP endpoint"<<endl;
       return -1;
     }