Commit 2f582cd
committed
Implement different workaround for https://bugs.python.org/issue27777
suggested by jsm/Joseph Myers.
Subclass cgi.FieldStorage into BinaryFieldStorage and use that class
rather then monkey patching cgi.FieldStorage.make_file. This should
eliminate race conditions issues inherent with the prior way I tried
to do it by flipping the class method back and forth at runtime.
Also import new class into rest_common.py and use it in place of old
mechanism.1 parent 5897cbb commit 2f582cd
2 files changed
+20
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
| 234 | + | |
233 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
234 | 245 | | |
235 | 246 | | |
236 | 247 | | |
| |||
376 | 387 | | |
377 | 388 | | |
378 | 389 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
391 | 394 | | |
392 | 395 | | |
393 | 396 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | 402 | | |
408 | 403 | | |
409 | 404 | | |
| |||
412 | 407 | | |
413 | 408 | | |
414 | 409 | | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | 410 | | |
422 | 411 | | |
423 | 412 | | |
| |||
438 | 427 | | |
439 | 428 | | |
440 | 429 | | |
441 | | - | |
| 430 | + | |
442 | 431 | | |
443 | 432 | | |
444 | 433 | | |
| |||
465 | 454 | | |
466 | 455 | | |
467 | 456 | | |
468 | | - | |
| 457 | + | |
469 | 458 | | |
470 | 459 | | |
471 | 460 | | |
| |||
544 | 533 | | |
545 | 534 | | |
546 | 535 | | |
547 | | - | |
| 536 | + | |
548 | 537 | | |
549 | 538 | | |
550 | 539 | | |
| |||
565 | 554 | | |
566 | 555 | | |
567 | 556 | | |
568 | | - | |
| 557 | + | |
569 | 558 | | |
570 | 559 | | |
571 | 560 | | |
| |||
598 | 587 | | |
599 | 588 | | |
600 | 589 | | |
601 | | - | |
| 590 | + | |
602 | 591 | | |
603 | 592 | | |
604 | 593 | | |
| |||
617 | 606 | | |
618 | 607 | | |
619 | 608 | | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | 609 | | |
624 | 610 | | |
625 | 611 | | |
| |||
0 commit comments