Former-commit-id: 6f94a79d9ce3ac9b2b05d1e2637059996a02df1d
This commit is contained in:
Gerasimos (Makis) Maropoulos 2018-02-03 18:31:01 +02:00
parent 019911237c
commit 711e48d9ab
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ func getSignupForm(ctx iris.Context) {
ctx.ViewData(csrf.TemplateTag, csrf.TemplateField(ctx))
ctx.View("user/signup.html")
// We could also retrieve the token directly from csrf.Token(r) and
// We could also retrieve the token directly from csrf.Token(ctx) and
// set it in the request header - ctx.GetHeader("X-CSRF-Token", token)
// This is useful if you're sending JSON to clients or a front-end JavaScript
// framework.

View File

@ -1553,8 +1553,7 @@ func (ctx *context) ContentType(cType string) {
// if doesn't contain a charset already then append it
if !strings.Contains(cType, "charset") {
if cType != ContentBinaryHeaderValue {
charset := ctx.Application().ConfigurationReadOnly().GetCharset()
cType += "; charset=" + charset
cType += "; charset=" + ctx.Application().ConfigurationReadOnly().GetCharset()
}
}
@ -1940,6 +1939,7 @@ func (ctx *context) UploadFormFiles(destDirectory string, before ...func(Context
n += n0
}
}
return n, nil
}
}