| 855 | | snprintf (buf, sizeof (buf), "%s/%s", |
| 856 | | TYPE (idx[menu->current]->content), |
| 857 | | idx[menu->current]->content->subtype); |
| 858 | | if (mutt_get_field ("Content-Type: ", buf, sizeof (buf), 0) == 0 && buf[0]) |
| 859 | | { |
| 860 | | char *s; |
| 861 | | PARAMETER *par; |
| 862 | | BODY *b; |
| 863 | | |
| 864 | | b = idx[menu->current]->content; |
| 865 | | |
| 866 | | s = b->filename; par = b->parameter; |
| 867 | | b->filename = NULL; b->parameter = NULL; |
| 868 | | |
| 869 | | mutt_parse_content_type (buf, b); |
| 870 | | |
| 871 | | safe_free ((void **) &b->filename); |
| 872 | | b->filename = s; |
| 873 | | |
| 874 | | if ((s = mutt_get_parameter("charset", b->parameter))) |
| 875 | | mutt_set_parameter("charset", s, &par); |
| 876 | | |
| 877 | | /* These are needed for "traditional" PGP. |
| 878 | | * Should we switch to a "negative list" instead? |
| 879 | | */ |
| 880 | | |
| 881 | | if ((s = mutt_get_parameter("x-action", b->parameter))) |
| 882 | | mutt_set_parameter("x-action", s, &par); |
| 883 | | if ((s = mutt_get_parameter("format", b->parameter))) |
| 884 | | mutt_set_parameter("format", s, &par); |
| 885 | | |
| 886 | | /* ignore the other parameters for now */ |
| 887 | | mutt_free_parameter(&b->parameter); |
| 888 | | b->parameter = par; |
| 889 | | |
| 890 | | /* this may have been a "structured" message */ |
| 891 | | if (b->parts) |
| 892 | | mutt_free_body (&b->parts); |
| 893 | | if (b->hdr) |
| 894 | | { |
| 895 | | b->hdr->content = NULL; |
| 896 | | mutt_free_header (&b->hdr); |
| 897 | | } |
| | 855 | { |
| | 856 | mutt_edit_content_type (NULL, idx[menu->current]->content); |