You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Lukas Finster (Jira)" <ji...@apache.org> on 2026/08/19 13:09:00 UTC

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

Lukas Finster created OFBIZ-13499:
-------------------------------------

             Summary: 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


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)