-
-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Description
getBaseUrl() does not seem to actually return the base URL anymore - in some cases at least.
The URL I loaded was something like this: https://www.example.org/details/a_b_60327_c-15651212_1;jsessionid=7132CE8CE959709FD76D745BA600BC9A?x=y&z=zz
But then
final String pdfUrl = "/a/b/c";
System.out.println(page.getBaseURL().toString()+ pdfUrl);
returns https://www.example.org/details/a_b_60327_c-15651212_1;jsessionid=7132CE8CE959709FD76D745BA600BC9A?x=y&z=zz/a/b/c
HtmlUnit 2.36.0
I circumvent this by checking whether it's a relative URL or not and then using HtmlPage.getFullyQualifiedUrl()
.
Metadata
Metadata
Assignees
Labels
No labels