The cached alternative service entries expire overly soon
Categories
(Core :: Networking: DNS, defect, P2)
Tracking
()
People
(Reporter: fantasyfate, Unassigned)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
56.08 KB,
application/octet-stream
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0
Steps to reproduce:
- Enable "DNS over HTTPS"
- Open "https://cdnjs.cloudflare.com/"
- Close Firefox.
- Observe results from "AlternateServices.txt" in the corresponding profile folder.
Actual results:
https:www.cloudflare.com:443:.:^partitionKey=%28https%2Ccloudflare.com%29:3 0 19385 https:www.cloudflare.com:443:www.cloudflare.com:443::n:1674919187:h3:n:1674919180:n:^partitionKey=%28https%2Ccloudflare.com%29:|n:y:
https:cdnjs.cloudflare.com:443:.:^partitionKey=%28https%2Ccloudflare.com%29:3 0 19385 https:cdnjs.cloudflare.com:443:cdnjs.cloudflare.com:443::n:1674919185:h3:n:1674919180:n:^partitionKey=%28https%2Ccloudflare.com%29:|n:y:
Expected results:
The meaning of alternative service entries could be interpreted by reading https://searchfox.org/mozilla-central/source/netwerk/protocol/http/AlternateServices.cpp#368-404
Therefore, the lifetimes of alternative service entries are unexpectedly less than 10 seconds, which seems not to conform with the definition of Alt-Svc HTTP header.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Networking: DNS' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
I couldn't reproduce your example with https://cdnjs.cloudflare.com/
Could you maybe capture some HTTP logs? https://firefox-source-docs.mozilla.org/networking/http/logging.html
Thanks
Reporter | ||
Comment 3•2 years ago
|
||
I attempted to open https://cdnjs.cloudflare.com/, close browser, and clear cache several times, and discovered that the lifetimes of cached alternative service is normal only for the first time.
Additionally, I have added one entry to "AlternateServices.txt", thereby always enabling "DNS over HTTP/3":
https:mozilla.cloudflare-dns.com:443:.::3 0 0 https:mozilla.cloudflare-dns.com:443:mozilla.cloudflare-dns.com:443::n:2147483647:h3:y:0:n::|n:y:
The following command I used captured some HTTP logs:
set MOZ_LOG=nsHttp:5
set MOZ_LOG_FILE=%TEMP%\log.txt
"c:\Program Files\Mozilla Firefox\firefox.exe" https://cdnjs.cloudflare.com/
The contents of "AlternateServices.txt" as follow:
https:cdnjs.cloudflare.com:443:.:^partitionKey=%28https%2Ccloudflare.com%29:3 0 19387 https:cdnjs.cloudflare.com:443:cdnjs.cloudflare.com:443::n:1675117177:h3:n:1675117172:n:^partitionKey=%28https%2Ccloudflare.com%29:|n:y:
https:www.cloudflare.com:443:.:^partitionKey=%28https%2Ccloudflare.com%29:3 0 19387 https:www.cloudflare.com:443:www.cloudflare.com:443::n:1675117178:h3:n:1675117172:n:^partitionKey=%28https%2Ccloudflare.com%29:|n:y:
The lifetime of "cdnjs.cloudflare.com" is 1675117177 - 1675117172 = 5 seconds.
The lifetime of "www.cloudflare.com" is 1675117178 - 1675117172 = 6 seconds.
Updated•2 years ago
|
Updated•2 years ago
|
Description
•