The file 'patch-af' for Metamail 2.7 replaces gets() with fgets() at several places in mailto.c and metamail.c. Unfortunately, the person who made the patch back in -95 seems to have overlooked the fact that fgets() retains the trailing newline character in the buffer, which leads to the test for string match in line 1809 of mailto.c (original source) never returning true. Consequently, 'mailto' will report any manually entered content-type as not being listed in the local mailcap files. Since my original submission of the patch in 2002 (which went completely unprocessed), there has been another patch provided by a guy called Ulf Härnhammar. His patch, however, doesn't correct the abovementioned issues. I have included a patch that includes both my and Ulf's changes. Fix: Below is an updated "patch-af" with additional code to make fgets() work as expected in both mailto.c and metamail.c, and including Ulf Härnhammar's changes. How-To-Repeat: When including non-text data with "~*" in the 'mailto' program, choose option 1 (Raw data from a file), and manually specify a content-type known to exist in the local mailcap files.
State Changed From-To: open->closed Committed, thanks!