※ 引述《david220 (gogo mavs)》之銘言:
: slide page 3.
: HTTP/1.0 uses nonpersistent HTTP
: slide page 7.
: In request message
: * Connection: close
: * Means non-persistent connection
: * Connection: Keep-Alive
: * Means persistent connection
: * Server should keep the connection alive a default
: time(10s) and send back the Keep-Alive header
: * Ex. Keep-Alive: timeout=10, max=100
: 那HTTP/1.0但connection state: keep-alive的話
: 到底是要persistent還是nonpersistent?
persistent
: 會有這樣的疑問是因為wget的header
: =======================================
: GET / HTTP/1.0
: User-Agent: Wget/1.9.1
: Host: linux3.csie.ntu.edu.tw:5409
: Accept: */*
: Connection: Keep-Alive
: 其實要不要做難度上都一樣,只是想要有一個明確的準則
: 我目前是只根據connection state判斷
Persistent Connection是在HTTP 1.1之後才被定義出來的,
但後續也有一些Application針對HTTP 1.0新增Persistent
Connection的支援,這次作業就根據Connection Header的內容
來決定是否要進行Persistent Connection,希望不會增加
大家的難度。
--
感覺對了
就要大聲說出來
不然會一輩子後悔
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.28.99