summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-09-26 12:29:26 +0200
committerdefault <nobody@localhost>2022-09-26 12:29:26 +0200
commit8f738e1417958a5e26fd8bfdf30fa4a166c0075a (patch)
tree250bc6eb1be95b1f9e031a8a79c62098ac6c2590 /http.c
parent57325b09f774c708da023946e58d32993fd77916 (diff)
Serve the actor as the correct content-type.
Diffstat (limited to 'http.c')
-rw-r--r--http.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/http.c b/http.c
index 379080e..2a99c2b 100644
--- a/http.c
+++ b/http.c
@@ -81,8 +81,11 @@ d_char *http_signed_request(snac *snac, char *method, char *url,
hdrs = xs_dict_append(hdrs, k, v);
/* add the new headers */
- hdrs = xs_dict_append(hdrs, "content-type", "application/activity+json");
- hdrs = xs_dict_append(hdrs, "accept", "application/activity+json");
+ if (strcmp(method, "POST") == 0)
+ hdrs = xs_dict_append(hdrs, "content-type", "application/activity+json");
+ else
+ hdrs = xs_dict_append(hdrs, "accept", "application/activity+json");
+
hdrs = xs_dict_append(hdrs, "date", date);
hdrs = xs_dict_append(hdrs, "signature", signature);
hdrs = xs_dict_append(hdrs, "digest", digest);