Skip to content
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

Fixed message truncation bug #910

Closed
wants to merge 1 commit into from
Closed

Fixed message truncation bug #910

wants to merge 1 commit into from

Conversation

allfro
Copy link
Contributor

@allfro allfro commented Jul 24, 2018

The length of the utf-8 encoded body may be different than the unicode length of the string. This causes message truncation on the response. This patch fixes the issue.

Description of changes:
Moved the code that converts the body to bytes up a few lines to reside before the code that sends the Content-Length header

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The length of the utf-8 encoded body may be different than the unicode length of the string. This causes message truncation
on the response. This patch fixes the issue.
@codecov-io
Copy link

codecov-io commented Jul 24, 2018

Codecov Report

Merging #910 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #910   +/-   ##
=======================================
  Coverage   95.48%   95.48%           
=======================================
  Files          27       27           
  Lines        4449     4449           
  Branches      558      558           
=======================================
  Hits         4248     4248           
  Misses        129      129           
  Partials       72       72
Impacted Files Coverage Δ
chalice/local.py 98.73% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3bfbd3d...b9fca76. Read the comment docs.

@stealthycoin
Copy link
Contributor

Looks good to me. I am going to add a test for this.

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.

3 participants