-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
9
-
None
zip-fs returns URIs that have been "double encoded", so that % sequences begin %25.
To recreate, create a zip file with a space in the name, and one or more entries.
Get a URI for a Path for one of the entries.
Try and use URLConnection to get at the contents of the entry. You get FileNotFoundException.
Attached is a program to demo the issue. Compile and run the program.
Note it creates a file called "jar jar" i.e. with a space in the name.
When you try and open a URI for an entry in the jar file, you get a message like:
java.io.FileNotFoundException: /w/jjg/work/jfm2.0/dev.80130944/jar%20jar (No such file or directory)
I could believe that the double encoding is correct, but in that case, URLConnection is wrong.
One way or the other, the two are inconsistent. I should be able to open the URI returned for a Path in a file in a zip-fs filesystem.
To recreate, create a zip file with a space in the name, and one or more entries.
Get a URI for a Path for one of the entries.
Try and use URLConnection to get at the contents of the entry. You get FileNotFoundException.
Attached is a program to demo the issue. Compile and run the program.
Note it creates a file called "jar jar" i.e. with a space in the name.
When you try and open a URI for an entry in the jar file, you get a message like:
java.io.FileNotFoundException: /w/jjg/work/jfm2.0/dev.80130944/jar%20jar (No such file or directory)
I could believe that the double encoding is correct, but in that case, URLConnection is wrong.
One way or the other, the two are inconsistent. I should be able to open the URI returned for a Path in a file in a zip-fs filesystem.
- duplicates
-
JDK-8131067 (zipfs) Zip File System Provider returns doubly-encoded Path URIs
-
- Closed
-