-
-
Notifications
You must be signed in to change notification settings - Fork 88
Description
In com.gargoylesoftware.htmlunit.html.HtmlForm:submit the first HttpPost is done through Javascript call.
Then webClient.download is called and a second HttpPost is done.
This behavior is causing a problem with Okta authentication server which redirect to password page for the first HttpPost but for the second one we get a redirection to the username prompt, causing a loop.
I tried a browser without JS_FORM_SUBMIT_FORCES_DOWNLOAD (Firefox) but because of some tests a second call is still made.
I think you should not do a second call when Javascript is enabled, no matter if JS_FORM_SUBMIT_FORCES_DOWNLOAD is supported or not. Or at least put an option to avoid a second download.
I have a workaround to make it work, I disable Javascript for this page, and reenable it after. Hopefully the login page don't need Javascript enabled, so it works.