Conversation
…them on the server Two related fixes for AddVariable usage on GET requests. Client side (HttpClientJavaLib + GXHttpClient): On GET, variables added with AddVariable were serialized as a multipart body. Servers, proxies and CDNs ignore the body of a GET so the values never reached the destination. They now go to the URL query string, URL-encoded in UTF-8. POST/PUT/DELETE keep using the body as before. Server side (HttpContextWeb): HttpRequest.GetVariable() consulted only the request body. On a GET this body is empty so values sent via the query string were invisible. Now, only on GET, if the body parsed empty we fall back to the query string. POST and any other verb are unchanged: the body still has precedence and the query string is not consulted.
Collaborator
Cherry pick to beta failed, 1 conflicted file in commit 85180bc
|
Collaborator
Manual cherry pick to beta success |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related fixes for
AddVariableusage on GET requests.Client side (
HttpClientJavaLib+GXHttpClient)On GET, variables added with
AddVariablewere serialized as a multipart body. Servers, proxies and CDNs ignore the body of a GET so the values never reached the destination. They now go to the URL query string, URL-encoded in UTF-8.POST/PUT/DELETE keep using the body as before.
Server side (
HttpContextWeb)HttpRequest.GetVariable()consulted only the request body. On a GET this body is empty so values sent via the query string were invisible. Now, only on GET, if the body parsed empty we fall back to the query string.POST and any other verb are unchanged: the body still has precedence and the query string is not consulted.
Compatibility
AddVariable?k=vURLAddVariable?k=v, empty bodyGetVariable()returns ""?k=vand bodyTest plan
&httpClient.AddVariable("PEPE","HOLA")+Execute("GET", url)and verify inorg.apache.http.wirethat the URL isurl?PEPE=HOLAwith no body.?PEPE=HOLAfrom a browser and confirm&HttpRequest.GetVariable("PEPE", &v)returnsHOLA.GetVariablekeeps reading from the body.Issue: 208539