Thursday, February 16, 2012

Web server request and response via telnet

How to see web server response via telnet command.

As you know, most of network connection you can see via telnet.
Mail server, Web server, FTP server so on.

Now, I will show you how to access WEB Server via telnet.
There are many tool to see it better.
But, when you need only for simple reason to check, telnet is the good option to check.

telnet 80
GET / HTTP/1.0
'type enter 2 times'

When you are behind of proxy server. you should go through proxy. You need to telnet to your proxy server and connect.
Please see below example. is the proxy server ip and 8080 is the port number
telnet 8080
'type enter 2 times'
GET / HTTP/1.0
'type enter 2 times'

you can replace '/' character which is located after 'GET' to your demand like '/index.php', '' so on.
most of server use virtual host. so "Host" header is necessary to configure.
It should be basically same as host address with out any query string.

If you are interested more about header list
Please check this link

now, you can make your own script for regular check or application for performance test so on.

No comments:

Post a Comment