Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pgp-mime-lib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ai
pgp-mime-lib
Commits
b5443dd3
There was a problem fetching the pipeline summary.
Commit
b5443dd3
authored
8 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
handle content-transfer-encoding: 8bit
parent
ec981299
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pgp_mime_lib/rfc3156.py
+1
-1
1 addition, 1 deletion
pgp_mime_lib/rfc3156.py
pgp_mime_lib/test/test_pgp_mime_lib.py
+6
-1
6 additions, 1 deletion
pgp_mime_lib/test/test_pgp_mime_lib.py
with
7 additions
and
2 deletions
pgp_mime_lib/rfc3156.py
+
1
−
1
View file @
b5443dd3
...
@@ -154,7 +154,7 @@ def encode_base64(msg):
...
@@ -154,7 +154,7 @@ def encode_base64(msg):
# for multipart attachments (eg. 7bit or 8bit encoded attachments). For
# for multipart attachments (eg. 7bit or 8bit encoded attachments). For
# now, if content is already encoded as base64 or if it is encoded with
# now, if content is already encoded as base64 or if it is encoded with
# some unknown encoding, we just pass.
# some unknown encoding, we just pass.
if
encoding
in
[
None
,
'
quoted-printable
'
,
'
x-uuencode
'
,
'
uue
'
,
'
x-uue
'
]:
if
encoding
in
[
None
,
'
quoted-printable
'
,
'
x-uuencode
'
,
'
uue
'
,
'
x-uue
'
,
'
8bit
'
]:
orig
=
msg
.
get_payload
(
decode
=
True
)
orig
=
msg
.
get_payload
(
decode
=
True
)
encdata
=
_bencode
(
orig
)
encdata
=
_bencode
(
orig
)
msg
.
set_payload
(
encdata
)
msg
.
set_payload
(
encdata
)
...
...
This diff is collapsed.
Click to expand it.
pgp_mime_lib/test/test_pgp_mime_lib.py
+
6
−
1
View file @
b5443dd3
...
@@ -181,9 +181,14 @@ class TestMIME(TestBase):
...
@@ -181,9 +181,14 @@ class TestMIME(TestBase):
def
test_simple_text_message
(
self
):
def
test_simple_text_message
(
self
):
self
.
_encrypt
(
MIMEText
(
'
test message
'
))
self
.
_encrypt
(
MIMEText
(
'
test message
'
))
def
test_
utf8
_text_message
(
self
):
def
test_
base64
_text_message
(
self
):
self
.
_encrypt
(
MIMEText
(
u
'
test message
'
,
'
plain
'
,
'
utf-8
'
))
self
.
_encrypt
(
MIMEText
(
u
'
test message
'
,
'
plain
'
,
'
utf-8
'
))
def
test_8bit_text_message
(
self
):
m
=
MIMEText
(
u
'
test message
'
)
m
.
replace_header
(
'
Content-Transfer-Encoding
'
,
'
8bit
'
)
self
.
_encrypt
(
m
)
def
test_multipart_message_with_image
(
self
):
def
test_multipart_message_with_image
(
self
):
msg
=
MIMEMultipart
()
msg
=
MIMEMultipart
()
msg
.
preamble
=
'
This is a message with an image attachment
'
msg
.
preamble
=
'
This is a message with an image attachment
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment