다음은 Telnet으로 웹 서버를 호출하는 방법이다.
대상 호스트가 192.168.5.2일 때 아래와 같은 결과가 나오려면 어떤 명령을 입력하여야 하는가?
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Tue, 31 Oct 2006 08:00:29 GMT
Connection: close
Allow: GET, HEAD, POST, TRACE, OPTIONS
Content-Length: 0
답)
$ telnet 192.168.5.2 80
예시) "telnet www.google.com 80" 명령어를 입력한 경우
HTTP/1.0 400 Bad Request
Content-Length: 54
Content-Type: text/html; charset=UTF-8
Date: Wed, 05 May 2021 09:03:17 GMT
예시) "telnet www.cyworld.nate.com 80" 명령어를 입력한 경우
HTTP/1.1 400 Bad Request
Content-Type: text/html
Date: Wed, 05 May 2021 09:03:58 GMT
Connection: close
Content-Length: 35