Tesla wrote:
Does anyone have any information (such as a state diagram) of how a
browser request is fielded by Mozilla?
Specifically, I am wondering when entering a URL in the browser with
an IP address, how is the request handled versus providing a DNS name
in the URL? Where in the code does it determine if a DNS lookup is
required to serve the request or not?

To answer your specific question, most of the code doesn't care at all, the determination happens pretty low in the stack:
http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/src/nsHostResolver.cpp#556


In principle even this code wouldn't have to care and could just pass IP address strings to getaddrinfo as well (and have the resolver worry about that determination) but that fails on some platforms.


For your documentation question, try:
https://developer.mozilla.org/en/Document_Loading_-_From_Load_Start_to_Finding_a_Handler
https://developer.mozilla.org/en/The_life_of_an_HTML_HTTP_request

The second document is somewhat outdated in the details but is still good enough for the big picture.

-christian
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to