Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allure Report Serverlet throws exception on Windows #46

Closed
bmsq opened this issue Jun 12, 2018 · 0 comments
Closed

Allure Report Serverlet throws exception on Windows #46

bmsq opened this issue Jun 12, 2018 · 0 comments

Comments

@bmsq
Copy link
Contributor

bmsq commented Jun 12, 2018

AllureReportServlet.doGet() triggers a MalformedURLException resulting in a blank page when viewing the "Allure Report" tab in Bamboo.

AllureArtifactsManager.getLocalStorageURL() assumes that a file path can be converted to a URL using String.format("file://%s", fullPath) and fails to produce a valid URL on Windows. File.toURI().toURL() should be used instead.

AllureReportServlet.setResponseHeaders() also incorrectly handles conversions from fileUrl to a Path. Instead of using Paths.get(new URL(fileUrl).getPath)) which breaks on Windows, Paths.get(new URL(fileUrl).toURI()) can be used instead.

The URL/URI conversions introduce some ugly exceptions. I'll provide a PR with some rudimentary exception handling shortly.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant