diff options
| author | bwarsaw | 1999-02-10 00:50:51 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-02-10 00:50:51 +0000 |
| commit | 81b563b89bc7bc04121ca45ac4d443c537e5d615 (patch) | |
| tree | 6be2fd649e72d9ad2099fb51ea349a6877bc7155 /Mailman/GatewayManager.py | |
| parent | d697602e90eeb370ad9d5f30959f295ce5286b0b (diff) | |
| download | mailman-81b563b89bc7bc04121ca45ac4d443c537e5d615.tar.gz mailman-81b563b89bc7bc04121ca45ac4d443c537e5d615.tar.zst mailman-81b563b89bc7bc04121ca45ac4d443c537e5d615.zip | |
Diffstat (limited to 'Mailman/GatewayManager.py')
| -rw-r--r-- | Mailman/GatewayManager.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Mailman/GatewayManager.py b/Mailman/GatewayManager.py index 37d33bfea..f1f8eff09 100644 --- a/Mailman/GatewayManager.py +++ b/Mailman/GatewayManager.py @@ -167,6 +167,23 @@ class GatewayManager: len(string.split(msg.body,"\n"))) del msg['received'] + # TBD: Gross hack to ensure that we have only one + # content-transfer-encoding header. More than one barfs NNTP. I + # don't know why we sometimes have more than one such header, and + # it probably isn't correct to take the value of just the first + # one. What if there are conflicting headers??? + # + # This relies on the new interface for getaddrlist() returning + # values for all present headers, and the fact that the legal + # values are usually not parseable as addresses. Yes this is + # another bogosity. + cteheaders = msg.getaddrlist('content-transfer-encoding') + if cteheaders: + ctetuple = cteheaders[0] + ctevalue = ctetuple[1] + del msg['content-transfer-encoding'] + msg['content-transfer-encoding'] = ctevalue + # NNTP is strict about spaces after the colon in headers. for n in range(len(msg.headers)): line = msg.headers[n] |
