mirror of https://github.com/mpolden/echoip
Update http.go
change highest allowed tcp port to 65535 (instead of 65355 - potential typo?)
This commit is contained in:
parent
fcaa244d6b
commit
0d95680647
|
@ -113,7 +113,7 @@ func (s *Server) newResponse(r *http.Request) (Response, error) {
|
|||
func (s *Server) newPortResponse(r *http.Request) (PortResponse, error) {
|
||||
lastElement := filepath.Base(r.URL.Path)
|
||||
port, err := strconv.ParseUint(lastElement, 10, 16)
|
||||
if err != nil || port < 1 || port > 65355 {
|
||||
if err != nil || port < 1 || port > 65535 {
|
||||
return PortResponse{Port: port}, fmt.Errorf("invalid port: %d", port)
|
||||
}
|
||||
ip, err := ipFromRequest(s.IPHeaders, r)
|
||||
|
|
Loading…
Reference in New Issue