Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- IT demonstrating failure when creating an object with a space in its path and then trying to perform a SPARQL update on it Resolves: https://www.pivotaltracker.com/story/show/72296804
- Loading branch information
Showing
3 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,8 +152,13 @@ public boolean isCanonical() { | |
@Override | ||
public Resource getSubject(final String absPath) throws RepositoryException { | ||
resetTranslationChain(); | ||
LOGGER.debug("Creating RDF subject from identifier: {}", absPath); | ||
return doForward(absPath); | ||
if ( absPath != null && absPath.indexOf("%20") != -1 ) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
awoods
|
||
LOGGER.debug("Creating RDF subject from identifier with spaces: {}", absPath); | ||
return doForward(absPath.replaceAll("%20"," ")); | ||
} else { | ||
LOGGER.debug("Creating RDF subject from identifier: {}", absPath); | ||
return doForward(absPath); | ||
} | ||
} | ||
|
||
@Override | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Are there other URI escape sequences we should handle too, using e.g. http://docs.oracle.com/javase/7/docs/api/java/net/URLDecoder.html#decode(java.lang.String,%20java.lang.String)?