diff options
| author | 2023-03-02 13:30:29 +0100 | |
|---|---|---|
| committer | 2023-03-02 13:30:29 +0100 | |
| commit | 1ca94dab671f04f1a703508c6857bec2ccf08539 (patch) | |
| tree | 484f14c88bea0ee5a339ee9450cd2628565a7c00 | |
| parent | Connection jobs are treated as urgent. (diff) | |
| download | snac2-1ca94dab671f04f1a703508c6857bec2ccf08539.tar.gz snac2-1ca94dab671f04f1a703508c6857bec2ccf08539.tar.xz snac2-1ca94dab671f04f1a703508c6857bec2ccf08539.zip | |
Added user-agent in non-signed http connections.
| -rw-r--r-- | activitypub.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c index 9c47590..a4969c1 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -66,7 +66,8 @@ int activitypub_request(snac *snac, char *url, d_char **data) | |||
| 66 | xs_free(response); | 66 | xs_free(response); |
| 67 | 67 | ||
| 68 | xs *hdrs = xs_dict_new(); | 68 | xs *hdrs = xs_dict_new(); |
| 69 | hdrs = xs_dict_append(hdrs, "accept", "application/activity+json"); | 69 | hdrs = xs_dict_append(hdrs, "accept", "application/activity+json"); |
| 70 | hdrs = xs_dict_append(hdrs, "user-agent", USER_AGENT); | ||
| 70 | 71 | ||
| 71 | response = xs_http_request("GET", url, hdrs, | 72 | response = xs_http_request("GET", url, hdrs, |
| 72 | NULL, 0, &status, &payload, &p_size, 0); | 73 | NULL, 0, &status, &payload, &p_size, 0); |