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

Fix urlEncodeBodyParser when Content-Type header contains charset #82

Merged
merged 5 commits into from Jan 13, 2018

Conversation

Jolg42
Copy link
Contributor

@Jolg42 Jolg42 commented Jan 12, 2018

Decode body when Content-Type contains more than 'application/x-www-form-urlencoded'.
Example: 'application/x-www-form-urlencoded; charset=UTF-8'

In current state urlEncodeBodyParser & validator middleware are useless if the origin is not exactly sending 'application/x-www-form-urlencoded'.
In my case I don't control the origin request unfortunately!

Decode body when Content-Type contains more than 'application/x-www-form-urlencoded'.
Example: 'application/x-www-form-urlencoded; charset=UTF-8'
@codecov
Copy link

codecov bot commented Jan 12, 2018

Codecov Report

Merging #82 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #82   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          11     11           
  Lines         183    183           
  Branches       38     38           
=====================================
  Hits          183    183
Impacted Files Coverage Δ
src/middlewares/urlEncodeBodyParser.js 100% <100%> (ø) ⬆️

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 09cf110...f4fa337. Read the comment docs.

@lmammino
Copy link
Member

Very good catch. I will get this merged after #80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants