1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-28 06:46:14 -04:00

check request.Host instead of request.URL.Host. fix #681

This commit is contained in:
Darien Raymond 2017-11-04 00:35:05 +01:00
parent 1b1bdc10af
commit ba16987a07

View File

@ -217,7 +217,7 @@ func StripHopByHopHeaders(header http.Header) {
var errWaitAnother = newError("keep alive") var errWaitAnother = newError("keep alive")
func (s *Server) handlePlainHTTP(ctx context.Context, request *http.Request, reader io.Reader, writer io.Writer, dest net.Destination, dispatcher dispatcher.Interface) error { func (s *Server) handlePlainHTTP(ctx context.Context, request *http.Request, reader io.Reader, writer io.Writer, dest net.Destination, dispatcher dispatcher.Interface) error {
if len(request.URL.Host) <= 0 { if len(request.Host) <= 0 {
response := &http.Response{ response := &http.Response{
Status: "Bad Request", Status: "Bad Request",
StatusCode: 400, StatusCode: 400,