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

MF-832 Invalid Content-Type in MQTT Version Endpoint, MF-822 Return 404 for non /version paths on MQTT adapter #837

Merged
merged 2 commits into from
Sep 5, 2019

Conversation

1995parham
Copy link
Contributor

What does this do?

It fixes content-type and not-found issues in MQTT version endpoint. if you use invalid route instead of getting empty response you get 404 error with a not-found message.

Which issue(s) does this PR fix/relate to?

Resolve #832
Resolve #822

List any changes that modify/break current functionality

It doesn't break or change current functionality.

Have you included tests for your changes?

No

Did you document any new/modified functionality?

No

Notes

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>
@codecov-io
Copy link

codecov-io commented Sep 3, 2019

Codecov Report

Merging #837 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #837   +/-   ##
=======================================
  Coverage   85.58%   85.58%           
=======================================
  Files          72       72           
  Lines        4702     4702           
=======================================
  Hits         4024     4024           
  Misses        442      442           
  Partials      236      236

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 640dfb7...767f9aa. Read the comment docs.

if (req.url === '/version') {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain; charset=utf-8');
res.end(`{"service":"mqtt-adapter","version":"${version}"}`);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use template literals (e.g mixing with ES6). Just a tip, but we should consider refactoring and using ES6.

Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@drasko
Copy link
Contributor

drasko commented Sep 4, 2019

Please change issue name to something like MF-832 - <PR title>

@1995parham 1995parham changed the title MF-832 MF-822 MF-832 Invalid Content-Type in MQTT Version Endpoint, MF-822 Return 404 for non /version paths on MQTT adapter Sep 4, 2019
@1995parham
Copy link
Contributor Author

@drasko I have changed the title to issues that this pull request resolves.

@nmarcetic nmarcetic merged commit 115d94b into absmach:master Sep 5, 2019
manuio pushed a commit that referenced this pull request Oct 12, 2020
Signed-off-by: Parham Alvani <parham.alvani@gmail.com>
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.

Invalid Content-Type in MQTT Version Endpoint Return 404 for non /version paths on MQTT adapter
4 participants