Test HTTP with Telnet

Another in my series of Scribbles of basic TCP service testing using telnet.

HTTP 1.0 is slowing disappearing. Try HTTP 1.1. In HTTP 1.1, the hostname is required in every (?) request. This makes virtual hosts sharing the same IP part of the standard.

telnet www.perceptus.ca 80

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

GET / HTTP/1.1 (press enter once)
Host: www.perceptus.ca (press enter twice)
[Apparently some servers require "C
onnection: close" parameter too]

You must do a carriage return after the HTTP/1.1, and then send the "Host" line.

 

DEPRECATED HTTP/1.0 METHOD:

Telnet to port 80. The simplest request for the root page:

bash-2.05a$ telnet localhost 80

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET / HTTP/1.0

Replace localhost with the computer to connect to, e.g. www.perceptus.ca and the "/" in the GET line with whatever page to display from that domain. You need to send a line feed or two to send the web page request.

A reference: http://www.dgate.org/~brg/bvtelnet80/

 
tags: test, http, telnet
Related Scribbles:
  • Test SMTP Server Manually with Telnet / Open SSL
  • Web Development Resources


  • ID: 524
    Author:
    leonard
    Date Updated:
    2014-01-22 13:30:12
    Date Created:
    2004-08-07 22:49:56

    Edit

    Comments?
     >> Leonard Chan's Homepage  >> Scribble Web  >> Test HTTP with Telnet
    leonard.lotus-land.ca is hosted by Perceptus Solutions Inc.