cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3537
Views
5
Helpful
1
Replies

very basic telnet question (as used in Windows CMD)

stauntonkcom
Level 1
Level 1

I am reading the book Computer Networking A Top-Down Approach. 

 

When discussing application layer protocols, the author suggests typing the following commands into CMD in order to see a series of HTTP response messages: 

 

telnet gaia.cs.umass.edu 80

GET /kurose_ross/interactive/index.php HTTP/1.1

Host: gaia.cs.umass.edu

 

(See screenshot at the bottom of this post for the section of the book I have taken this from. )

 

However, I am unable to get this to work as expected. When I enter the first line "telnet gaia.cs.umass.edu 80", it seems promising, and it brings me to what appears to be a telnet prompt ... but beyond that, I can't really do anything, and if I try to copy and paste the second line "GET /kurose_ross/interactive/index.php HTTP/1.1" in to the telnet session for example, I just get the error message: 

"

HTTP/1.1 400 Bad Request Date: Mon, 02 Nov 2020 22:06:20 GMT Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.12 mod_perl/2.0.11 Perl/v5.16.3 Content-Length: 226 Connection: close Content-Type: text/html; charset=iso-8859-1

"

 

Can someone tell me what I am doing wrong? Many thanks 

******************************************************************************************************

******************************************************************************************************

network screenshot http test.PNG

1 Accepted Solution

Accepted Solutions

kubn2
Level 1
Level 1

Hello,

 

After some tests I managed to get the response as you can see. mess.JPG

The thing is website doesn't like this part: 

 

 

HTTP/1.1

 

 

So if you want your command to work first type:

 

 

telnet gaia.cs.umass.edu 80

 

 

Hit enter then paste this:

 

 

 

GET /kurose_ross/interactive/index.php

 

 

 

And hit enter and now you should get the response

View solution in original post

1 Reply 1

kubn2
Level 1
Level 1

Hello,

 

After some tests I managed to get the response as you can see. mess.JPG

The thing is website doesn't like this part: 

 

 

HTTP/1.1

 

 

So if you want your command to work first type:

 

 

telnet gaia.cs.umass.edu 80

 

 

Hit enter then paste this:

 

 

 

GET /kurose_ross/interactive/index.php

 

 

 

And hit enter and now you should get the response