Sfoglia il codice sorgente

fixed err: http: multiple response.WriteHeader calls

Mohamed Al Ashaal 7 anni fa
parent
commit
7e5132e857
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      server.go

+ 1 - 0
server.go

@@ -45,6 +45,7 @@ func ServeHTTP() http.Handler {
 				loadbalancer.UpsertServer(testutils.ParseURI(upstream))
 			}
 			loadbalancer.ServeHTTP(res, req)
+			return
 		}
 		http.Error(res, "The request domain couldn't be found here", http.StatusNotImplemented)
 	})