func (c *Controller) Trace() {
	ts := func(h http.Header) (hs string) {
		for k, v := range h {
			hs += fmt.Sprintf("\r\n%s: %s", k, v)
		}
		return
	}
	hs := fmt.Sprintf("\r\nTRACE %s %s%s\r\n", c.Ctx.Request.RequestURI, c.Ctx.Request.Proto, ts(c.Ctx.Request.Header))
	c.Ctx.Output.Header("Content-Type", "message/http")
	c.Ctx.Output.Header("Content-Length", fmt.Sprint(len(hs)))
	c.Ctx.Output.Header("Cache-Control", "no-cache, no-store, must-revalidate")
	c.Ctx.WriteString(hs)
}
Trace adds a request function to handle Trace request.
this method SHOULD NOT be overridden.
https://tools.ietf.org/html/rfc7231#section-4.3.8
The TRACE method requests a remote, application-level loop-back of
the request message.  The final recipient of the request SHOULD
reflect the message received, excluding some fields described below,
back to the client as the message body of a 200 (OK) response with a
Content-Type of "message/http" (Section 8.3.1 of [RFC7230]).
package beego
import (
	"bytes"
	"errors"
	"fmt"
	"html/template"
	"io"
	"mime/multipart"
	"net/http"
	"net/url"
	"os"
	"reflect"
	"strconv"
	"strings"
	"github.com/astaxie/beego/context"
	"github.com/astaxie/beego/context/param"
	"github.com/astaxie/beego/session"
)
var (
	ErrAbort = errors.New("user stop run")
	GlobalControllerRouter = make(map[string][]ControllerComments)
)
type ControllerFilter struct {
	Pattern        string
	Pos            int
	Filter         FilterFunc
	ReturnOnOutput bool
	ResetParams    bool
}
type ControllerFilterComments struct {
	Pattern        string
	Pos            int
	Filter         string  
	ReturnOnOutput bool
	ResetParams    bool
}
type ControllerImportComments struct {
	ImportPath  string
	ImportAlias string
}
type ControllerComments struct {
	Method           string
	Router           string
	Filters          []*ControllerFilter
	ImportComments   []*ControllerImportComments
	FilterComments   []*ControllerFilterComments
	AllowHTTPMethods []string
	Params           []map[string]string
	MethodParams     []*param.MethodParam
}
type ControllerCommentsSlice []ControllerComments
func (p ControllerCommentsSlice) Len() int           { return len(p) }
func (p ControllerCommentsSlice) Less(i, j int) bool { return p[i].Router < p[j].Router }
func (p ControllerCommentsSlice) Swap(i, j int)      { p[i], p[j] = p[j], p[i] }
type Controller struct {
	Ctx  *context.Context
	Data map[interface{}]interface{}
	controllerName string
	actionName     string
	methodMapping  map[string]func()  
	AppController  interface{}
	TplName        string
	ViewPath       string
	Layout         string
	LayoutSections map[string]string  
	TplPrefix      string
	TplExt         string
	EnableRender   bool
	_xsrfToken string
	XSRFExpire int
	EnableXSRF bool
	CruSession session.Store
}
type ControllerInterface interface {
	Init(ct *context.Context, controllerName, actionName string, app interface{})
	Prepare()
	Get()
	Post()
	Delete()
	Put()
	Head()
	Patch()
	Options()
	Trace()
	Finish()
	Render() error
	XSRFToken() string
	CheckXSRFCookie() bool
	HandlerFunc(fn string) bool
	URLMapping()
}
func (c *Controller) Init(ctx *context.Context, controllerName, actionName string, app interface{}) {
	c.Layout = ""
	c.TplName = ""
	c.controllerName = controllerName
	c.actionName = actionName
	c.Ctx = ctx
	c.TplExt = "tpl"
	c.AppController = app
	c.EnableRender = true
	c.EnableXSRF = true
	c.Data = ctx.Input.Data()
	c.methodMapping = make(map[string]func())
}
func (c *Controller) Prepare() {}
func (c *Controller) Finish() {}
func (c *Controller) Get() {
	http.Error(c.Ctx.ResponseWriter, "Method Not Allowed", http.StatusMethodNotAllowed)
}
func (c *Controller) Post() {
	http.Error(c.Ctx.ResponseWriter, "Method Not Allowed", http.StatusMethodNotAllowed)
}
func (c *Controller) Delete() {
	http.Error(c.Ctx.ResponseWriter, "Method Not Allowed", http.StatusMethodNotAllowed)
}
func (c *Controller) Put() {
	http.Error(c.Ctx.ResponseWriter, "Method Not Allowed", http.StatusMethodNotAllowed)
}
func (c *Controller) Head() {
	http.Error(c.Ctx.ResponseWriter, "Method Not Allowed", http.StatusMethodNotAllowed)
}
func (c *Controller) Patch() {
	http.Error(c.Ctx.ResponseWriter, "Method Not Allowed", http.StatusMethodNotAllowed)
}
func (c *Controller) Options() {
	http.Error(c.Ctx.ResponseWriter, "Method Not Allowed", http.StatusMethodNotAllowed)
}