Skip to content

Commit 764515d

Browse files
committed
fix checks on mbr
1 parent 9957975 commit 764515d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

ebird/server/server.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,9 @@ func speciesHandler(w http.ResponseWriter, r *http.Request) {
3838
var mbr [4]float64
3939
for i, x := range []string{"minx", "maxx", "miny", "maxy"} {
4040
v := r.FormValue(x)
41-
if v == "" {
42-
continue
43-
}
4441
mbr[i], err = strconv.ParseFloat(v, 64)
4542
if err != nil {
46-
http.Error(w, fmt.Sprintf("invalid coordinate for %s: %s", x, v), http.StatusBadRequest)
43+
http.Error(w, fmt.Sprintf("invalid coordinate for %s: '%s'", x, v), http.StatusBadRequest)
4744
return
4845
}
4946
}

0 commit comments

Comments
 (0)