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

'+' in directory name causes errors when using as path-prefix #59

Closed
nlmarco opened this issue Aug 27, 2016 · 2 comments
Closed

'+' in directory name causes errors when using as path-prefix #59

nlmarco opened this issue Aug 27, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@nlmarco
Copy link
Contributor

nlmarco commented Aug 27, 2016

The '+' (plus) is replaced by a ' ' (space) when having a client-repository connected at a sub-directory to the server-repository and when this sub-directory contained a '+'.

@nlmarco nlmarco added the bug label Aug 27, 2016
@nlmarco nlmarco added this to the 0.9.10 milestone Aug 27, 2016
@nlmarco nlmarco self-assigned this Aug 27, 2016
@nlmarco
Copy link
Contributor Author

nlmarco commented Aug 27, 2016

It turned out that java.io.File.toURI() caused the '+' to stay unchanged (instead of converting it to '%20' and a later java.net.URLDecoder.decode(...) invocation replaced the '+' then to a ' '.

I fixed the problem by introducing co.codewizards.cloudstore.core.util.UrlEncoder and co.codewizards.cloudstore.core.util.UrlDecoder and using these instead everywhere. They are mostly copies of the java.net-classes.

Note, that this problem affected only scenarios having the '+' in the path-prefix, because all relevant other codes were using org.glassfish.jersey.uri.UriComponent.encode(string, UriComponent.Type.PATH_SEGMENT) which does not cause any problem with '+', either.

@nlmarco
Copy link
Contributor Author

nlmarco commented Aug 27, 2016

See also: https://java.net/jira/browse/JERSEY-417

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

No branches or pull requests

1 participant