(Html)Page.getBaseUrl() not returning base URL
See original GitHub issuegetBaseUrl() 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()
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to get base url with jquery or javascript? - Stack Overflow
But you can't say that the baseurl() of CodeIgniter(or php joomla) will return the same value, as it is possible to change the...
Read more >3 Ways Of Get Base Url In Javascript - Get Absolute Path ...
get base url in javascript : We run time into a some difficult face issue while developing a fresh new website where We...
Read more >base_url::Url - Rust - Docs.rs
Parse a string as an URL, with this URL as the base URL. Note: a trailing slash is significant. Without it, the last...
Read more >RequireJS API
If there is no explicit config and data-main is not used, then the default baseUrl is the directory that contains the HTML page...
Read more >visit | Cypress Documentation
visit() commands' pageLoadTimeout and baseUrl globally in the Cypress configuration. Yields. cy.visit() yields the window object after the page finishes loading ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, will do.
Yes outside the usual problems when getting older 😃
I think good - lot of work, some plans for version 3.0 but no time to do it as fast as i like
Of course
Not really, but the sum i got every month is at least sufficient for the discussion with my wife if she ask what i’m doing here all the time Maybe i think different about that after my ‘Steuererklärung’
Hi just found this old one - i like to close this. Please open a new one if you still think the current behavior is not correct.
BTW: Hope you are fine…