4 ms·
"http://http://http://@http://http://?http://#http://" is a legitimate URL
- orionblastar 4y agoAll I get is: This site can’t be reached
- 4oo4 4y agoValid URL != Someone serving that URL
- orionblastar 4y agoIt would be good if someone served that URL.
- SturgeonsLaw 4y agoWouldn't be possible on the open internet due to the hostname being "http" with no TLD. You could host it yourself on a network where you controlled the DNS however.
- 4oo4 4y agoThis mostly makes sense except the 3rd and 5th `http:// http://`, unless those are supposed to be grouped together? http:// (scheme) http:// (user) http:// ?? @http:// (hostname) http:// ?? ?http:// (parameter) #http:// (fragment) Will buy a beer for the first person that demonstrates how to serve that URL.
- joegibbs 4y agoIs it http:// (scheme) http: (user) //http:// (password) at the start?
- 22c 4y agoYes, the username is "http" the password is "//http:// http://" The : separates the username and password (it's not part of either). The url-path is "/http://?http://#http:// http://?http://#http://" which can be further broken down into /abs_path, ?query and #fragment. Edit: Also further correction to gp is that the hostname is "http" not "@http:// http://". The @ is the separator between username:password@hostname the : separates the port, which is omitted, and defaults to 80 for a http URI scheme and the first / separates the host:port portion from the path (which, in this case, happens to start with a /)
- dmkii 4y agoAll you have to do is start a new country called Http, convince ICANN to adopt it as a new TLD (will need a lot of persuasion) and serve “http” as a dotless domain. But, you know, anything for a beer… (fyi: the host name is the part after @ and before the port number indicated by “:”)
- easrng 4y agoWell first let's parse it. Welcome to Node.js v17.7.2. Type ".help" for more information. > u=new URL("http://http://http://@http://http://?http://#http://") URL { href: 'http://http//http://@http://http://?http://#http://', origin: 'http://http', protocol: 'http:', username: '', password: '', host: 'http', hostname: 'http', port: '', pathname: '//http://@http://http://', search: '?http://', searchParams: URLSearchParams { 'http://' => '' }, hash: '#http://' } Browsers give the same result, with uglier formatting. As for serving a request: ~/a $ python3 -m http.server 80 & [1] 31173 ~/a $ Serving HTTP on :: port 80 (http://[::]:80/) ... ~/a $ curl --resolve http:80:127.0.0.1 "http://http://http://@http://http://?http://#http://" ::ffff:127.0.0.1 - - [07/Sep/2022 02:15:53] code 404, message File not found ::ffff:127.0.0.1 - - [07/Sep/2022 02:15:53] "GET //http://@http://http://?http:// HTTP/1.1" 404 - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <!-- snip --> </html> ~/a $
- pgreenwood 4y agoReminiscent of the fact that "Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo." is a grammatically correct sentence. https://en.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffalo_buffalo_buffalo_Buffalo_buffalo https://en.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffal...
- ranguna 4y agohttp (protocol) :// (separator) http (username) : (separator) //http:// http:// (password) @ (separator) http (domain name) : (separator) //http: (port) // (path) ?http:// http:// (query string) #http:// http:// (fragment) Is that it, the port looks a bit strange though ?