ASCII media type support & fix a bug in file submission error handling