使用TCP調試小助手或者是telnet便可,他們都讓你站在tcp這個巨人的肩膀上。html
最簡單的http請求,莫過於:nginx
GET / HTTP/1.1
Host: www.baidu.comweb
注意最後要加兩個空行,才表示一個完整的http請求,第一個空行用來標識head和body之間的分隔,第二個空行代表body爲空。tcp
也能夠加上其餘head域,如:
Referer: http://hongchangfirst/
spa
響應能夠爲:.net
HTTP/1.1 200 OK
Server: nginx/0.7.68
Date: Tue, 26 Feb 2013 02:34:44 GMT
Content-Type: text/html; charset=utf-8
Content-Length:35
Connection: keep-alive
hongchangfirst is your best friend.
調試
轉載請註明出處:
orm
原文:http://blog.csdn.net/hongchangfirst/article/details/8086781htm
做者:hongchangfirstblog