You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/08/20 06:32:00 UTC

[jira] [Commented] (OFBIZ-13499) HttpClient mutates URL on retrys

    [ https://issues.apache.org/jira/browse/OFBIZ-13499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18106147#comment-18106147 ] 

ASF subversion and git services commented on OFBIZ-13499:
---------------------------------------------------------

Commit 574313ab0541ba1a6d91b099e1c39a8ada10f6bd in ofbiz-framework's branch refs/heads/trunk from Lukas Finster
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=574313ab05 ]

Fixed: Removes a bug where queryParamter get appended twice to url on
retrys due to CertificateException (OFBIZ-13499)

> HttpClient mutates URL on retrys
> --------------------------------
>
>                 Key: OFBIZ-13499
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13499
>             Project: OFBiz
>          Issue Type: Bug
>            Reporter: Lukas Finster
>            Priority: Major
>
> HttpClient defines a url as a class-variable.
> On a request it invokes sendHttpRequestStream and
>  appends requestParameters:
> if ("get".equalsIgnoreCase(method) && arguements != null ) {
>     if (url.contains"?")) {
>         url = url + "&" + arguments;
>     } else {
>         url = url + "?" + arguments;
>     }
> }
>  
> However, on retrys it invokes itself, resulting in requestParameters beeing appended again to the same url
> catch (IOException ioe) {
>    if ((trustAny && !overrideTrust) && (ioe.getCause() instanceof CertificateException))
> {
>       Debug.logWarning(ioe.getCause(), MODULE);
>       return sendHttpRequestStream(method, true);
>     }
> }
>  
> Solution:
> I propose that in sendHttpRequeststream the value of url gets written to a local variable before it gets mutated. the parameters are then appended to this local copy.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)