diff options
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); |