1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-23 17:40:56 +00:00
Commit Graph

67 Commits

Author SHA1 Message Date
Ming Deng
650fde66aa Revert "Merge pull request #4254 from astaxie/develop-2.0"
This reverts commit e284b0ddae, reversing
changes made to 8ef8fd2606.
2020-11-26 17:48:29 +08:00
Ming Deng
b4a85c8f13 Remove files 2020-08-16 23:09:19 +08:00
Ming Deng
ebc0207909
Merge pull request #4096 from jianzhiyao/request_context
fix memory leak of request context
2020-07-27 18:04:37 +08:00
jianzhiyao
2386c9c80d delete useless if-stmt 2020-07-26 22:37:42 +08:00
jianzhiyao
cfff0f3b46 fix memory leak of request context 2020-07-25 00:00:34 +08:00
playHing
3e2c795410 Rlock for form query 2020-07-15 20:44:59 +08:00
playHing
55e6298f29 Fix concurrent form parsing and getting 2020-07-15 20:44:59 +08:00
Ming Deng
6c0db4db3d Using HTMLEscapeString in adminui.go to avoid XSS attack 2020-06-19 21:49:17 +08:00
Ming Deng
86935ada01
Merge pull request #3943 from zhlicen/master
#3942 fix encoded url(with slash) router match problem
2020-06-18 16:04:16 +08:00
HANG ZHOU
0aa82d875a
Update input.go 2020-03-05 14:46:17 +00:00
BurtonQin
cfdd1cd5be cache, context, session: add lock to fix inconsistent field protection 2020-02-10 21:49:46 +08:00
Wusuluren
b17e49e6aa fix concurrent map access problem on BeegoInput.data 2019-06-09 22:09:38 +08:00
Ruben Cid
7c80bf6f9d Add YAML 2018-05-30 16:06:40 +02:00
mlgd
166e88c103 Update input.go 2017-08-09 21:05:06 +02:00
mlgd
51b6adeb24 Add IPV6 compatibility 2017-08-09 10:23:03 +02:00
MiskoLee
29bcd31b27 supported gzip for req.Header has Content-Encoding: gzip 2017-07-10 21:27:54 +08:00
astaxie
7ec819deed fix #2725 big form 2017-07-04 21:16:59 +08:00
ysqi
6d997366ed Fixed 2456 and strengthen bind 2017-03-04 20:23:55 +08:00
astaxie
868e14b8ba fix #2017 2016-09-15 20:04:45 +08:00
YakunZ
0ad4038d9f fix#2039 & test 2016-08-24 16:04:22 +08:00
astaxie
8b525b1aa5 fix #1656 2016-08-19 00:31:46 +08:00
astaxie
86b3162aff fix #1695 update docs 2016-08-19 00:11:19 +08:00
dan pittman
0e786fa4af
adds ability to reset params after a filter runs
When a filter is run _after_ the router completes, it's input params,
such as `":splat"` will have been overwritten by the filter's router pass.
This commit adds the ability to tell the router to revert to the previous input
params after running a filter.
2016-08-07 07:44:30 -07:00
simsun
ee26279311
fix(context): retrieve scheme from X-Forwarded-Proto when it isn't none 2016-07-19 00:36:51 +08:00
Pelle Johnsen
453d744db9 Fix Context.Input.SetParam not overwriting existing value
- Also added tests for Context.Input.Param handling
2016-01-27 14:58:50 +01:00
astaxie
9167587929 add Params for input 2016-01-08 01:20:34 +08:00
fud
92711e80a3 refactor controller.go 2015-12-21 16:23:31 +08:00
astaxie
2aa50c240f Merge pull request #1486 from KilledKenny/oomDos
Added MaxMemory limit to CopyBody() Supersedes #1484
2015-12-16 23:44:42 +08:00
astaxie
dbc4ac6945 reduce the slicegrow 2015-12-16 23:43:32 +08:00
astaxie
29752e2575 refactor router 2015-12-16 23:11:03 +08:00
Simon Rawet
52c4c1fb98 Added MaxMemory limit to CopyBody()
Beego only uses the MaxMemory flag when using go's built in functions
for parsing forms. However the CopyBody() function have no limit an will
coppy anny amount of data into memory using ioutil.ReedAll() on the
request body whitout anny size validation or limit.

This fix wrapps input.Requst.Body in a LimitedReader using the same
memory limit as ParseFormOrMulitForm()
2015-12-16 10:37:21 +01:00
astaxie
f70f338025 use sync.Pool to reuse Context 2015-12-10 21:59:54 +08:00
astaxie
172894efe8 golint session 2015-09-12 22:53:55 +08:00
astaxie
ff5b09fc19 golint context 2015-09-10 15:31:09 +08:00
astaxie
079993b9f7 fix #1245 2015-07-06 13:54:14 +08:00
Lionel Lee
676595213f fix a comment error. 2015-05-25 09:10:36 +08:00
Donal Byrne
34940d00c0 Remove unnecessary optional group flag '?' since has to match one of comma or end of string 2015-05-25 09:10:35 +08:00
Donal Byrne
1a6ea693b5 Added to input.go: AcceptHtml, AcceptsXml and AcceptsJson functions which check the header agains a regex for simpler mult-content-type handling. 2015-05-25 09:10:35 +08:00
fuxiaohei
24cf06d288 code style simplify for context package 2015-02-23 11:15:55 +08:00
shuo li
22671c524e Fix subdomain, add test, space and comment fix 2014-12-17 12:06:53 +08:00
astaxie
98dcee0643 Merge pull request #926 from xuewuhen/master
SubDomains function bugfixed
2014-11-23 22:57:40 +08:00
xuewuhen
c9bb9d6a09 SubDomains function bugfixed 2014-11-18 22:54:48 +08:00
astaxie
d8614e80e7 beego: update the Url to Path 2014-08-30 22:22:23 +08:00
astaxie
a144769515 update the documents & comments 2014-08-18 16:41:43 +08:00
astaxie
fefd8ddb5b beego: update licence& fix #669 2014-07-03 23:40:21 +08:00
astaxie
0f170a80da update the comments fix #658 2014-06-25 10:39:37 +08:00
astaxie
0d17d974cd beego: update namespace 2014-05-23 15:56:25 +08:00
astaxie
3b9a404138 beego: support other analisys & fix typo 2014-05-17 02:26:50 +08:00
astaxie
c188cbbcb4 update all files License 2014-05-17 02:26:50 +08:00
astaxie
54b92e9599 context:add Bind function
// Bind data from request.Form[key] to dest
// like
/?id=123&isok=true&ft=1.2&ol[0]=1&ol[1]=2&ul[]=str&ul[]=array&user.Name=
astaxie
// var id int  beegoInput.Bind(&id, "id")  id ==123
// var isok bool  beegoInput.Bind(&isok, "isok")  id ==true
// var ft float64  beegoInput.Bind(&ft, "ft")  ft ==1.2
// ol := make([]int, 0, 2)  beegoInput.Bind(&ol, "ol")  ol ==[1 2]
// ul := make([]string, 0, 2)  beegoInput.Bind(&ul, "ul")  ul ==[str
array]
// user struct{Name}  beegoInput.Bind(&user, "user")  user ==
{Name:"astaxie"}
2014-05-17 02:26:50 +08:00