Explorar el Código

Added user-agent to webfinger query

poesty hace 3 años
padre
commit
962a45ccd1
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      webfinger.c

+ 2 - 1
webfinger.c

@@ -46,7 +46,8 @@ int webfinger_request(const char *qs, char **actor, char **user)
     if (host == NULL || resource == NULL)
         return 400;
 
-    headers = xs_dict_append(headers, "accept", "application/json");
+    headers = xs_dict_append(headers, "accept",     "application/json");
+    headers = xs_dict_append(headers, "user-agent", USER_AGENT);
 
     /* is it a query about one of us? */
     if (strcmp(host, xs_dict_get(srv_config, "host")) == 0) {