diff options
| author | 2022-09-26 12:29:26 +0200 | |
|---|---|---|
| committer | 2022-09-26 12:29:26 +0200 | |
| commit | 8f738e1417958a5e26fd8bfdf30fa4a166c0075a (patch) | |
| tree | 250bc6eb1be95b1f9e031a8a79c62098ac6c2590 /http.c | |
| parent | Added direction to srv_archive() files. (diff) | |
| download | penes-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.c | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -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); |