mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-03 06:07:20 +02:00
Fixed #450
This commit is contained in:
parent
d1e5581eea
commit
0d4c71d0f6
@ -42,7 +42,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
/* Build Constants */
|
/* Build Constants */
|
||||||
SYSTEM_NAME = "Zoraxy"
|
SYSTEM_NAME = "Zoraxy"
|
||||||
SYSTEM_VERSION = "3.1.6"
|
SYSTEM_VERSION = "3.1.7"
|
||||||
DEVELOPMENT_BUILD = false /* Development: Set to false to use embedded web fs */
|
DEVELOPMENT_BUILD = false /* Development: Set to false to use embedded web fs */
|
||||||
|
|
||||||
/* System Constants */
|
/* System Constants */
|
||||||
|
@ -191,7 +191,24 @@ func (router *Router) StartProxyService() error {
|
|||||||
w.Write([]byte("400 - Bad Request"))
|
w.Write([]byte("400 - Bad Request"))
|
||||||
} else {
|
} else {
|
||||||
//No defined sub-domain
|
//No defined sub-domain
|
||||||
http.NotFound(w, r)
|
if router.Root.DefaultSiteOption == DefaultSite_NoResponse {
|
||||||
|
//No response. Just close the connection
|
||||||
|
hijacker, ok := w.(http.Hijacker)
|
||||||
|
if !ok {
|
||||||
|
w.Header().Set("Connection", "close")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
conn, _, err := hijacker.Hijack()
|
||||||
|
if err != nil {
|
||||||
|
w.Header().Set("Connection", "close")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
conn.Close()
|
||||||
|
} else {
|
||||||
|
//Default behavior
|
||||||
|
http.NotFound(w, r)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user