6

I'm learning http, and trying to use telnet to send my own http requests.

In the command prompt, I entered:

telnet google.com 80

Result: The screen is cleared and I see a blinking cursor. 1. Why don't I see any indication that I'm connected?

Now, trying to type an http command (get index.html...) I see the cursor moving to the right as I type, but I don't see the letters appear on the screen. Only blanks. 2. Why is that?

(Using windows7 64 bit)

shealtiel
  • 8,020
  • 18
  • 50
  • 82

1 Answers1

12

Why don't I see any indication that I'm connected?

The blinking cursor on a blank screen is the indication you are connected. Otherwise, you'll get an error describing why you couldn't connect.

I see the cursor moving to the right as I type, but I don't see the letters appear on the screen.

Use localecho.

an http command (get index.html...)

That is not a valid HTTP request, you should at least type something like this, followed by two Enters:

GET / HTTP/1.1
Host: google.com

Look at the RFC on how to construct an HTTP request and see some samples.

Community
  • 1
  • 1
CodeCaster
  • 147,647
  • 23
  • 218
  • 272
  • 1
    Thank you! The set localecho did the trick. Why on earth would anybody prefer not to see what he is typing? (i suspect that there is a reason...) – shealtiel Nov 01 '12 at 16:03
  • You're assuming a local echo is the only way to see what you're typing. However, a server might provide a remote echo. If you had both a local and a remote echo, you'd see two of every letter you typed. – super_aardvark Jan 10 '14 at 20:17
  • 2
    I was responding to @shealtiel's comment, which was a question about local echo in a telnet client. – super_aardvark Jan 10 '14 at 20:25