11-02-2020 02:09 PM
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
******************************************************************************************************
******************************************************************************************************
Solved! Go to Solution.
11-02-2020 04:09 PM - edited 11-02-2020 04:14 PM
Hello,
After some tests I managed to get the response as you can see.
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
11-02-2020 04:09 PM - edited 11-02-2020 04:14 PM
Hello,
After some tests I managed to get the response as you can see.
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide