Commit 60cffa2
committed
fix: decode percent-encoded unreserved chars before resolving dot segments in normalize
RFC 3986 Section 6.2.2.2 specifies that percent-encoded unreserved
characters should be decoded before applying other normalizations,
including dot-segment resolution. The previous order (resolve-then-decode)
meant that %2e%2e was not recognized as ".." during path normalization,
producing incorrect results like http://example.com/../foo instead of
http://example.com/foo.1 parent 978f2e6 commit 60cffa2
2 files changed
Lines changed: 24 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1512 | 1512 | | |
1513 | 1513 | | |
1514 | 1514 | | |
1515 | | - | |
1516 | | - | |
1517 | | - | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
1518 | 1518 | | |
1519 | 1519 | | |
1520 | 1520 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1461 | 1461 | | |
1462 | 1462 | | |
1463 | 1463 | | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
1464 | 1485 | | |
1465 | 1486 | | |
1466 | 1487 | | |
| |||
0 commit comments