Commit 647ee8b
authored
Fixes StackOverflowError in redirect tests. (#13533)
A stack overflow was happening when a redirect was failed (for example, bad scheme of the redirect location).
This was caused as a side effect of the changes done in #13381.
HttpRedirector was registering a `Response.CompleteListener` that was notifying the original request/response listeners.
This is necessary to notify failures before the redirect request is sent.
But calling this listener after the redirect request is sent causes a stack overflow.
The solution is to check whether the redirect request is already part of the conversation.
If so, the notification of the listeners is performed by the `HttpClient` implementation.
Otherwise, it must be explicitly done by HttpRedirector.
Signed-off-by: Simone Bordet <[email protected]>1 parent c4587e0 commit 647ee8b
File tree
6 files changed
+103
-12
lines changed- jetty-core/jetty-client/src
- main/java/org/eclipse/jetty/client
- transport
- test/java/org/eclipse/jetty/client
6 files changed
+103
-12
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
494 | | - | |
| 494 | + | |
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
| |||
Lines changed: 21 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
161 | 163 | | |
162 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
163 | 173 | | |
164 | | - | |
165 | | - | |
| 174 | + | |
| 175 | + | |
166 | 176 | | |
167 | | - | |
| 177 | + | |
168 | 178 | | |
169 | 179 | | |
170 | 180 | | |
| |||
293 | 303 | | |
294 | 304 | | |
295 | 305 | | |
296 | | - | |
| 306 | + | |
297 | 307 | | |
298 | 308 | | |
299 | | - | |
| 309 | + | |
300 | 310 | | |
301 | 311 | | |
302 | 312 | | |
| |||
390 | 400 | | |
391 | 401 | | |
392 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
393 | 406 | | |
394 | 407 | | |
395 | 408 | | |
| |||
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
144 | 156 | | |
145 | 157 | | |
146 | 158 | | |
| |||
167 | 179 | | |
168 | 180 | | |
169 | 181 | | |
170 | | - | |
| 182 | + | |
171 | 183 | | |
172 | 184 | | |
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
764 | 764 | | |
765 | 765 | | |
766 | 766 | | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
767 | 770 | | |
768 | 771 | | |
769 | | - | |
770 | 772 | | |
771 | 773 | | |
772 | 774 | | |
773 | 775 | | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
774 | 789 | | |
775 | 790 | | |
| 791 | + | |
776 | 792 | | |
777 | 793 | | |
778 | 794 | | |
| |||
Lines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
314 | 315 | | |
315 | 316 | | |
316 | 317 | | |
317 | | - | |
| 318 | + | |
318 | 319 | | |
319 | 320 | | |
320 | 321 | | |
| |||
659 | 660 | | |
660 | 661 | | |
661 | 662 | | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
662 | 697 | | |
663 | 698 | | |
664 | 699 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
2096 | 2097 | | |
2097 | 2098 | | |
2098 | 2099 | | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
2099 | 2114 | | |
2100 | 2115 | | |
2101 | 2116 | | |
| |||
0 commit comments