我认为头语法就像GET语法,但是当我尝试使用telnet时
o mirror.bytemark.co.uk 80
GET /ubuntu-releases/lucid/ubuntu-10.04-desktop-i386.iso
它按预期工作,而
o mirror.bytemark.co.uk 80
HEAD /ubuntu-releases/lucid/ubuntu-10.04-desktop-i386.iso
失败。那么HEAD请求的telnet语法是什么?
我认为头语法就像GET语法,但是当我尝试使用telnet时
o mirror.bytemark.co.uk 80
GET /ubuntu-releases/lucid/ubuntu-10.04-desktop-i386.iso
它按预期工作,而
o mirror.bytemark.co.uk 80
HEAD /ubuntu-releases/lucid/ubuntu-10.04-desktop-i386.iso
失败。那么HEAD请求的telnet语法是什么?
Answers:
您需要指定HTTP / 1.1协议以及主机头
o mirror.bytemark.co.uk 80
HEAD /ubuntu-releases/lucid/ubuntu-10.04-desktop-i386.iso HTTP/1.1
Host: mirror.bytemark.co.uk
HTTP/1.1 200 OK
Date: Tue, 22 Jun 2010 20:59:19 GMT
Server: Apache/2.2.9 (Debian)
Last-Modified: Thu, 29 Apr 2010 12:56:31 GMT
ETag: "238046-2bb71800-4855fa7d53dc0"
Accept-Ranges: bytes
Content-Length: 733419520
Content-Type: application/x-iso9660-image