mirror of
https://github.com/curl/curl.git
synced 2026-04-14 13:01:42 +08:00
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
39 lines
524 B
XML
39 lines
524 B
XML
<?xml version="1.0" encoding="US-ASCII"?>
|
|
<testcase>
|
|
<info>
|
|
<keywords>
|
|
unittest
|
|
HSTS
|
|
</keywords>
|
|
</info>
|
|
|
|
<client>
|
|
<features>
|
|
unittest
|
|
HSTS
|
|
</features>
|
|
|
|
# This date is exactly "20190124 22:34:21" UTC
|
|
<setenv>
|
|
CURL_TIME=1548369261
|
|
</setenv>
|
|
<name>
|
|
HSTS load more than 1,000 entries from file
|
|
</name>
|
|
|
|
# test 1674 renders the input file itself, then reads it
|
|
<command>
|
|
%LOGDIR/hsts%TESTNUMBER
|
|
</command>
|
|
</client>
|
|
|
|
<verify>
|
|
<stdout>
|
|
Number of entries: 1000
|
|
</stdout>
|
|
<limits>
|
|
Allocations: 1100
|
|
</limits>
|
|
</verify>
|
|
</testcase>
|