Skip to content

Commit 50177b4

Browse files
committed
use xmldb.create to encode path value
1 parent eb725f9 commit 50177b4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

exist-core/src/main/java/org/exist/http/RESTServer.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ public void doGet(final DBBroker broker, final Txn transaction, final HttpServle
393393
// Process the request
394394
LockedDocument lockedDocument = null;
395395
DocumentImpl resource = null;
396-
final XmldbURI pathUri = XmldbURI.createInternal(path);
396+
final XmldbURI pathUri = XmldbURI.create(path);
397397
try {
398398
// check if path leads to an XQuery resource
399399
final String xquery_mime_type = MimeType.XQUERY_TYPE.getName();
@@ -545,7 +545,7 @@ public void doHead(final DBBroker broker, final Txn transaction, final HttpServl
545545
throws BadRequestException, PermissionDeniedException,
546546
NotFoundException, IOException {
547547

548-
final XmldbURI pathUri = XmldbURI.createInternal(path);
548+
final XmldbURI pathUri = XmldbURI.create(path);
549549
if (checkForXQueryTarget(broker, transaction, pathUri, request, response)) {
550550
return;
551551
}
@@ -623,7 +623,7 @@ public void doPost(final DBBroker broker, final Txn transaction, final HttpServl
623623
}
624624

625625
final Properties outputProperties = new Properties(defaultOutputKeysProperties);
626-
final XmldbURI pathUri = XmldbURI.createInternal(path);
626+
final XmldbURI pathUri = XmldbURI.create(path);
627627
LockedDocument lockedDocument = null;
628628
DocumentImpl resource = null;
629629

@@ -1134,7 +1134,7 @@ public void doPatch(final DBBroker broker, final Txn transaction, final XmldbURI
11341134

11351135
public void doDelete(final DBBroker broker, final Txn transaction, final String path, final HttpServletRequest request, final HttpServletResponse response)
11361136
throws PermissionDeniedException, NotFoundException, IOException, BadRequestException {
1137-
final XmldbURI pathURI = XmldbURI.createInternal(path);
1137+
final XmldbURI pathURI = XmldbURI.create(path);
11381138
if (checkForXQueryTarget(broker, transaction, pathURI, request, response)) {
11391139
return;
11401140
}
@@ -1322,7 +1322,7 @@ protected void search(final DBBroker broker, final Txn transaction, final String
13221322
}
13231323
}
13241324

1325-
final XmldbURI pathUri = XmldbURI.createInternal(path);
1325+
final XmldbURI pathUri = XmldbURI.create(path);
13261326
final Source source = new StringSource(query);
13271327
final XQueryPool pool = broker.getBrokerPool().getXQueryPool();
13281328
CompiledXQuery compiled = null;

0 commit comments

Comments
 (0)