  
      send_message(REPLY_DOCDATA, doc.get_data());
  
-@@ -533,155 +535,224 @@ RemoteServer::msg_document(const string &message)
+@@ -533,155 +572,224 @@ RemoteServer::msg_document(const string &message)
  	send_message(REPLY_VALUE, item);
      }
      send_message(REPLY_DONE, string());

     for (; t != end; ++t) {
 	if (rare(prev.size() > 255))
 	    prev.resize(255);
@@ -721,12 +804,15 @@ RemoteServer::msg_openmetadatakeylist(const string & message)
 	prev = v;
     }
     send_message(REPLY_DONE, string());

 	char(XAPIAN_REMOTE_PROTOCOL_MAJOR_VERSION),
 	char(XAPIAN_REMOTE_PROTOCOL_MINOR_VERSION)
     };
-    string message(protocol, 2);
-    Xapian::doccount num_docs = db->get_doccount();
-    message += encode_length(num_docs);
-    message += encode_length(db->get_lastdocid() - num_docs);
