|
|
|
@ -55,8 +55,8 @@ func RunHttpServer(listenIp, port, auth, folderPath, certKey, version, indexFile
|
|
|
|
|
|
|
|
|
|
func (v VtqeHttpServer) httpListen(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
log := starlog.Std.NewFlag()
|
|
|
|
|
w.Header().Set("Server", "Vicorique")
|
|
|
|
|
w.Header().Set("Powered By", "B612.ME")
|
|
|
|
|
w.Header().Set("Server", "Victorique")
|
|
|
|
|
w.Header().Set("Powered", "B612.ME")
|
|
|
|
|
write401 := func() {
|
|
|
|
|
w.Header().Set("WWW-Authenticate", ` Basic realm="Please Enter Passwd"`)
|
|
|
|
|
w.WriteHeader(401)
|
|
|
|
@ -138,7 +138,7 @@ func (v VtqeHttpServer) httpListen(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
}
|
|
|
|
|
fpinfo, _ := os.Stat(fullpath)
|
|
|
|
|
name := filepath.Base(fullpath)
|
|
|
|
|
ext := filepath.Ext(name)[1:]
|
|
|
|
|
ext := filepath.Ext(name)
|
|
|
|
|
mime := GetMIME(ext)
|
|
|
|
|
if mime == "" || v.stopMime {
|
|
|
|
|
w.Header().Set("Content-Type", "application/download")
|
|
|
|
|