add HEAD note
Former-commit-id: 095defa9dd4f0ffb4aeab102fb71c4e855a7f721 [formerly 46884c4247c476474ebb65b38baf12d11c1483e3] [formerly 33ea1547102e67a6974a9cf8c257fad73a350801 [formerly efdcb9fc58
]]
Former-commit-id: 6f03f62b0a2ba1b1b6303ab6412862187d9ca586 [formerly 216445c62251c57b3b65bd86013d462265972970]
Former-commit-id: 493d08bd900c3732450a3c4ad41ffedbf429142d
pull/726/head
parent
5fcc82a2b1
commit
fa1c6b7d83
|
@ -69,7 +69,7 @@ func (f FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, err
|
|||
}
|
||||
|
||||
switch r.Method {
|
||||
case "GET":
|
||||
case "GET", "HEAD":
|
||||
// Excerpt from RFC4918, section 9.4:
|
||||
//
|
||||
// GET, when applied to a collection, may return the contents of an
|
||||
|
@ -89,6 +89,7 @@ func (f FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, err
|
|||
break
|
||||
}
|
||||
|
||||
// TODO: since HEAD shouldn't return any body, we should make a wrapper here...
|
||||
if i.IsDir() {
|
||||
r.Method = "PROPFIND"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue