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 bug handling HttpResponseMessage that has no content #210

Merged
merged 1 commit into from
Jul 18, 2018
Merged

Fix bug handling HttpResponseMessage that has no content #210

merged 1 commit into from
Jul 18, 2018

Conversation

zachabney
Copy link
Contributor

Fixes bug where an error is thrown when the server tries to handle a HttpResponseMessage that does not contain any message content, as is the case when using BaseHttpController helper functions.

Description

Moved code handling content headers inside undefined conditional check.

Related Issue

inversify/InversifyJS#912

Motivation and Context

Fixes bug where server would throw an error with a response that has no content.

How Has This Been Tested?

Tested InversifyExpressServer#handleHttpResponseMessage to ensure the express.Response#sendStatus would be called with a HttpResponseMessage that has no content.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@dcavanagh dcavanagh merged commit 0d94476 into inversify:master Jul 18, 2018
@dcavanagh dcavanagh mentioned this pull request Jul 18, 2018
9 tasks
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