Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Replace uses of as_string from the email lib. #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2014

Conversation

craigcitro
Copy link
Contributor

The as_string function from the email module assumes that it's being used
to encode a message for, well, email transmission -- and as a result, it
changes lines beginning with "From " into lines beginning with ">From ". Given
that we're using this for multipart uploads, this is surely not what we want.

We basically inline the body of as_string, setting mangle_from_ to
False.

PTAL @skelterjohn

@skelterjohn
Copy link
Contributor

LGTM

The `as_string` function from `email.message.Message` assumes that it's being
used to encode a message for, well, email transmission -- and as a result, it
changes lines beginning with "From " into lines beginning with ">From ". Given
that we're using that module for multipart uploads, this behavior is surely
not what we want.

We basically inline the body of `as_string`, setting `mangle_from_` to
`False`.
craigcitro added a commit that referenced this pull request Jul 16, 2014
Replace uses of `as_string` from the email lib.
@craigcitro craigcitro merged commit ab01cb9 into googleapis:master Jul 16, 2014
@craigcitro craigcitro deleted the from_encoding branch October 2, 2014 21:54
akrherz pushed a commit to akrherz/google-api-python-client that referenced this pull request Apr 1, 2019
Support the login_hint parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants