Hacker News new | ask | show | jobs
by unicodepepper 2133 days ago
Apparently it is possible to do it with local DNS resolution, using your hosts file Not sure how possible it would be on a remote DNS server, or whose authority you'd need to actually do it.

[root@host ~]$ curl -v http://.

* About to connect() to . port 80 (#0)

* Trying 127.0.0.1...

* Connected to . (127.0.0.1) port 80 (#0)

> GET / HTTP/1.1

> User-Agent: curl/7.29.0

> Host: .

> Accept: /

>

< HTTP/1.1 400 Bad Request

< Date: Sat, 15 Aug 2020 15:38:54 GMT

< Server: Apache

< Content-Length: 347

< Connection: close

< Content-Type: text/html; charset=iso-8859-1

<

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>400 Bad Request</title>

</head><body>

<h1>Bad Request</h1>

<p>Your browser sent a request that this server could not understand.<br />

</p>

<p>Additionally, a 400 Bad Request

error was encountered while trying to use an ErrorDocument to handle the request.</p>

</body></html>

* Closing connection 0