mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-13 09:08:36 -07:00
Correctly handle ErrBadRequest in the announce handler
This commit is contained in:
@@ -42,7 +42,7 @@ func (s *Server) serveAnnounce(w http.ResponseWriter, r *http.Request, p httprou
|
||||
ann, err := NewAnnounce(s.config, r, p)
|
||||
writer := &Writer{w}
|
||||
|
||||
if err == models.ErrMalformedRequest {
|
||||
if err == models.ErrMalformedRequest || err == models.ErrBadRequest {
|
||||
writer.WriteError(err)
|
||||
return http.StatusOK, nil
|
||||
} else if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user