rewrite ServeWrapper in order to be acceptable for
legacy go1.0