-
Notifications
You must be signed in to change notification settings - Fork 531
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
StaticServer fails while running on windows #34
Comments
Thanks. Do you have a reproducer? |
not something to copy paste in here, but any attempt to use StaticServer.staticServer() handler on windows should fail due to this. |
If you could put together a simple test that exhibits the issue it would be a lot easier for me to track this down. |
ok. below is a simple server for static files handling. the static server reads files from /webRoot/web/ //================== package just.playing.vertx; import io.vertx.core.AbstractVerticle; public class ApexVerticle extends AbstractVerticle {
} //===== on windows machine only: java.nio.file.NoSuchFileException: C:\Users\atarno\apex-files\webroot%5cweb%5cexample.html |
Ok, thanks. This should be fixed now (in vertx-core). |
static files are allocated using vertx-core's FileResolver which in its turn uses java's Path.resolve().
on windows, WindowsPath.resolve() implementation returns a path with slashes (vs backslashes on linux). while used by URL class, slashes become urlencoded and are turning into %5C. as a result of it in FileResolver line 111 a NoSuchFileException is thrown in attempt to allocate a file with a path like webroot%5Cweb%5Cindex.html
The text was updated successfully, but these errors were encountered: