Commit b6c77b7
committed
fix(Net): address review findings in HTTPS proxy support
- Fix missing _proxySessionFactory registration in (host, port, ProxyConfig)
constructor causing UnknownURISchemeException at connection time
- Fix HTTPSClientSession::proxyRequestPrefix() regression: return empty
string in tunnel mode to avoid corrupting request URIs
- Fix empty proxyAuthenticate() override silently dropping credentials
in non-tunnel HTTPS proxy mode
- Add protocol validation and connected-state check to setProxyConfig()
and setGlobalProxyConfig()
- Wrap destructor unregisterProtocol() in try/catch to prevent
std::terminate
- Include HTTP status code in proxyConnect() error message
- Use InvalidArgumentException instead of IllegalStateException for
protocol validation
- Extract factory registration into initProxySessionFactory() helpers
to prevent future missed-constructor bugs
- Modernize ProxyAuthentication to enum class with None/Basic/Digest/NTLM
- Use default member initializers in ProxyConfig (enables C++20
designated initializers)
- Add [[nodiscard]] to key getters, modernize copy deletion to = delete
- Add 10 new unit tests covering ProxyConfig defaults, protocol
validation, setters, request prefix, non-tunnel mode, global config,
and bypass behavior
- Update HTTPTestServer to handle proxy requests without default port
- Fix copyright year and doc-comment style1 parent dbb4338 commit b6c77b7
File tree
10 files changed
+391
-56
lines changed- NetSSL_OpenSSL
- include/Poco/Net
- src
- testsuite/src
- Net
- include/Poco/Net
- src
- testsuite/src
10 files changed
+391
-56
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
| 290 | + | |
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
| 294 | + | |
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
377 | | - | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
378 | 381 | | |
379 | 382 | | |
380 | 383 | | |
| |||
413 | 416 | | |
414 | 417 | | |
415 | 418 | | |
416 | | - | |
| 419 | + | |
417 | 420 | | |
418 | 421 | | |
419 | 422 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 38 | + | |
45 | 39 | | |
46 | 40 | | |
47 | 41 | | |
48 | | - | |
| 42 | + | |
49 | 43 | | |
50 | | - | |
| 44 | + | |
51 | 45 | | |
52 | | - | |
| 46 | + | |
53 | 47 | | |
54 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
| |||
61 | 59 | | |
62 | 60 | | |
63 | 61 | | |
64 | | - | |
| 62 | + | |
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | | - | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | | - | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | | - | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
106 | | - | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| 114 | + | |
| 115 | + | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
| |||
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| 124 | + | |
121 | 125 | | |
122 | 126 | | |
123 | 127 | | |
| |||
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
134 | | - | |
| 138 | + | |
| 139 | + | |
135 | 140 | | |
136 | | - | |
| 141 | + | |
137 | 142 | | |
138 | 143 | | |
139 | 144 | | |
140 | 145 | | |
141 | 146 | | |
142 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
143 | 160 | | |
144 | 161 | | |
145 | 162 | | |
| |||
197 | 214 | | |
198 | 215 | | |
199 | 216 | | |
200 | | - | |
| 217 | + | |
201 | 218 | | |
202 | 219 | | |
203 | 220 | | |
| |||
231 | 248 | | |
232 | 249 | | |
233 | 250 | | |
234 | | - | |
| 251 | + | |
235 | 252 | | |
236 | 253 | | |
237 | 254 | | |
| |||
270 | 287 | | |
271 | 288 | | |
272 | 289 | | |
273 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
274 | 297 | | |
275 | 298 | | |
276 | 299 | | |
277 | 300 | | |
278 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
279 | 305 | | |
280 | 306 | | |
281 | 307 | | |
| |||
509 | 535 | | |
510 | 536 | | |
511 | 537 | | |
512 | | - | |
513 | | - | |
| 538 | + | |
| 539 | + | |
514 | 540 | | |
515 | 541 | | |
516 | 542 | | |
| |||
541 | 567 | | |
542 | 568 | | |
543 | 569 | | |
544 | | - | |
| 570 | + | |
545 | 571 | | |
546 | 572 | | |
547 | | - | |
| 573 | + | |
548 | 574 | | |
549 | 575 | | |
550 | 576 | | |
551 | 577 | | |
552 | 578 | | |
553 | | - | |
| 579 | + | |
554 | 580 | | |
555 | 581 | | |
556 | 582 | | |
| |||
563 | 589 | | |
564 | 590 | | |
565 | 591 | | |
566 | | - | |
| 592 | + | |
567 | 593 | | |
568 | 594 | | |
569 | 595 | | |
| |||
643 | 669 | | |
644 | 670 | | |
645 | 671 | | |
646 | | - | |
| 672 | + | |
647 | 673 | | |
648 | 674 | | |
649 | 675 | | |
| |||
0 commit comments