how to feed a file to telnet
- by knittl
hello community,
understanding http and headers i played around with telnet to send requests. to not type everything again and again and again i thought i'd write a small textfile with all the commands i need.
my file is as simple as follows:
GET /somefile.php HTTP/1.1
Host: localhost
i then try to feed it to telnet with io-redirection:
$ telnet localhost 80 < telnet.txt
but all output i get is
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
what am i doing wrong?