Commit 8976e42
committed
Fix(http): Normalize header case for caching
Headers from upstream servers can have inconsistent casing (e.g., "ETag" vs "etag"). This was causing issues with cache lookups, as the comparison was case-sensitive.
This commit fixes the issue by:
- Converting all header keys to lowercase before storing them in the cache metadata file.
- Using lowercase keys when retrieving headers for cache validation (ETag, Last-Modified).
This ensures that cache lookups are case-insensitive and therefore more robust.1 parent 3edd5e2 commit 8976e42
2 files changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
| 170 | + | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| |||
539 | 542 | | |
540 | 543 | | |
541 | 544 | | |
| 545 | + | |
542 | 546 | | |
543 | 547 | | |
544 | 548 | | |
| |||
576 | 580 | | |
577 | 581 | | |
578 | 582 | | |
579 | | - | |
| 583 | + | |
580 | 584 | | |
581 | 585 | | |
582 | 586 | | |
| |||
587 | 591 | | |
588 | 592 | | |
589 | 593 | | |
590 | | - | |
| 594 | + | |
591 | 595 | | |
592 | 596 | | |
593 | 597 | | |
| |||
598 | 602 | | |
599 | 603 | | |
600 | 604 | | |
601 | | - | |
| 605 | + | |
602 | 606 | | |
603 | 607 | | |
604 | 608 | | |
| |||
0 commit comments