httplib: fix unstable test, do not use httplib.org

This commit is contained in:
Deng Ming
2023-06-04 14:26:53 +08:00
parent 4f4cf565f0
commit 3e96b23551
86 changed files with 1166 additions and 917 deletions

View File

@@ -19,32 +19,35 @@
// package controllers
//
// import (
// "github.com/beego/beego/v2"
// "github.com/beego/beego/v2/client/cache"
// "github.com/beego/beego/v2/server/web/captcha"
//
// "github.com/beego/beego/v2"
// "github.com/beego/beego/v2/client/cache"
// "github.com/beego/beego/v2/server/web/captcha"
//
// )
//
// var cpt *captcha.Captcha
//
// func init() {
// // use beego cache system store the captcha data
// store := cache.NewMemoryCache()
// cpt = captcha.NewWithFilter("/captcha/", store)
// }
// func init() {
// // use beego cache system store the captcha data
// store := cache.NewMemoryCache()
// cpt = captcha.NewWithFilter("/captcha/", store)
// }
//
// type MainController struct {
// beego.Controller
// }
// type MainController struct {
// beego.Controller
// }
//
// func (this *MainController) Get() {
// this.TplName = "index.tpl"
// }
// func (this *MainController) Get() {
// this.TplName = "index.tpl"
// }
//
// func (this *MainController) Post() {
// this.TplName = "index.tpl"
// func (this *MainController) Post() {
// this.TplName = "index.tpl"
//
// this.Data["Success"] = cpt.VerifyReq(this.Ctx.Request)
// }
//
// this.Data["Success"] = cpt.VerifyReq(this.Ctx.Request)
// }
// ```
//
// template usage
@@ -52,8 +55,10 @@
// ```
// {{.Success}}
// <form action="/" method="post">
// {{create_captcha}}
// <input name="captcha" type="text">
//
// {{create_captcha}}
// <input name="captcha" type="text">
//
// </form>
// ```
package captcha