3 ms·
I'm pretty sure both the Win32 libc and applications do this. Try typing "http://example" http://example" into Firefox. You'll get example.com.
by snazz 7y ago
I'm pretty sure both the Win32 libc and applications do this. Try typing "http://example" http://example" into Firefox. You'll get example.com.
- phit_ 7y agomh, can't reproduce on Windows 10 and Firefox 73 get a "Server not found" page as expected
- wink 7y agoWin 10 and Firefox 72.0.2 here. New Private Window -> http://example http://example -> http://www.example.com/ http://www.example.com/
- bscphil 7y agoIt's application dependent behavior, AFAIK. Windows internals / APIs add .com by default, I believe. You probably hate this behavior like I do, and at some point in the past set "browser.fixup.alternate.enabled" to false in Firefox's about:config.
- int_19h 7y agoWin32 socket API doesn't do it. Python wraps it more or less directly, and: Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> socket.gethostbyname("example") Traceback (most recent call last): File "<stdin>", line 1, in <module> socket.gaierror: [Errno 11001] getaddrinfo failed >>> socket.gethostbyname("example.com") '93.184.216.34'