]> granicus.if.org Git - pdns/commitdiff
dnsdist: Clean up of the DNSQuestion::setHTTPResponse() binding
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 7 Aug 2019 07:31:03 +0000 (09:31 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 7 Aug 2019 07:31:03 +0000 (09:31 +0200)
pdns/dnsdist-lua-bindings-dnsquestion.cc

index 4be5d9ebd3f34e5cdd4e958ce9a033eb2d2f73a2..fee1626cb89ff2171e2b404ae8c38c34a199ef67 100644 (file)
@@ -213,7 +213,7 @@ void setupLuaBindingsDNSQuestion()
       return dq.du->getHTTPHeaders();
     });
 
-    g_lua.registerFunction<void(DNSQuestion::*)(uint16_t statusCode, std::string body, std::string contentType)>("setHTTPResponse", [](DNSQuestion& dq, uint16_t statusCode, std::string body, boost::optional<std::string> contentType) {
+    g_lua.registerFunction<void(DNSQuestion::*)(uint16_t statusCode, const std::string& body, const boost::optional<std::string> contentType)>("setHTTPResponse", [](DNSQuestion& dq, uint16_t statusCode, const std::string& body, const boost::optional<std::string> contentType) {
       if (dq.du == nullptr) {
         return;
       }