+# Find MIME type string, using mimetypeproc if configured with it.
+MIMETYPEPROC=`mhparam mimetypeproc`
+content_type_string() {
+ if test -z "$MIMETYPEPROC"; then
+ echo "text/plain; name=\"`basename $1`\"; charset=\"us-ascii\""
+ else
+ # 1) Excise leading filename followed by : and any whitespace.
+ # 2) Wrap charset value in double quotes. Assume that it isn't already.
+ printf "%s%s" \
+ `$MIMETYPEPROC $1` "; name=\"`basename $1`\"; charset=\"us-ascii\""
+ fi
+}
+