There are 2 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-31d57e18-9351-4c50-aa2d-ba13a13ec486 XWIKI-21879 Open

Force preemptive authentication in $xwiki.getURLContent()

 
View issue   ยท   Add comment
 

2 comments

 
cid:jira-generated-image-avatar-62354637-ce7c-4755-bc5b-088b30005e8c Thomas Mortagne on 15/Nov/24 10:00
 
bq. I believe that the method for request with the given credentials should use them

It's not that simple, I gave more detail on the pull request on why HttpClient does not send the credential right away by default (in short, it's not really sure how exactly to send them).
In more recent versions of HttpClient they actually removed the helper to enable preemptive.
 
cid:jira-generated-image-avatar-62354637-ce7c-4755-bc5b-088b30005e8c Thomas Mortagne on 15/Nov/24 10:01
 
bq. I believe that the method for request with the given credentials should use them

It's not that simple, I gave more detail on the pull request on why HttpClient does not send the credential right away by default (in short, it's not really sure how exactly to send them). In more recent versions of HttpClient they actually removed the helper to enable preemptive
(I assume so that you understand better what you are really doing when forcing sending credential in the first request) .