Skip to content

Commit cf6ce02

Browse files
committed
reset path if an http scheme is detected
1 parent c067537 commit cf6ce02

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

http-client/src/main/java/io/avaje/http/client/DUrlBuilder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ public UrlBuilder url(String url) {
2222

2323
@Override
2424
public UrlBuilder path(String path) {
25+
if (path.startsWith("http") && path.contains("://")) {
26+
return url(path);
27+
}
2528
buffer.append("/").append(path);
2629
return this;
2730
}

0 commit comments

Comments
 (0)