Commit b6e70b2
committed
HttpClient: send AddVariable params as query string on GETs and read 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.
(cherry picked from commit 85180bc)1 parent 5c18694 commit b6e70b2
3 files changed
Lines changed: 60 additions & 13 deletions
File tree
- common/src/main/java/com/genexus/internet
- java/src/main/java/com/genexus
- internet
- webpanels
Lines changed: 40 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
570 | 571 | | |
571 | 572 | | |
572 | 573 | | |
573 | | - | |
| 574 | + | |
574 | 575 | | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
575 | 603 | | |
576 | 604 | | |
577 | 605 | | |
578 | 606 | | |
579 | | - | |
580 | | - | |
581 | | - | |
| 607 | + | |
582 | 608 | | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
588 | 619 | | |
589 | 620 | | |
590 | 621 | | |
| |||
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
535 | 543 | | |
536 | | - | |
| 544 | + | |
537 | 545 | | |
538 | 546 | | |
539 | 547 | | |
| |||
543 | 551 | | |
544 | 552 | | |
545 | 553 | | |
546 | | - | |
| 554 | + | |
547 | 555 | | |
548 | 556 | | |
549 | 557 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1241 | 1241 | | |
1242 | 1242 | | |
1243 | 1243 | | |
1244 | | - | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
1245 | 1253 | | |
1246 | 1254 | | |
1247 | 1255 | | |
| |||
0 commit comments