Repository navigation
Commit 055d4f4
WinRt: map cancel to Aborted and clear partial body on rejection (round 4)
Address Copilot review round 4: HttpResponseDecoder processes any non-empty
response body regardless of HttpResult (processBody runs when GetBody() is
non-empty), so a partial body left on a rejected streamed response could be
parsed for kill-switch/stats. In the WinRt streaming reader:
- Map a caller-initiated cancellation (task_status::canceled, from cancel())
to HttpResult_Aborted instead of NetworkFailure.
- Clear response->m_body on every non-success path (cancel, read failure,
over-cap, and streaming exceptions) so no partial body is processed.
(WinInet and Apple never attach a partial body to the response on rejection,
so they need no change.)
Files:
- lib/http/HttpClient_WinRt.cpp
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 0d61e8f commit 055d4f4
1 file changed
Lines changed: 17 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
| 232 | + | |
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
235 | 241 | | |
236 | 242 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
| 243 | + | |
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
245 | 247 | | |
246 | 248 | | |
247 | 249 | | |
248 | 250 | | |
249 | | - | |
| 251 | + | |
| 252 | + | |
250 | 253 | | |
251 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
252 | 257 | | |
253 | 258 | | |
254 | 259 | | |
| |||
263 | 268 | | |
264 | 269 | | |
265 | 270 | | |
| 271 | + | |
266 | 272 | | |
267 | 273 | | |
268 | 274 | | |
| |||
278 | 284 | | |
279 | 285 | | |
280 | 286 | | |
| 287 | + | |
281 | 288 | | |
282 | 289 | | |
| 290 | + | |
283 | 291 | | |
284 | 292 | | |
285 | 293 | | |
286 | 294 | | |
| 295 | + | |
287 | 296 | | |
288 | 297 | | |
289 | 298 | | |
| |||
0 commit comments