Telnet simulate http access

Source: Internet
Author: User

There are only a few common commands for HTTP.

GET

HEAD

PUT

POST

Let's briefly describe http GET and HEAD.

Here are two simple examples:

GET example

Telnet serverip 80

GET http://www.aaa.com/aaa.html // enter the get command and get url

HTTP/1.0 200 OK
Date: Thu, 24 Apr 2014 01:19:11 GMT
X-Powered-By: ASP. NET yltv
X-AspNet-Version: 2.0.50727
Content-Type: text/html; charset = gb2312
Content-Length: 28309
X-Cache: HIT from cache121.aaa.com
Connection: close

<H1> john_test page !!! </H1>

The connection to the host is lost.

The header example shows that the HTTP header information of the response can replace the-I parameter of the CURL command in win.

Telnet serverip 80

GET http://www.aaa.com/aaa.html // enter the get command and get url

HTTP/1.0 200 OK
Date: Thu, 24 Apr 2014 01:19:11 GMT
X-Powered-By: ASP. NET yltv
X-AspNet-Version: 2.0.50727
Content-Type: text/html; charset = gb2312
Content-Length: 28309
X-Cache: HIT from cache121.aaa.com
Connection: close

The connection to the host is lost.

Just like squid has a clear Cache http command, PUGRE

If you clear the cache of a page, telnet to port 80 of the squid server.

Then run PUGRE http: // host/url to cache pugre.

But the premise is that the squid acl allows!

The original HTTP protocol is so simple !!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.