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 mini-browser-endpoint missing resource response #8866

Merged
merged 1 commit into from
Dec 16, 2020

Conversation

DoroNahari
Copy link
Contributor

@DoroNahari DoroNahari commented Dec 15, 2020

Signed-off-by: Doron Nahari doron.nahari@sap.com

What it does

Fix mini-browser-endpoint missing resource response.
When requiring a resource from the mini-browser such as <theia-url>/mini-browser/<path-to-resource>
it returns:
image

And after this fix:
image

How to test

  • Run Theia locally.
  • Open browser dev-tools and go to network tab.
  • Enter this url in the browser:
    localhost:3000/mini-browser/<path-to-resource-non-existing-resource>

Before the fix you'll get 200 response code and with the fix you'll get 404

Review checklist

Reminder for reviewers

@vince-fugnitto vince-fugnitto added the mini-browser issues related to the mini-browser label Dec 15, 2020
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

@DoroNahari please include a how to test for reviewers (so they can easily verify the changes).

Signed-off-by: Doron Nahari <doron.nahari@sap.com>
Copy link
Member

@paul-marechal paul-marechal left a comment

Choose a reason for hiding this comment

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

LGTM, just replaced send with sendStatus because it is the recommended API.

Copy link
Member

@amiramw amiramw left a comment

Choose a reason for hiding this comment

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

Tested successfully

@amiramw amiramw merged commit 8385768 into eclipse-theia:master Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mini-browser issues related to the mini-browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants