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: check requestHeader content-type property #1674

Merged
merged 1 commit into from Apr 1, 2021

Conversation

daern91
Copy link
Contributor

@daern91 daern91 commented Apr 1, 2021

Summary

It's possible that request.headers is undefined, which will throw when we then check the properties. PR fixes this by checking requestHeader instead as it's will be an empty object {} in the case of request.headers=undefined

resolves #1673

Todo

  • Tests
    • Unit
    • Integration
    • Acceptance
  • Documentation
  • Type label for the PR

@codecov
Copy link

codecov bot commented Apr 1, 2021

Codecov Report

Merging #1674 (273cd63) into master (4974bb7) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1674   +/-   ##
=======================================
  Coverage   98.64%   98.64%           
=======================================
  Files         128      128           
  Lines        3385     3385           
  Branches      781      781           
=======================================
  Hits         3339     3339           
  Misses         42       42           
  Partials        4        4           
Impacted Files Coverage Δ
packages/sdk-middleware-http/src/http.js 97.67% <100.00%> (ø)

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 4974bb7...273cd63. Read the comment docs.

@daern91 daern91 merged commit 0c0a89a into master Apr 1, 2021
@daern91 daern91 deleted the 1673-http-request-header-bug branch April 1, 2021 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

http request header bug
1 participant