From: Oleg Broytman Date: Wed, 19 Feb 2014 18:51:01 +0000 (+0400) Subject: Add "Reply-To" header to the list of headers to decode by default X-Git-Tag: v2.3.6~2 X-Git-Url: https://git.phdru.name/?p=mimedecode.git;a=commitdiff_plain;h=e523d0dbf7c78b7a66a72b8b3b13e7bf3ce3ec5b Add "Reply-To" header to the list of headers to decode by default --- diff --git a/mimedecode.docbook b/mimedecode.docbook index db1bbfa..064729f 100644 --- a/mimedecode.docbook +++ b/mimedecode.docbook @@ -192,7 +192,7 @@ command-line options. Add the header to a list of headers to decode; initially the list - contains headers "From", "To", "Cc" and "Subject". + contains headers "From", "To", "Cc", "Reply-To" and "Subject". @@ -337,11 +337,11 @@ the program always uses the default decoding. The program may produce incorrect MIME message. The purpose of the program is to decode whatever it is possible to decode, not to produce absolutely correct MIME output. The incorrect parts are obvious - decoded - From/To/Cc/Subject headers and filenames. Other than that output is correct - MIME message. The program does not try to guess whether the headers are - correct. For example, if a message header states that charset is iso8859-5, - but the body is actually in utf-8 the program will recode the message with - the wrong charset. + From/To/Cc/Reply-To/Subject headers and filenames. Other than that output is + correct MIME message. The program does not try to guess whether the headers + are correct. For example, if a message header states that charset is + iso8859-5, but the body is actually in utf-8 the program will recode the + message with the wrong charset. diff --git a/mimedecode.py b/mimedecode.py index 6de9d1e..90f189e 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -273,11 +273,14 @@ class GlobalOptions: host_name = None - decode_headers = ["From", "To", "Cc", "Subject"] # A list of headers to decode + # A list of headers to decode + decode_headers = ["From", "To", "Cc", "Reply-To", "Subject"] + + # A list of headers' parameters to decode decode_header_params = [ ("Content-Type", "name"), ("Content-Disposition", "filename"), - ] # A list of headers' parameters to decode + ] totext_mask = [] # A list of content-types to decode binary_mask = [] # A list to pass through