Skip to content

Commit bd03b19

Browse files
committed
Fix Uri create(Uri, String) path dots handling, close AsyncHttpClient#1071
1 parent 01c0a98 commit bd03b19

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

client/src/main/java/org/asynchttpclient/uri/UriParser.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ private void removeTrailingDot() {
243243
path = path.substring(0, path.length() - 1);
244244
}
245245

246-
private void initRelativePath() {
246+
private void handleRelativePath() {
247247
int lastSlashPosition = path.lastIndexOf('/');
248248
String pathEnd = urlWithoutQuery.substring(start, end);
249249

@@ -286,11 +286,6 @@ private void parseAuthority() {
286286
}
287287
}
288288

289-
private void handleRelativePath() {
290-
initRelativePath();
291-
handlePathDots();
292-
}
293-
294289
private void computeRegularPath() {
295290
if (urlWithoutQuery.charAt(start) == '/')
296291
path = urlWithoutQuery.substring(start, end);
@@ -302,6 +297,7 @@ else if (isNonEmpty(path))
302297
String pathEnd = urlWithoutQuery.substring(start, end);
303298
path = authority != null ? "/" + pathEnd : pathEnd;
304299
}
300+
handlePathDots();
305301
}
306302

307303
private void computeQueryOnlyPath() {

0 commit comments

Comments
 (0)