From 79d9077c56219ee91f190c72918972239bafa69b Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 23 Nov 2021 23:48:36 -0500 Subject: [PATCH] Permit the Content-Transfer-Encoding: header to be forwarded from an HTTP transaction to a post on a Citadel server. This isn't typical for HTTP but we need it. --- webcit-ng/messages.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webcit-ng/messages.c b/webcit-ng/messages.c index adc4260ad..597e5f0d3 100644 --- a/webcit-ng/messages.c +++ b/webcit-ng/messages.c @@ -136,6 +136,7 @@ void dav_get_message(struct http_transaction *h, struct ctdlsession *c, long msg void dav_put_message(struct http_transaction *h, struct ctdlsession *c, char *euid, long old_msgnum) { char buf[1024]; char *content_type = NULL; + char *content_transfer_encoding = NULL; int n; long new_msgnum; char new_euid[1024]; @@ -159,6 +160,12 @@ void dav_put_message(struct http_transaction *h, struct ctdlsession *c, char *eu content_type = header_val(h, "Content-type"); ctdl_printf(c, "Content-type: %s\r\n", (content_type ? content_type : "application/octet-stream")); + + content_transfer_encoding = header_val(h, "Content-Transfer-Encoding"); + if (!IsEmptyStr(content_transfer_encoding)) { + ctdl_printf(c, "Content-Transfer-Encoding: %s\r\n", content_transfer_encoding); + } + ctdl_printf(c, "\r\n"); ctdl_write(c, h->request_body, h->request_body_length); if (h->request_body[h->request_body_length] != '\n') { -- 2.39.2