-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 extensions webview route on windows #5619
Conversation
@amiramw How do you verify it? |
@akosyakov I tested with https://marketplace.visualstudio.com/items?itemName=mtxr.sqltools and saw that all requests came with full paths. |
b29ce47
to
25f321f
Compare
@amiramw Could you test on windows whether your change also help if theia deployed under the path with whitespaces? |
@akosyakov yes. when the path for theia contains space the webview seems to work. |
I am looking into this... Just an upfront question; can we send URIs (as strings) instead of paths? So that we do not have to figure out why we had to add this special handling. For the completeness; both file download and upload works with URIs instead of FS paths. |
I have verified
|
- Use FileUri.fsPath in order to get cross OS file path on /webview/ route. Fixes windows. - Remove leading slash of webview route that caused the browser to send wrong path (/webview/...) when theia is served behind path based proxy fixes eclipse-theia#5503 Signed-off-by: Amiram Wingarten <amiram.wingarten@sap.com>
I am checking it... |
I have tried the more recent changes on both Windows and macOS; both seems to work. I can see the counter updating in the cat coding session. However, this error still present on Windows:
|
I'm pretty sure that this error is not related to my change or to webviews. |
@kittaakos is this PR good enough or more changes required? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have verified the cat coding webview-example on both Windows and macOS; they worked. 👍
Any objections merging this @benoitf?
@olexii4, can you please check if you still see the |
partially reverting changes from #5619 which break "html base href" logic in webview for instance in the python extension for vscode.
partially reverting changes from #5619 which break "html base href" logic in webview for instance in the python extension for vscode. Signed-off-by: Alex Tugarev <alex.tugarev@typefox.io>
partially reverting changes from #5619 which break "html base href" logic in webview for instance in the python extension for vscode. Signed-off-by: Alex Tugarev <alex.tugarev@typefox.io>
partially reverting changes from eclipse-theia#5619 which break "html base href" logic in webview for instance in the python extension for vscode. Signed-off-by: Alex Tugarev <alex.tugarev@typefox.io>
Signed-off-by: Amiram Wingarten amiram.wingarten@sap.com
Removed what seems to be redundant check of having a leading slash on file path when serving /webview/ route.
This also made this flow not working on windows.