summaryrefslogtreecommitdiff
path: root/pith/send.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2013-09-05 00:53:23 -0600
committerEduardo Chappa <chappa@washington.edu>2013-09-05 00:53:23 -0600
commitf9461927f7d10d04b03301dee6fc53f7440b90cc (patch)
treecd0f1808ec9dd02354bb6b7e01cd9bc305f17f59 /pith/send.c
parent740ed5e417a0c535a26a8b264733219de19e531b (diff)
downloadalpine-f9461927f7d10d04b03301dee6fc53f7440b90cc.tar.xz
* Experimental: Write the content-type of a message in lowercase, as some
non-compliant servers do not understand uppercase content-type, such as those of GMX.de. * Transformation of UTF-8 to MUTF7 was not being done when creating a folder in an IMAP server.
Diffstat (limited to 'pith/send.c')
-rw-r--r--pith/send.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/pith/send.c b/pith/send.c
index 273f59aa..ae649ab6 100644
--- a/pith/send.c
+++ b/pith/send.c
@@ -4419,6 +4419,17 @@ pine_rfc822_output_body(struct mail_bodystruct *body, soutr_t f, void *s)
return(1);
}
+char *
+ToLower(char *s, char *t)
+{
+ int i;
+
+ for(i = 0; s != NULL && s[i] != '\0'; i++)
+ t[i] = s[i] + ((s[i] >= 'A' && s[i] <= 'Z') ? ('a' - 'A') : 0);
+ t[i] = '\0';
+
+ return t;
+}
/*
* pine_write_body_header - another c-client clone. This time
@@ -4441,11 +4452,11 @@ pine_write_body_header(struct mail_bodystruct *body, soutr_t f, void *s)
if((so = so_get(CharStar, NULL, WRITE_ACCESS)) != NULL){
if(!(so_puts(so, "Content-Type: ")
- && so_puts(so, body_types[body->type])
+ && so_puts(so, ToLower(body_types[body->type], tmp))
&& so_puts(so, "/")
- && so_puts(so, body->subtype
- ? body->subtype
- : rfc822_default_subtype (body->type))))
+ && so_puts(so, ToLower(body->subtype
+ ? body->subtype
+ : rfc822_default_subtype (body->type),tmp))))
return(pwbh_finish(0, so));
if(body->parameter){