The problem is using HTTP 1.0 on a server that requires HTTP 1.1 (and the
Host: header that is a mandatory part of HTTP 1.1), probably because it is probably doing virtual hosting of multiple websites on one IP address. Or maybe it is behind an HTTP load balancer or reverse proxy that is basically doing the same thing: supporting multiple separate web server domain names behind one IP address and port.
This works for me:
$ telnet www.httpbin.org 80
Connected to www.httpbin.org.herokudns.com.
Escape character is '^]'.
GET /ip HTTP/1.1
…and I get back…
HTTP/1.1 200 OK
Date: Tue, 09 Jan 2018 22:01:19 GMT
Via: 1.1 vegur
"origin": "[My IPv4 address redacted]"
Note that the connection stayed open and I had to escape to the
telnet> prompt to close. I could have avoided that by adding a
Connection: close header to my request.
If you try HTTP/1.1 with a
Host: header and it still doesn't work for you, make sure your telnet client is sending CRLFs and not just carriage returns or linefeeds. Make sure you end your request with an extra CRLF after the last line.