telnetting to see how HTTP works

rookie1010

Senior member
Mar 7, 2004
984
0
0
Hello,

i was trying to see hwo the HTTP protocol works, and tried to do a telnet to news.bbc.co.uk 80 and the prompt just hangs(?) at Connecting to new.bbc.co.uk. have i got the syntax wrong or is it because i am behind a firewall?

are telnet not supported by microbrowser, i tried to telnet to news.bbc.co.uk and my handset returned the message that the protocol is not supported.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Depends on the firewall, if it won't let you out without going through a proxy then you need to ask the proxy for the website for you. It works fine here, chances are that you're using MS telnet which doesn't print anything on connection and neither does an HTTP server so you're really connected and ready to enter an HTTP request.
 

mcmilljb

Platinum Member
May 17, 2005
2,144
2
81
If you're just using Window's built-in telnet, I get just a blank session, but I can type requests. For example, I connected to Microsoft by typing "telnet www.microsoft.com 80". That establishes the connection to www.microsoft.com on port 80. When I type the first time, I can't see what I'm typing. Just type "GET /en/us/default.aspx" any way, and you'll get a response.
 

rookie1010

Senior member
Mar 7, 2004
984
0
0
thanks for the reply,

I did a search on how to turn on local echo and came up with the following

start telnet client
and then set localechO
this gives the Microsoft Telnet prompt

I can not enter telnet www.anandtech.com 80 within the Microsoft Telnet prompt but i can enter telnet www.anandtech.com within the normal prompt, hence i probably lose the settings
but i can do the following within the microsoft telnet prompt "open www.anandtech.com 80". i guess this is equivalent to a telnet

i tried to connect to news.bbc.co.uk at port 80 and tried to get the following page
http://news.bbc.co.uk/2/hi/africa/7295189.stm

when i tried to connect, i get the message "connecting to news.bbc.co.uk" and the cursor goes to the top of the screen

i type in GET URL "http://news.bbc.co.uk/2/hi/africa/7295189.stm HTTP/1.0" but nothing seems to happen.


 

rookie1010

Senior member
Mar 7, 2004
984
0
0
thanks for the reply mcmilljb,

i was testing all the possibilities and had posted when i noticed that you had posted before my last message.

the GET command that you provided me works a treat but it does not seem to work with the microsoft telnet client (the client which comes up when i type in telnet into the command prompt)

can you suggest an HTTP debug tool which captures HTTP messages which will enable me to learn HTTP.

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
There's really only a handful of HTTP commands like GET, POST, PUT, etc so there's not a whole log to learn. And unless you're writing a HTTP client or server there's not much of a reason to have any more than cursory knowledge about the protocol. Usually whatever is broken is more obvious from log files and error messages than packet traces.
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
I've seen a lot of your posts rookie1010 trying to understand in the last few days. I suggest starting out with understanding the OSI model. There's probably a good wikipedia page to give you the basics. From there I suggest reading the RFCs on the specific protocol you want to learn more about.

By trying to learn from the top down isn't going to work. Learn from the bottom up. Understand what an actual connection/socket is (this is TCP), then move up to the actual layer7 protocol itself that is operating on that connection/socket. If you really want to learn grab a packet capture and go through it packet by packet (wireshark/ehtereal) to understand what is happening. For what you are asking focusing on layer3 (ip addressing) and up would be sufficient.
 

Red Squirrel

No Lifer
May 24, 2003
67,904
12,374
126
www.anyf.ca
I've actually seen servers where you can connect with a browser (no proxy) but not with telnet, I really don't know how that even works, its kinda wacked. I could understand if it dropped the connection right away, as maybe it would check if its taking you too long as a browser would send the commands instant vs telnet you having to type it, but I've seen where it totally refuses the connection. Connecting to port 80 obviously.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I've actually seen servers where you can connect with a browser (no proxy) but not with telnet, I really don't know how that even works, its kinda wacked

That's impossible, the web server has no way to tell what's connecting to it until after the request is issued.
 

mcmilljb

Platinum Member
May 17, 2005
2,144
2
81
Originally posted by: rookie1010
thanks for the reply mcmilljb,

i was testing all the possibilities and had posted when i noticed that you had posted before my last message.

the GET command that you provided me works a treat but it does not seem to work with the microsoft telnet client (the client which comes up when i type in telnet into the command prompt)

can you suggest an HTTP debug tool which captures HTTP messages which will enable me to learn HTTP.

Yeah I had some issues with it too. It was doing something wrong and getting errors. Although it could be since I am not a web browser remembering all the stuff I can request and format. There are plenty of books that explore the topic more.
 

qaa541

Senior member
Jun 25, 2004
397
0
0
OP, there are only a few actually HTTP commands such as GET, POST, etc. Wikipedia has a good article on HTTP which describes them. You can always read the original RFC which is where all the gory details are.

If you really want to see the transactions that are going on in HTTP, you can use a network analyzer like Wireshark to capture the transactions. Just tell Wireshark to capture and then visit a web page in your browser. Then you can stop the capture and look at the exchanges between your computer and the browser.
 

Red Squirrel

No Lifer
May 24, 2003
67,904
12,374
126
www.anyf.ca
Originally posted by: Nothinman
I've actually seen servers where you can connect with a browser (no proxy) but not with telnet, I really don't know how that even works, its kinda wacked

That's impossible, the web server has no way to tell what's connecting to it until after the request is issued.

Exactly, thats why I found it was whacked when it did not let me connect with telnet but it did with a browser. I can't seem to remember which sites were like that so I can post.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Exactly, thats why I found it was whacked when it did not let me connect with telnet but it did with a browser. I can't seem to remember which sites were like that so I can post.

Something else was wrong because a remote web server can't tell the difference between 'telnet server 80' and putting the URL into a web browser until after the HTTP request issued.
 

rookie1010

Senior member
Mar 7, 2004
984
0
0
Originally posted by: qaa541
OP, there are only a few actually HTTP commands such as GET, POST, etc. Wikipedia has a good article on HTTP which describes them. You can always read the original RFC which is where all the gory details are.

If you really want to see the transactions that are going on in HTTP, you can use a network analyzer like Wireshark to capture the transactions. Just tell Wireshark to capture and then visit a web page in your browser. Then you can stop the capture and look at the exchanges between your computer and the browser.

qaa541, thanks for pointing me to wireshark. will use it understand the transactions.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |