Question about getting IP address for request within URLLoaderThrottle::WillStartRequest

26 views
Skip to first unread message

thefrog

unread,
Dec 10, 2024, 9:58:01 AM12/10/24
to net-dev
Hi net-dev@,

Do you know if there is a way to get the IP address for the relevant request URL when URLLoaderThrottle::WillStartRequest is called? (Or is it too early in the request and the IP address is not yet determined?)

Please let me know if I should redirect this question elsewhere.

Thank you,
thefrog@

Matt Menke

unread,
Dec 10, 2024, 10:01:53 AM12/10/24
to thefrog, net-dev
Chrome doesn't do DNS lookups before requests start (If we later discover a matching entry in the HTTP cache, discover we should be using a proxy, or follow and HSTS redirect, we may not even do a DNS lookup, or even use the network at all), so short of doing your own DNS lookup and blocking starting the request until that has completed, you're not going to be able to be able to get an IP address there.

--
You received this message because you are subscribed to the Google Groups "net-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to net-dev+u...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/net-dev/CABi8Hyy75ZqNHwGQRZ4KnGmK0msNJfK3stbEDz7V%2BudGEc0mHA%40mail.gmail.com.

thefrog

unread,
Dec 10, 2024, 10:04:55 AM12/10/24
to Matt Menke, net-dev
Thanks!
Reply all
Reply to author
Forward
0 new messages