Commit 5286530
fix(client): preserve trailing slash on bare-root path pattern (#441)
The reinstateSlash logic in resolveURLPath (introduced in 6cdcb95 to
fix #289) deliberately excluded pathPattern == "/" to avoid producing
"//" when basePath was empty or "/". That left one combination
inconsistent with every other trailing-slash case: basePath=/myservice
with pathPattern=/ produced /myservice instead of /myservice/.
Replace the pattern-shape carve-out with a HasSuffix check on the
already-built urlPath, which is idempotent and keeps the double-slash
cases unchanged.
Closes #101
Signed-off-by: Frédéric BIDON <fredbi@yahoo.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 0d73e8c commit 5286530
2 files changed
Lines changed: 43 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
536 | | - | |
537 | | - | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
538 | 542 | | |
539 | 543 | | |
540 | 544 | | |
541 | 545 | | |
542 | 546 | | |
543 | | - | |
| 547 | + | |
544 | 548 | | |
545 | 549 | | |
546 | 550 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
684 | 720 | | |
685 | 721 | | |
686 | 722 | | |
| |||
0 commit comments