summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorGravatar default2022-09-26 12:29:26 +0200
committerGravatar default2022-09-26 12:29:26 +0200
commit8f738e1417958a5e26fd8bfdf30fa4a166c0075a (patch)
tree250bc6eb1be95b1f9e031a8a79c62098ac6c2590 /http.c
parentAdded direction to srv_archive() files. (diff)
downloadpenes-snac2-8f738e1417958a5e26fd8bfdf30fa4a166c0075a.tar.gz
penes-snac2-8f738e1417958a5e26fd8bfdf30fa4a166c0075a.tar.xz
penes-snac2-8f738e1417958a5e26fd8bfdf30fa4a166c0075a.zip
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,
81 hdrs = xs_dict_append(hdrs, k, v); 81 hdrs = xs_dict_append(hdrs, k, v);
82 82
83 /* add the new headers */ 83 /* add the new headers */
84 hdrs = xs_dict_append(hdrs, "content-type", "application/activity+json"); 84 if (strcmp(method, "POST") == 0)
85 hdrs = xs_dict_append(hdrs, "accept", "application/activity+json"); 85 hdrs = xs_dict_append(hdrs, "content-type", "application/activity+json");
86 else
87 hdrs = xs_dict_append(hdrs, "accept", "application/activity+json");
88
86 hdrs = xs_dict_append(hdrs, "date", date); 89 hdrs = xs_dict_append(hdrs, "date", date);
87 hdrs = xs_dict_append(hdrs, "signature", signature); 90 hdrs = xs_dict_append(hdrs, "signature", signature);
88 hdrs = xs_dict_append(hdrs, "digest", digest); 91 hdrs = xs_dict_append(hdrs, "digest", digest);