mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 19:50:26 +03:00
New variable USER_AGENT.
This commit is contained in:
parent
5784ddecb4
commit
f1dbd8e700
2
data.c
2
data.c
@ -545,7 +545,7 @@ int timeline_add(snac *snac, char *id, char *o_msg, char *parent, char *referrer
|
||||
"\"children\": [],"
|
||||
"\"liked_by\": [],"
|
||||
"\"announced_by\": [],"
|
||||
"\"version\": \"snac/2.x\","
|
||||
"\"version\": \"" USER_AGENT "\","
|
||||
"\"referrer\": null,"
|
||||
"\"parent\": null"
|
||||
"}");
|
||||
|
2
http.c
2
http.c
@ -90,7 +90,7 @@ d_char *http_signed_request(snac *snac, char *method, char *url,
|
||||
hdrs = xs_dict_append(hdrs, "signature", signature);
|
||||
hdrs = xs_dict_append(hdrs, "digest", digest);
|
||||
hdrs = xs_dict_append(hdrs, "host", host);
|
||||
hdrs = xs_dict_append(hdrs, "user-agent", "snac/2.x");
|
||||
hdrs = xs_dict_append(hdrs, "user-agent", USER_AGENT);
|
||||
|
||||
response = xs_http_request(method, url, hdrs,
|
||||
body, b_size, status, payload, p_size);
|
||||
|
2
httpd.c
2
httpd.c
@ -158,7 +158,7 @@ void httpd_connection(int rs)
|
||||
ctype = "text/html; charset=utf-8";
|
||||
|
||||
headers = xs_dict_append(headers, "content-type", ctype);
|
||||
headers = xs_dict_append(headers, "x-creator", "snac/2.x");
|
||||
headers = xs_dict_append(headers, "x-creator", USER_AGENT);
|
||||
|
||||
if (b_size == 0 && body != NULL)
|
||||
b_size = strlen(body);
|
||||
|
Loading…
Reference in New Issue
Block a user