Merge pull request #1240 from brendandburns/http

Don't stack trace on 301s
pull/6/head
Daniel Smith 2014-09-09 14:16:59 -07:00
commit a4e3a4e351
1 changed files with 6 additions and 0 deletions

View File

@ -44,6 +44,10 @@ type defaultAPIServer struct {
group *APIGroup
}
const (
StatusUnprocessableEntity = 422
)
// Handle returns a Handler function that expose the provided storage interfaces
// as RESTful resources at prefix, serialized by codec, and also includes the support
// http resources.
@ -126,9 +130,11 @@ func RecoverPanics(handler http.Handler) http.Handler {
httplog.StatusIsNot(
http.StatusOK,
http.StatusAccepted,
http.StatusMovedPermanently,
http.StatusTemporaryRedirect,
http.StatusConflict,
http.StatusNotFound,
StatusUnprocessableEntity,
),
).Log()