func HandleBodyReadError(err error, w http.ResponseWriter) (responded bool) {
	if err == nil {
		return false
	}
	if err.Error() == "http: request body too large" {
		RequestEntityTooLarge(w, nil)
		return true
	}
	return false
}
HandleBodyReadError checks for particular errors and writes appropriate
response accordingly. If no known error is found, no response is written and
the function returns false.
package jsonhttp
import (
	"net/http"
	"resenje.org/web"
)
type MethodHandler map[string]http.Handler
func (h MethodHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	web.HandleMethods(h, `{"message":"Method Not Allowed","code":405}`, DefaultContentTypeHeader, w, r)
}
func NotFoundHandler(w http.ResponseWriter, _ *http.Request) {
	NotFound(w, nil)
}
func NewMaxBodyBytesHandler(limit int64) func(http.Handler) http.Handler {
	return func(h http.Handler) http.Handler {
		return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
			if r.ContentLength > limit {
				RequestEntityTooLarge(w, nil)
				return
			}
			r.Body = http.MaxBytesReader(w, r.Body, limit)
			h.ServeHTTP(w, r)
		})
	}
}