Commit 8981417
Fixes a few issues with redirects (#462)
* Fixes a few issues with redirects
First, this prevents a DNS lookup from happening when we encounter a
redirect, *even if we don't intend to follow it*. This likely addresses
some part of #452
Second, if we aren't following redirects, don't have the scan fail in an
'application-error'. We are succeeding in what we intended to do, which
is to scan without following redirects
* Make sure to check redirects before we loop through and parse the host
Properly handle no redirects wanted to return success
* Handle 0 indexing
* Pull out the original checkRedirectCode so we deal with consistently
* lint
* add redirect fix to ipp module
---------
Co-authored-by: Phillip Stephens <phillip@cs.stanford.edu>
Co-authored-by: Zakir Durumeric <zakird@gmail.com>1 parent 6d26c72 commit 8981417
3 files changed
+40
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
| 537 | + | |
537 | 538 | | |
538 | | - | |
| 539 | + | |
539 | 540 | | |
540 | 541 | | |
541 | 542 | | |
| |||
571 | 572 | | |
572 | 573 | | |
573 | 574 | | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | 575 | | |
583 | 576 | | |
584 | 577 | | |
| |||
590 | 583 | | |
591 | 584 | | |
592 | 585 | | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | 586 | | |
604 | 587 | | |
605 | 588 | | |
| |||
614 | 597 | | |
615 | 598 | | |
616 | 599 | | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
617 | 616 | | |
618 | 617 | | |
619 | 618 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
329 | 337 | | |
330 | 338 | | |
331 | 339 | | |
| |||
353 | 361 | | |
354 | 362 | | |
355 | 363 | | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | 364 | | |
361 | 365 | | |
362 | 366 | | |
| |||
496 | 500 | | |
497 | 501 | | |
498 | 502 | | |
| 503 | + | |
| 504 | + | |
499 | 505 | | |
500 | 506 | | |
501 | 507 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
510 | 512 | | |
511 | 513 | | |
512 | 514 | | |
| 515 | + | |
| 516 | + | |
513 | 517 | | |
514 | 518 | | |
515 | 519 | | |
| |||
648 | 652 | | |
649 | 653 | | |
650 | 654 | | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
651 | 662 | | |
652 | 663 | | |
653 | 664 | | |
| |||
656 | 667 | | |
657 | 668 | | |
658 | 669 | | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | 670 | | |
664 | 671 | | |
665 | 672 | | |
| |||
0 commit comments