Change #263166
| Category | curl |
| Changed by | Daniel Stenberg <daniel@haxx.se> |
| Changed at | Wed 01 Apr 2026 14:38:41 |
| Repository | https://github.com/curl/curl.git |
| Project | curl |
| Branch | master |
| Revision | 03a792b186da7fdfbe4b85b022d7790091455bdc |
Comments
HSTS: cap the list at 1,000 entries Avoid never-ending growth. When adding more entries, it now deletes the first entry in the list, which is the oldest added entry still held in memory. I decided to avoid a Least Recently Used concept as I suspect with a list with this many entries most entries have not been used, and we don't save the timestamp of recent use anyway. The net effect might (no matter what) be that the removed entry might feel a bit "random" in the eyes of the user. Verify with test 1674 Ref #21183 Closes #21190
Changed files
- lib/hsts.c
- lib/hsts.h
- tests/data/Makefile.am
- tests/data/test1674
- tests/unit/Makefile.inc
- tests/unit/unit1674.c