Computer

HOW TO: Request a Web Page Through a Telnet Client

steloflute 2013. 7. 25. 23:30

http://support.microsoft.com/kb/279466/en-us

 

Occasionally, a Web browser is not available to test connectivity to a Web server. This step-by-step article describes a process that you can use to connect to a Web server and display the HTML contents of Web page by using a console or command-line based telnet application.


Request a Web Page Through a Telnet Client
According to RFC 2616, the specification for the HTTP protocol, a properly formatted GET request from an HTTP client begins with the GET verb (note that the verb uses all capital letters) and ends with the ASCII characters carriage return (CR) followed by line feed (LF). This appears as the hexadecimal characters OD OA in the last two bytes of the GET request in a Network Monitor trace.

For more information, visit the following RFC Web site:
RFC 2616
http://www.w3.org/Protocols/rfc2616/rfc2616.html
(http://www.w3.org/Protocols/rfc2616/rfc2616.html)
To request the document that is located at http://ServerName/VirtualDirectory/WebPage.asp from a telnet client, type the following commands at the console or command prompt (press ENTER or RETURN after each line):
telnet ServerName 80
GET /VirtualDirectory/WebPage.asp
After you type the second command, the HTML data in WebPage.asp is returned to the telnet client from the Web server.

NOTE: This example assumes that the Web server is configured to use the default HTTP port (TCP 80). If the Web server is listening on a different port, substitute that port number in the first line of the example. Also, this example does not work properly over an HTTPS/SSL connection (TCP 443, by default), because the telnet client cannot negotiate the necessary encryption commands to establish the SSL session. Although an initial connection is possible over the HTTPS/SSL port, no data is returned when you issue a GET request.

 

 

텔넷 프로그램으로 http get 요청하여 페이지 불러오는 방법


포트 80 으로 접속하여 GET 을 보낸다. (대소문자 주의)

 

telnet ServerName 80
GET /

 

또는 그냥

GET